| 1 |
--- |
| 2 |
version: 1 |
| 3 |
interactions: |
| 4 |
- request: |
| 5 |
body: '{"max_tokens":512,"messages":[{"content":[{"text":"Weather in SF in fahrenheit?","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_01H1pwRRkQxKbUGKi785gT4M","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":397,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":2,"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'll"} } |
| 45 |
|
| 46 |
event: content_block_delta |
| 47 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" get"} } |
| 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":" the current weather in"} } |
| 54 |
|
| 55 |
event: content_block_delta |
| 56 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" San Francisco for you in"} } |
| 57 |
|
| 58 |
event: content_block_delta |
| 59 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Fahrenheit."} } |
| 60 |
|
| 61 |
event: content_block_stop |
| 62 |
data: {"type":"content_block_stop","index":0} |
| 63 |
|
| 64 |
event: content_block_start |
| 65 |
data: {"type":"content_block_start","index":1,"content_block":{"type":"tool_use","id":"toolu_01RaX2WYWRWCbaeFHssmGJXG","name":"get_weather","input":{}} } |
| 66 |
|
| 67 |
event: content_block_delta |
| 68 |
data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":""} } |
| 69 |
|
| 70 |
event: content_block_delta |
| 71 |
data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"{\"city"} } |
| 72 |
|
| 73 |
event: content_block_delta |
| 74 |
data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\": \"S"} } |
| 75 |
|
| 76 |
event: content_block_delta |
| 77 |
data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"an F"} } |
| 78 |
|
| 79 |
event: content_block_delta |
| 80 |
data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"ra"} } |
| 81 |
|
| 82 |
event: content_block_delta |
| 83 |
data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"ncisco"} } |
| 84 |
|
| 85 |
event: content_block_delta |
| 86 |
data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\""}} |
| 87 |
|
| 88 |
event: content_block_delta |
| 89 |
data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":", \"units\""} } |
| 90 |
|
| 91 |
event: content_block_delta |
| 92 |
data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":": \"fahr"} } |
| 93 |
|
| 94 |
event: content_block_delta |
| 95 |
data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"enhei"} } |
| 96 |
|
| 97 |
event: content_block_delta |
| 98 |
data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"t\"}"} } |
| 99 |
|
| 100 |
event: content_block_stop |
| 101 |
data: {"type":"content_block_stop","index":1 } |
| 102 |
|
| 103 |
event: message_delta |
| 104 |
data: {"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null},"usage":{"input_tokens":397,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":89} } |
| 105 |
|
| 106 |
event: message_stop |
| 107 |
data: {"type":"message_stop" } |
| 108 |
|
| 109 |
headers: |
| 110 |
Anthropic-Organization-Id: |
| 111 |
- 1577a8a6-174a-4705-916c-6b22ae7a49e6 |
| 112 |
Anthropic-Ratelimit-Input-Tokens-Limit: |
| 113 |
- "200000" |
| 114 |
Anthropic-Ratelimit-Input-Tokens-Remaining: |
| 115 |
- "199000" |
| 116 |
Anthropic-Ratelimit-Input-Tokens-Reset: |
| 117 |
- "2025-10-30T16:17:36Z" |
| 118 |
Anthropic-Ratelimit-Output-Tokens-Limit: |
| 119 |
- "80000" |
| 120 |
Anthropic-Ratelimit-Output-Tokens-Remaining: |
| 121 |
- "80000" |
| 122 |
Anthropic-Ratelimit-Output-Tokens-Reset: |
| 123 |
- "2025-10-30T16:17:35Z" |
| 124 |
Anthropic-Ratelimit-Requests-Limit: |
| 125 |
- "4000" |
| 126 |
Anthropic-Ratelimit-Requests-Remaining: |
| 127 |
- "3996" |
| 128 |
Anthropic-Ratelimit-Requests-Reset: |
| 129 |
- "2025-10-30T16:17:35Z" |
| 130 |
Anthropic-Ratelimit-Tokens-Limit: |
| 131 |
- "280000" |
| 132 |
Anthropic-Ratelimit-Tokens-Remaining: |
| 133 |
- "279000" |
| 134 |
Anthropic-Ratelimit-Tokens-Reset: |
| 135 |
- "2025-10-30T16:17:35Z" |
| 136 |
Cache-Control: |
| 137 |
- no-cache |
| 138 |
Cf-Cache-Status: |
| 139 |
- DYNAMIC |
| 140 |
Cf-Ray: |
| 141 |
- 996c3946fe5c5e6a-EWR |
| 142 |
Content-Type: |
| 143 |
- text/event-stream; charset=utf-8 |
| 144 |
Date: |
| 145 |
- Thu, 30 Oct 2025 16:17:36 GMT |
| 146 |
Request-Id: |
| 147 |
- req_011CUdgeEaEXcfa9PDdxrNMk |
| 148 |
Server: |
| 149 |
- cloudflare |
| 150 |
Strict-Transport-Security: |
| 151 |
- max-age=31536000; includeSubDomains; preload |
| 152 |
X-Envoy-Upstream-Service-Time: |
| 153 |
- "344" |
| 154 |
X-Robots-Tag: |
| 155 |
- none |
| 156 |
status: 200 OK |
| 157 |
code: 200 |
| 158 |
duration: "" |
| 159 |
- request: |
| 160 |
body: '{"max_tokens":512,"messages":[{"content":[{"text":"Weather in SF in fahrenheit?","type":"text"}],"role":"user"},{"content":[{"text":"I''ll |
| 161 |
get the current weather in San Francisco for you in Fahrenheit.","type":"text"},{"id":"toolu_01RaX2WYWRWCbaeFHssmGJXG","input":{"city":"San |
| 162 |
Francisco","units":"fahrenheit"},"name":"get_weather","type":"tool_use"}],"role":"assistant"},{"content":[{"tool_use_id":"toolu_01RaX2WYWRWCbaeFHssmGJXG","content":[{"text":"The |
| 163 |
weather in San Francisco is 68 degrees fahrenheit.","type":"text"}],"type":"tool_result"}],"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 |
| 164 |
weather"}],"stream":true}' |
| 165 |
form: {} |
| 166 |
headers: |
| 167 |
Accept: |
| 168 |
- application/json |
| 169 |
Anthropic-Version: |
| 170 |
- "2023-06-01" |
| 171 |
Content-Type: |
| 172 |
- application/json |
| 173 |
User-Agent: |
| 174 |
- Anthropic/Go 1.16.0 |
| 175 |
X-Api-Key: |
| 176 |
- fake-api-key-for-testing-only |
| 177 |
X-Stainless-Arch: |
| 178 |
- arm64 |
| 179 |
X-Stainless-Lang: |
| 180 |
- go |
| 181 |
X-Stainless-Os: |
| 182 |
- MacOS |
| 183 |
X-Stainless-Package-Version: |
| 184 |
- 1.16.0 |
| 185 |
X-Stainless-Retry-Count: |
| 186 |
- "0" |
| 187 |
X-Stainless-Runtime: |
| 188 |
- go |
| 189 |
X-Stainless-Runtime-Version: |
| 190 |
- go1.24.5 |
| 191 |
url: https://api.anthropic.com/v1/messages?beta=true |
| 192 |
method: POST |
| 193 |
response: |
| 194 |
body: |+ |
| 195 |
event: message_start |
| 196 |
data: {"type":"message_start","message":{"model":"claude-3-7-sonnet-20250219","id":"msg_01Hh7yjeiaEaEREnpywjByCo","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":509,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":2,"service_tier":"standard"}} } |
| 197 |
|
| 198 |
event: content_block_start |
| 199 |
data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""} } |
| 200 |
|
| 201 |
event: content_block_delta |
| 202 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"The"} } |
| 203 |
|
| 204 |
event: content_block_delta |
| 205 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" current weather"} } |
| 206 |
|
| 207 |
event: ping |
| 208 |
data: {"type": "ping"} |
| 209 |
|
| 210 |
event: content_block_delta |
| 211 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" in San Francisco is "} } |
| 212 |
|
| 213 |
event: content_block_delta |
| 214 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"68 degrees Fahren"} } |
| 215 |
|
| 216 |
event: content_block_delta |
| 217 |
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"heit."} } |
| 218 |
|
| 219 |
event: content_block_stop |
| 220 |
data: {"type":"content_block_stop","index":0 } |
| 221 |
|
| 222 |
event: message_delta |
| 223 |
data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":509,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":19} } |
| 224 |
|
| 225 |
event: message_stop |
| 226 |
data: {"type":"message_stop" } |
| 227 |
|
| 228 |
headers: |
| 229 |
Anthropic-Organization-Id: |
| 230 |
- 1577a8a6-174a-4705-916c-6b22ae7a49e6 |
| 231 |
Anthropic-Ratelimit-Input-Tokens-Limit: |
| 232 |
- "200000" |
| 233 |
Anthropic-Ratelimit-Input-Tokens-Remaining: |
| 234 |
- "199000" |
| 235 |
Anthropic-Ratelimit-Input-Tokens-Reset: |
| 236 |
- "2025-10-30T16:17:37Z" |
| 237 |
Anthropic-Ratelimit-Output-Tokens-Limit: |
| 238 |
- "80000" |
| 239 |
Anthropic-Ratelimit-Output-Tokens-Remaining: |
| 240 |
- "80000" |
| 241 |
Anthropic-Ratelimit-Output-Tokens-Reset: |
| 242 |
- "2025-10-30T16:17:37Z" |
| 243 |
Anthropic-Ratelimit-Requests-Limit: |
| 244 |
- "4000" |
| 245 |
Anthropic-Ratelimit-Requests-Remaining: |
| 246 |
- "3999" |
| 247 |
Anthropic-Ratelimit-Requests-Reset: |
| 248 |
- "2025-10-30T16:17:37Z" |
| 249 |
Anthropic-Ratelimit-Tokens-Limit: |
| 250 |
- "280000" |
| 251 |
Anthropic-Ratelimit-Tokens-Remaining: |
| 252 |
- "279000" |
| 253 |
Anthropic-Ratelimit-Tokens-Reset: |
| 254 |
- "2025-10-30T16:17:37Z" |
| 255 |
Cache-Control: |
| 256 |
- no-cache |
| 257 |
Cf-Cache-Status: |
| 258 |
- DYNAMIC |
| 259 |
Cf-Ray: |
| 260 |
- 996c394fc8455e6a-EWR |
| 261 |
Content-Type: |
| 262 |
- text/event-stream; charset=utf-8 |
| 263 |
Date: |
| 264 |
- Thu, 30 Oct 2025 16:17:37 GMT |
| 265 |
Request-Id: |
| 266 |
- req_011CUdgeLebtjP3oqrQZ6wp1 |
| 267 |
Server: |
| 268 |
- cloudflare |
| 269 |
Strict-Transport-Security: |
| 270 |
- max-age=31536000; includeSubDomains; preload |
| 271 |
X-Envoy-Upstream-Service-Time: |
| 272 |
- "409" |
| 273 |
X-Robots-Tag: |
| 274 |
- none |
| 275 |
status: 200 OK |
| 276 |
code: 200 |
| 277 |
duration: "" |