when:
  path: /v1/messages
  method: POST
  query_param: []
  header:
  - name: accept
    value: text/event-stream
  - name: content-type
    value: application/json
  - name: anthropic-version
    value: 2023-06-01
  body: '{"max_tokens":64000,"messages":[{"content":[{"text":"Calculate ((10 - 4) * (3 + 5)) / 3 and describe the result in one short paragraph.","type":"text"}],"role":"user"}],"model":"claude-sonnet-4-6","stream":true,"system":[{"text":"You must use tools for arithmetic.","type":"text"}],"tool_choice":{"type":"auto"},"tools":[{"description":"Add x and y together","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"add"},{"description":"Subtract y from x (i.e.: x - y)","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"subtract"},{"description":"Compute the product of x and y (i.e.: x * y).","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"multiply"},{"description":"Compute the quotient of x and y.","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"divide"}]}'
then:
  status: 200
  header:
  - name: content-type
    value: text/event-stream; charset=utf-8
  body: |+
    event: message_start
    data: {"message":{"content":[],"id":"msg_REDACTED_1","model":"claude-sonnet-4-6","role":"assistant","stop_details":null,"stop_reason":null,"stop_sequence":null,"type":"message","usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"inference_geo":"global","input_tokens":1001,"output_tokens":2,"service_tier":"standard"}},"type":"message_start"}

    event: content_block_start
    data: {"content_block":{"text":"","type":"text"},"index":0,"type":"content_block_start"}

    event: ping
    data: {"type":"ping"}

    event: content_block_delta
    data: {"delta":{"text":"I'll","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":" solve this step by step! Let me start by computing the two independent sub-expressions *","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":"*(10 - 4)** and **(3 + 5)** simultaneously first.","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_stop
    data: {"index":0,"type":"content_block_stop"}

    event: content_block_start
    data: {"content_block":{"caller":{"type":"direct"},"id":"toolu_REDACTED_1","input":{},"name":"subtract","type":"tool_use"},"index":1,"type":"content_block_start"}

    event: content_block_delta
    data: {"delta":{"partial_json":"","type":"input_json_delta"},"index":1,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"partial_json":"{\"x\": 10","type":"input_json_delta"},"index":1,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"partial_json":", \"y\":","type":"input_json_delta"},"index":1,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"partial_json":" 4}","type":"input_json_delta"},"index":1,"type":"content_block_delta"}

    event: content_block_stop
    data: {"index":1,"type":"content_block_stop"}

    event: content_block_start
    data: {"content_block":{"caller":{"type":"direct"},"id":"toolu_REDACTED_2","input":{},"name":"add","type":"tool_use"},"index":2,"type":"content_block_start"}

    event: content_block_delta
    data: {"delta":{"partial_json":"","type":"input_json_delta"},"index":2,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"partial_json":"{\"x\": 3","type":"input_json_delta"},"index":2,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"partial_json":", \"y","type":"input_json_delta"},"index":2,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"partial_json":"\": 5}","type":"input_json_delta"},"index":2,"type":"content_block_delta"}

    event: content_block_stop
    data: {"index":2,"type":"content_block_stop"}

    event: message_delta
    data: {"delta":{"stop_details":null,"stop_reason":"tool_use","stop_sequence":null},"type":"message_delta","usage":{"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":1001,"output_tokens":161}}

    event: message_stop
    data: {"type":"message_stop"}

---
when:
  path: /v1/messages
  method: POST
  query_param: []
  header:
  - name: accept
    value: text/event-stream
  - name: content-type
    value: application/json
  - name: anthropic-version
    value: 2023-06-01
  body: '{"max_tokens":64000,"messages":[{"content":[{"text":"Calculate ((10 - 4) * (3 + 5)) / 3 and describe the result in one short paragraph.","type":"text"}],"role":"user"},{"content":[{"text":"I''ll solve this step by step! Let me start by computing the two independent sub-expressions **(10 - 4)** and **(3 + 5)** simultaneously first.","type":"text"},{"id":"toolu_REDACTED_1","input":{"x":10,"y":4},"name":"subtract","type":"tool_use"},{"id":"toolu_REDACTED_2","input":{"x":3,"y":5},"name":"add","type":"tool_use"}],"role":"assistant"},{"content":[{"content":[{"text":"6","type":"text"}],"tool_use_id":"toolu_REDACTED_1","type":"tool_result"},{"content":[{"text":"8","type":"text"}],"tool_use_id":"toolu_REDACTED_2","type":"tool_result"}],"role":"user"}],"model":"claude-sonnet-4-6","stream":true,"system":[{"text":"You must use tools for arithmetic.","type":"text"}],"tool_choice":{"type":"auto"},"tools":[{"description":"Add x and y together","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"add"},{"description":"Subtract y from x (i.e.: x - y)","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"subtract"},{"description":"Compute the product of x and y (i.e.: x * y).","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"multiply"},{"description":"Compute the quotient of x and y.","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"divide"}]}'
