when:
  path: /v1beta/interactions
  method: POST
  query_param:
  - name: alt
    value: sse
  header:
  - name: accept
    value: text/event-stream
  - name: content-type
    value: application/json
  body: '{"generation_config":{"temperature":0.4},"input":[{"content":[{"text":"Write a 3-line poem about rust and rivers.","type":"text"}],"type":"user_input"}],"model":"gemini-3-flash-preview","stream":true}'
then:
  status: 200
  header:
  - name: content-type
    value: text/event-stream
  body: |+
    event: interaction.created
    data: {"event_type":"interaction.created","interaction":{"id":"v1_REDACTED_1","model":"gemini-3-flash-preview","object":"interaction","status":"in_progress"},"metadata":{"total_usage":{"input_tokens_by_modality":[{"modality":"text","tokens":13}],"total_cached_tokens":0,"total_input_tokens":13,"total_output_tokens":18,"total_thought_tokens":604,"total_tokens":635,"total_tool_use_tokens":0}}}

    event: interaction.status_update
    data: {"event_type":"interaction.status_update","interaction_id":"v1_REDACTED_1","status":"in_progress"}

    event: step.start
    data: {"event_type":"step.start","index":0,"step":{"type":"thought"}}

    event: step.delta
    data: {"delta":{"signature":"signature_REDACTED_1","type":"thought_signature"},"event_type":"step.delta","index":0}

    event: step.stop
    data: {"event_type":"step.stop","index":0}

    event: step.start
    data: {"event_type":"step.start","index":1,"step":{"type":"model_output"}}

    event: step.delta
    data: {"delta":{"text":"Red dust flakes from the iron bridge,\nStaining the river’s silver skin,","type":"text"},"event_type":"step.delta","index":1}

    event: step.delta
    data: {"delta":{"text":"\nAs time dissolves into the flow.","type":"text"},"event_type":"step.delta","index":1}

    event: step.stop
    data: {"event_type":"step.stop","index":1,"metadata":{"total_usage":{"input_tokens_by_modality":[{"modality":"text","tokens":13}],"total_cached_tokens":0,"total_input_tokens":13,"total_output_tokens":26,"total_thought_tokens":604,"total_tokens":643,"total_tool_use_tokens":0}}}

    event: interaction.completed
    data: {"event_type":"interaction.completed","interaction":{"created":"1970-01-01T00:00:00Z","id":"v1_REDACTED_1","model":"gemini-3-flash-preview","object":"interaction","service_tier":"standard","status":"completed","updated":"1970-01-01T00:00:00Z","usage":{"input_tokens_by_modality":[{"modality":"text","tokens":13}],"total_cached_tokens":0,"total_input_tokens":13,"total_output_tokens":26,"total_thought_tokens":604,"total_tokens":643,"total_tool_use_tokens":0}}}

    event: done
    data: [DONE]

