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":"In one short paragraph, explain what a solar eclipse is.","type":"text"}],"role":"user"}],"model":"claude-sonnet-4-6","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-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":33,"output_tokens":4,"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 occurs","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":" when the Moon passes directly between the Earth and the Sun, temporarily blocking the Sun's light from reaching certain","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":" parts of Earth's surface. During a total solar eclipse, the Moon completely covers the Sun's disk, casting a shadow on Earth and briefly","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":" turning day into an eerie darkness, allowing observers","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":" in the path of totality to see the Sun's outer atmosphere, called the corona.","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":" Partial and annular eclipses occur when the alignment is slightly off or the Moon is far","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":"ther from Earth, resulting in only a portion of the Sun being covered or a ring","type":"text_delta"},"index":0,"type":"content_block_delta"}

    event: content_block_delta
    data: {"delta":{"text":" of sunlight remaining visible around the Moon's silhouette.","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":33,"output_tokens":134}}

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

