Skip to main content

Events

Every event has an event: line with its type and a data: line with a JSON object that repeats the type and carries a sequence_number. A text answer produces:
  1. response.created
  2. response.output_item.added, then response.content_part.added
  3. response.output_text.delta, many times
  4. response.output_text.done, response.content_part.done, response.output_item.done
  5. response.completed, with the full response and its usage
Other items add their own events: response.function_call_arguments.delta and .done for tool calls, response.reasoning_summary_text.delta and response.reasoning_text.delta for reasoning, and response.web_search_call.in_progress, .searching and .completed for search. The stream ends with response.completed, response.incomplete (for example at max_output_tokens) or response.failed. There is no data: [DONE] line. If a provider fails after the stream has started, an error event arrives before response.failed.