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":128000,"messages":[{"content":[{"text":"In one short paragraph, explain what a solar eclipse is.","type":"text"}],"role":"user"}],"model":"claude-opus-4-7","stream":true,"system":[{"text":"You are a concise assistant. Answer directly in plain text.","type":"text"}]}'
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-opus-4-7","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":51,"output_tokens":8,"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":"A solar eclipse occ","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":"urs when the Moon passes between the Sun and Earth, blocking all or part of the Sun's light from reaching a specific area on Earth's surface.","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":" Depending on the alignment and the Moon's distance from Earth, the eclipse can be total (the Sun is completely cov","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":"ered), partial (only a portion is obscured), or annular (the Moon appears smaller than the Sun, leaving a bright ring around","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":" it). Solar eclipses can only happen during a new moon and are relatively rare at any given location","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":".","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":51,"output_tokens":170}}

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

