|
1 | 1 | --- |
2 | 2 | version: 2 |
3 | 3 | interactions: |
4 | | -- id: 0 |
5 | | - request: |
6 | | - proto: HTTP/1.1 |
7 | | - proto_major: 1 |
8 | | - proto_minor: 1 |
9 | | - content_length: 0 |
10 | | - host: api.anthropic.com |
11 | | - body: "{\"messages\":[{\"content\":[{\"text\":\"What's 2+2?\",\"type\":\"text\"}],\"role\":\"user\"}],\"model\":\"claude-sonnet-4-0\",\"system\":[{\"text\":\"You are a knowledgeable assistant that helps users with various tasks.\\nBe helpful, accurate, and concise in your responses.\",\"cache_control\":{\"type\":\"ephemeral\"},\"type\":\"text\"}]}" |
12 | | - url: https://api.anthropic.com/v1/messages/count_tokens |
13 | | - method: POST |
14 | | - response: |
15 | | - proto: HTTP/2.0 |
16 | | - proto_major: 2 |
17 | | - proto_minor: 0 |
18 | | - content_length: 19 |
19 | | - body: "{\"input_tokens\":42}" |
20 | | - headers: {} |
21 | | - status: 200 OK |
22 | | - code: 200 |
23 | | - duration: 192.898375ms |
24 | | -- id: 1 |
25 | | - request: |
26 | | - proto: HTTP/1.1 |
27 | | - proto_major: 1 |
28 | | - proto_minor: 1 |
29 | | - content_length: 0 |
30 | | - host: api.anthropic.com |
31 | | - body: "{\"max_tokens\":8192,\"messages\":[{\"content\":[{\"text\":\"What's 2+2?\",\"type\":\"text\"}],\"role\":\"user\"}],\"model\":\"claude-sonnet-4-0\",\"system\":[{\"text\":\"You are a knowledgeable assistant that helps users with various tasks.\\nBe helpful, accurate, and concise in your responses.\",\"cache_control\":{\"type\":\"ephemeral\"},\"type\":\"text\"}],\"tools\":[],\"stream\":true}" |
32 | | - url: https://api.anthropic.com/v1/messages |
33 | | - method: POST |
34 | | - response: |
35 | | - proto: HTTP/2.0 |
36 | | - proto_major: 2 |
37 | | - proto_minor: 0 |
38 | | - content_length: -1 |
39 | | - body: "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-20250514\",\"id\":\"msg_0175jbuqJKy5FyijdH5fbvaW\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":42,\"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\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"2 \"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"+ 2 = 4\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":42,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":13} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n" |
40 | | - headers: {} |
41 | | - status: 200 OK |
42 | | - code: 200 |
43 | | - duration: 2.088045083s |
| 4 | + - id: 0 |
| 5 | + request: |
| 6 | + proto: HTTP/1.1 |
| 7 | + proto_major: 1 |
| 8 | + proto_minor: 1 |
| 9 | + content_length: 0 |
| 10 | + host: api.anthropic.com |
| 11 | + body: '{"max_tokens":64000,"messages":[{"content":[{"text":"What''s 2+2?","type":"text"}],"role":"user"}],"model":"claude-sonnet-4-0","system":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.","cache_control":{"type":"ephemeral"},"type":"text"}],"tools":[],"stream":true}' |
| 12 | + url: https://api.anthropic.com/v1/messages |
| 13 | + method: POST |
| 14 | + response: |
| 15 | + proto: HTTP/2.0 |
| 16 | + proto_major: 2 |
| 17 | + proto_minor: 0 |
| 18 | + content_length: -1 |
| 19 | + body: |+ |
| 20 | + event: message_start |
| 21 | + data: {"type":"message_start","message":{"model":"claude-sonnet-4-20250514","id":"msg_01MyjDL5YUjXGFqCCCofeFkK","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":42,"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"}} } |
| 22 | +
|
| 23 | + event: content_block_start |
| 24 | + data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""} } |
| 25 | +
|
| 26 | + event: content_block_delta |
| 27 | + data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"2 "} } |
| 28 | +
|
| 29 | + event: ping |
| 30 | + data: {"type": "ping"} |
| 31 | +
|
| 32 | + event: content_block_delta |
| 33 | + data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"+ 2 = 4"} } |
| 34 | +
|
| 35 | + event: content_block_stop |
| 36 | + data: {"type":"content_block_stop","index":0 } |
| 37 | +
|
| 38 | + event: message_delta |
| 39 | + data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":42,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":13} } |
| 40 | +
|
| 41 | + event: message_stop |
| 42 | + data: {"type":"message_stop" } |
| 43 | +
|
| 44 | + headers: {} |
| 45 | + status: 200 OK |
| 46 | + code: 200 |
| 47 | + duration: 2.000933084s |
0 commit comments