| 1 |
--- |
| 2 |
version: 1 |
| 3 |
interactions: |
| 4 |
- request: |
| 5 |
body: '{"max_tokens":512,"messages":[{"content":[{"text":"Weather in SF?","type":"text"}],"role":"user"}],"model":"claude-3-7-sonnet-latest","tools":[{"input_schema":{"properties":{"city":{"type":"string"},"units":{"enum":["celsius","fahrenheit"],"type":"string"}},"required":["city"],"type":"object"},"name":"get_weather","description":"Get |
| 6 |
weather"}],"stream":true}' |
| 7 |
form: {} |
| 8 |
headers: |
| 9 |
Accept: |
| 10 |
- application/json |
| 11 |
Anthropic-Version: |
| 12 |
- "2023-06-01" |
| 13 |
Content-Type: |
| 14 |
- application/json |
| 15 |
User-Agent: |
| 16 |
- Anthropic/Go 1.16.0 |
| 17 |
X-Api-Key: |
| 18 |
- fake-api-key-for-testing-only |
| 19 |
X-Stainless-Arch: |
| 20 |
- arm64 |
| 21 |
X-Stainless-Lang: |
| 22 |
- go |
| 23 |
X-Stainless-Os: |
| 24 |
- MacOS |
| 25 |
X-Stainless-Package-Version: |
| 26 |
- 1.16.0 |
| 27 |
X-Stainless-Retry-Count: |
| 28 |
- "0" |
| 29 |
X-Stainless-Runtime: |
| 30 |
- go |
| 31 |
X-Stainless-Runtime-Version: |
| 32 |
- go1.24.5 |
| 33 |
url: https://api.anthropic.com/v1/messages?beta=true |
| 34 |
method: POST |
| 35 |
response: |
| 36 |
body: |+ |
| 37 |
event: message_start |
| 38 |
data: {"type":"message_start","message":{"model":"claude-3-7-sonnet-20250219","id":"msg_01P7nF1bmxyzFZjF8zwbUDBM","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":394,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}} } |
| 39 |
|
| 40 |
event: content_block_start |
| 41 |
data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""} } |
| 42 |
|
| 43 |
event: content_block_delta |
| 44 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"I"} } |
| 45 |
|
| 46 |
event: content_block_delta |
| 47 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"'"} } |
| 48 |
|
| 49 |
event: ping |
| 50 |
data: {"type": "ping"} |
| 51 |
|
| 52 |
event: content_block_delta |
| 53 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d be"} } |
| 54 |
|
| 55 |
event: content_block_delta |
| 56 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" happy to check"} } |
| 57 |
|
| 58 |
event: content_block_delta |
| 59 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" the weather"} } |
| 60 |
|
| 61 |
event: content_block_delta |
| 62 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" in"} } |
| 63 |
|
| 64 |
event: content_block_delta |
| 65 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" San Francisco for you."}} |
| 66 |
|
| 67 |
event: content_block_delta |
| 68 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Let"} } |
| 69 |
|
| 70 |
event: content_block_delta |
| 71 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" me get"} } |
| 72 |
|
| 73 |
event: content_block_delta |
| 74 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" that"}} |
| 75 |
|
| 76 |
event: content_block_delta |
| 77 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" information for you right"} } |
| 78 |
|
| 79 |
event: content_block_delta |
| 80 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" away"} } |
| 81 |
|
| 82 |
event: content_block_delta |
| 83 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"."} } |
| 84 |
|
| 85 |
event: content_block_stop |
| 86 |
data: {"type":"content_block_stop","index":0 } |
| 87 |
|
| 88 |
event: content_block_start |
| 89 |
data: {"type":"content_block_start","index":1,"content_block":{"type":"tool_use","id":"toolu_017QoD96fYwGzCWvLfaPADWg","name":"get_weather","input":{}} } |
| 90 |
|
| 91 |
event: content_block_delta |
| 92 |
data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":""} } |
| 93 |
|
| 94 |
event: content_block_delta |
| 95 |
data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"{\"city\": \"Sa"} } |
| 96 |
|
| 97 |
event: content_block_delta |
| 98 |
data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"n Francis"} } |
| 99 |
|
| 100 |
event: content_block_delta |
| 101 |
data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"co\"}"} } |
| 102 |
|
| 103 |
event: content_block_stop |
| 104 |
data: {"type":"content_block_stop","index":1 } |
| 105 |
|
| 106 |
event: message_delta |
| 107 |
data: {"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null},"usage":{"input_tokens":394,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":79} } |
| 108 |
|
| 109 |
event: message_stop |
| 110 |
data: {"type":"message_stop" } |
| 111 |
|
| 112 |
headers: |
| 113 |
Anthropic-Organization-Id: |
| 114 |
- 1577a8a6-174a-4705-916c-6b22ae7a49e6 |
| 115 |
Anthropic-Ratelimit-Input-Tokens-Limit: |
| 116 |
- "200000" |
| 117 |
Anthropic-Ratelimit-Input-Tokens-Remaining: |
| 118 |
- "199000" |
| 119 |
Anthropic-Ratelimit-Input-Tokens-Reset: |
| 120 |
- "2025-10-30T16:17:36Z" |
| 121 |
Anthropic-Ratelimit-Output-Tokens-Limit: |
| 122 |
- "80000" |
| 123 |
Anthropic-Ratelimit-Output-Tokens-Remaining: |
| 124 |
- "80000" |
| 125 |
Anthropic-Ratelimit-Output-Tokens-Reset: |
| 126 |
- "2025-10-30T16:17:36Z" |
| 127 |
Anthropic-Ratelimit-Requests-Limit: |
| 128 |
- "4000" |
| 129 |
Anthropic-Ratelimit-Requests-Remaining: |
| 130 |
- "3999" |
| 131 |
Anthropic-Ratelimit-Requests-Reset: |
| 132 |
- "2025-10-30T16:17:36Z" |
| 133 |
Anthropic-Ratelimit-Tokens-Limit: |
| 134 |
- "280000" |
| 135 |
Anthropic-Ratelimit-Tokens-Remaining: |
| 136 |
- "279000" |
| 137 |
Anthropic-Ratelimit-Tokens-Reset: |
| 138 |
- "2025-10-30T16:17:36Z" |
| 139 |
Cache-Control: |
| 140 |
- no-cache |
| 141 |
Cf-Cache-Status: |
| 142 |
- DYNAMIC |
| 143 |
Cf-Ray: |
| 144 |
- 996c3946fe585e6a-EWR |
| 145 |
Content-Type: |
| 146 |
- text/event-stream; charset=utf-8 |
| 147 |
Date: |
| 148 |
- Thu, 30 Oct 2025 16:17:36 GMT |
| 149 |
Request-Id: |
| 150 |
- req_011CUdgeEggCMUt3Y8mNfvTP |
| 151 |
Server: |
| 152 |
- cloudflare |
| 153 |
Strict-Transport-Security: |
| 154 |
- max-age=31536000; includeSubDomains; preload |
| 155 |
X-Envoy-Upstream-Service-Time: |
| 156 |
- "1133" |
| 157 |
X-Robots-Tag: |
| 158 |
- none |
| 159 |
status: 200 OK |
| 160 |
code: 200 |
| 161 |
duration: "" |