then:
  status: 200
  header:
  - name: content-type
    value: text/event-stream; charset=utf-8
  body: |+
    event: message_start
    data: {"message":{"content":[],"id":"msg_REDACTED_2","model":"claude-sonnet-4-6","role":"assistant","stop_details":null,"stop_reason":null,"stop_sequence":null,"type":"message","usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"inference_geo":"global","input_tokens":1223,"output_tokens":1,"service_tier":"standard"}},"type":"message_start"}

    event: content_block_start
    data: {"content_block":{"text":"","type":"text"},"index":0,"type":"content_block_start"}

    event: ping
    data: {"type":"ping"}

    event: content_block_delta
    data: {"delta":{"text":"Got","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":" **6** and **8**! Now I'll multiply them together.","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_stop
    data: {"index":0,"type":"content_block_stop"}

    event: content_block_start
    data: {"content_block":{"caller":{"type":"direct"},"id":"toolu_REDACTED_3","input":{},"name":"multiply","type":"tool_use"},"index":1,"type":"content_block_start"}

    event: content_block_delta
    data: {"delta":{"partial_json":"","type":"input_json_delta"},"index":1,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"partial_json":"{\"x","type":"input_json_delta"},"index":1,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"partial_json":"\":","type":"input_json_delta"},"index":1,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"partial_json":" 6","type":"input_json_delta"},"index":1,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"partial_json":", \"y\":","type":"input_json_delta"},"index":1,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"partial_json":" 8}","type":"input_json_delta"},"index":1,"type":"content_block_delta"}

    event: content_block_stop
    data: {"index":1,"type":"content_block_stop"}

    event: message_delta
    data: {"delta":{"stop_details":null,"stop_reason":"tool_use","stop_sequence":null},"type":"message_delta","usage":{"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":1223,"output_tokens":85}}

    event: message_stop
    data: {"type":"message_stop"}

---
when:
  path: /v1/messages
  method: POST
  query_param: []
  header:
  - name: accept
    value: text/event-stream
  - name: content-type
    value: application/json
  - name: anthropic-version
    value: 2023-06-01
  body: '{"max_tokens":64000,"messages":[{"content":[{"text":"Calculate ((10 - 4) * (3 + 5)) / 3 and describe the result in one short paragraph.","type":"text"}],"role":"user"},{"content":[{"text":"I''ll solve this step by step! Let me start by computing the two independent sub-expressions **(10 - 4)** and **(3 + 5)** simultaneously first.","type":"text"},{"id":"toolu_REDACTED_1","input":{"x":10,"y":4},"name":"subtract","type":"tool_use"},{"id":"toolu_REDACTED_2","input":{"x":3,"y":5},"name":"add","type":"tool_use"}],"role":"assistant"},{"content":[{"content":[{"text":"6","type":"text"}],"tool_use_id":"toolu_REDACTED_1","type":"tool_result"},{"content":[{"text":"8","type":"text"}],"tool_use_id":"toolu_REDACTED_2","type":"tool_result"}],"role":"user"},{"content":[{"text":"Got **6** and **8**! Now I''ll multiply them together.","type":"text"},{"id":"toolu_REDACTED_3","input":{"x":6,"y":8},"name":"multiply","type":"tool_use"}],"role":"assistant"},{"content":[{"content":[{"text":"48","type":"text"}],"tool_use_id":"toolu_REDACTED_3","type":"tool_result"}],"role":"user"}],"model":"claude-sonnet-4-6","stream":true,"system":[{"text":"You must use tools for arithmetic.","type":"text"}],"tool_choice":{"type":"auto"},"tools":[{"description":"Add x and y together","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"add"},{"description":"Subtract y from x (i.e.: x - y)","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"subtract"},{"description":"Compute the product of x and y (i.e.: x * y).","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"multiply"},{"description":"Compute the quotient of x and y.","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"divide"}]}'
then:
  status: 200
  header:
  - name: content-type
    value: text/event-stream; charset=utf-8
  body: |+
    event: message_start
    data: {"message":{"content":[],"id":"msg_REDACTED_3","model":"claude-sonnet-4-6","role":"assistant","stop_details":null,"stop_reason":null,"stop_sequence":null,"type":"message","usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"inference_geo":"global","input_tokens":1321,"output_tokens":1,"service_tier":"standard"}},"type":"message_start"}

    event: content_block_start
    data: {"content_block":{"text":"","type":"text"},"index":0,"type":"content_block_start"}

    event: ping
    data: {"type":"ping"}

    event: content_block_delta
    data: {"delta":{"text":"Got","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":" **48**! Now for the final step — dividing by 3.","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_stop
    data: {"index":0,"type":"content_block_stop"}

    event: content_block_start
    data: {"content_block":{"caller":{"type":"direct"},"id":"toolu_REDACTED_4","input":{},"name":"divide","type":"tool_use"},"index":1,"type":"content_block_start"}

    event: content_block_delta
    data: {"delta":{"partial_json":"","type":"input_json_delta"},"index":1,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"partial_json":"{\"x\": 48","type":"input_json_delta"},"index":1,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"partial_json":", ","type":"input_json_delta"},"index":1,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"partial_json":"\"y\": 3}","type":"input_json_delta"},"index":1,"type":"content_block_delta"}

    event: content_block_stop
    data: {"index":1,"type":"content_block_stop"}

    event: message_delta
    data: {"delta":{"stop_details":null,"stop_reason":"tool_use","stop_sequence":null},"type":"message_delta","usage":{"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":1321,"output_tokens":86}}

    event: message_stop
    data: {"type":"message_stop"}

---
when:
  path: /v1/messages
  method: POST
  query_param: []
  header:
  - name: accept
    value: text/event-stream
  - name: content-type
    value: application/json
  - name: anthropic-version
    value: 2023-06-01
  body: '{"max_tokens":64000,"messages":[{"content":[{"text":"Calculate ((10 - 4) * (3 + 5)) / 3 and describe the result in one short paragraph.","type":"text"}],"role":"user"},{"content":[{"text":"I''ll solve this step by step! Let me start by computing the two independent sub-expressions **(10 - 4)** and **(3 + 5)** simultaneously first.","type":"text"},{"id":"toolu_REDACTED_1","input":{"x":10,"y":4},"name":"subtract","type":"tool_use"},{"id":"toolu_REDACTED_2","input":{"x":3,"y":5},"name":"add","type":"tool_use"}],"role":"assistant"},{"content":[{"content":[{"text":"6","type":"text"}],"tool_use_id":"toolu_REDACTED_1","type":"tool_result"},{"content":[{"text":"8","type":"text"}],"tool_use_id":"toolu_REDACTED_2","type":"tool_result"}],"role":"user"},{"content":[{"text":"Got **6** and **8**! Now I''ll multiply them together.","type":"text"},{"id":"toolu_REDACTED_3","input":{"x":6,"y":8},"name":"multiply","type":"tool_use"}],"role":"assistant"},{"content":[{"content":[{"text":"48","type":"text"}],"tool_use_id":"toolu_REDACTED_3","type":"tool_result"}],"role":"user"},{"content":[{"text":"Got **48**! Now for the final step — dividing by 3.","type":"text"},{"id":"toolu_REDACTED_4","input":{"x":48,"y":3},"name":"divide","type":"tool_use"}],"role":"assistant"},{"content":[{"content":[{"text":"16","type":"text"}],"tool_use_id":"toolu_REDACTED_4","type":"tool_result"}],"role":"user"}],"model":"claude-sonnet-4-6","stream":true,"system":[{"text":"You must use tools for arithmetic.","type":"text"}],"tool_choice":{"type":"auto"},"tools":[{"description":"Add x and y together","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"add"},{"description":"Subtract y from x (i.e.: x - y)","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"subtract"},{"description":"Compute the product of x and y (i.e.: x * y).","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"multiply"},{"description":"Compute the quotient of x and y.","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"x":{"format":"int32","type":"integer"},"y":{"format":"int32","type":"integer"}},"required":["x","y"],"title":"OperationArgs","type":"object"},"name":"divide"}]}'
then:
  status: 200
  header:
  - name: content-type
    value: text/event-stream; charset=utf-8
  body: |+
    event: message_start
    data: {"message":{"content":[],"id":"msg_REDACTED_4","model":"claude-sonnet-4-6","role":"assistant","stop_details":null,"stop_reason":null,"stop_sequence":null,"type":"message","usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"inference_geo":"global","input_tokens":1420,"output_tokens":2,"service_tier":"standard"}},"type":"message_start"}

    event: content_block_start
    data: {"content_block":{"text":"","type":"text"},"index":0,"type":"content_block_start"}

    event: ping
    data: {"type":"ping"}

    event: content_block_delta
    data: {"delta":{"text":"**The","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":" result is 16.** Here's a summary of the calculation:\n\nStarting with the two parent","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":"hetical expressions, subtracting 4 from 10 gives 6, and adding 3 and","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":" 5 gives 8. Multiplying those two results together yields 48, which when","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":" divided by 3 produces a clean, whole-number answer of **","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":"16** — a perfect power of 2 (2⁴), making it a satisf","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":"ying and tidy result!","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_stop
    data: {"index":0,"type":"content_block_stop"}

    event: message_delta
    data: {"delta":{"stop_details":null,"stop_reason":"end_turn","stop_sequence":null},"type":"message_delta","usage":{"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":1420,"output_tokens":110}}

    event: message_stop
    data: {"type":"message_stop"}

