Skip to content

Streaming events

When you create a Response with stream set to true, the server will emit server-sent events to the client as the Response is generated. This section contains the events that are emitted by the server.

Events

  • response.created: Emitted when a response is created.
  • response.in_progress: Emitted when the response is in progress.
  • response.completed: Emitted when the model response is complete.
  • response.failed: Emitted when the response fails.
  • response.incomplete: Emitted when the response is incomplete.
  • response.output_item.added: Emitted when an output item is added.
  • response.output_item.done: Emitted when an output item is done.
  • response.content_part.added: Emitted when a content part is added.
  • response.content_part.done: Emitted when a content part is done.
  • response.output_text.delta: Emitted for incremental output text deltas.
  • response.output_text.done: Emitted when output text is finalized.
  • response.refusal.delta: Emitted for incremental refusal deltas.
  • response.refusal.done: Emitted when a refusal is finalized.
  • response.function_call_arguments.delta: Emitted for incremental function call arguments.
  • response.function_call_arguments.done: Emitted when function call arguments are finalized.
  • response.file_search_call.in_progress: Emitted when a file search call starts.
  • response.file_search_call.searching: Emitted while a file search call is searching.
  • response.file_search_call.completed: Emitted when a file search call completes.
  • response.web_search_call.in_progress: Emitted when a web search call starts.
  • response.web_search_call.searching: Emitted while a web search call is searching.
  • response.web_search_call.completed: Emitted when a web search call completes.
  • response.reasoning_summary_part.added: Emitted when a reasoning summary part is added.
  • response.reasoning_summary_part.done: Emitted when a reasoning summary part is done.
  • response.reasoning_summary_text.delta: Emitted for incremental reasoning summary text.
  • response.reasoning_summary_text.done: Emitted when reasoning summary text is finalized.
  • response.reasoning_text.delta: Emitted for incremental reasoning text.
  • response.reasoning_text.done: Emitted when reasoning text is finalized.
  • response.image_generation_call.in_progress: Emitted when image generation starts.
  • response.image_generation_call.generating: Emitted while image generation is in progress.
  • response.image_generation_call.partial_image: Emitted for partial image data.
  • response.image_generation_call.completed: Emitted when image generation completes.
  • response.mcp_call_arguments.delta: Emitted for incremental MCP call arguments.
  • response.mcp_call_arguments.done: Emitted when MCP call arguments are finalized.
  • response.mcp_call.in_progress: Emitted when an MCP call starts.
  • response.mcp_call.completed: Emitted when an MCP call completes.
  • response.mcp_call.failed: Emitted when an MCP call fails.
  • response.mcp_list_tools.in_progress: Emitted when MCP tool listing starts.
  • response.mcp_list_tools.completed: Emitted when MCP tool listing completes.
  • response.mcp_list_tools.failed: Emitted when MCP tool listing fails.
  • response.code_interpreter_call.in_progress: Emitted when a code interpreter call starts.
  • response.code_interpreter_call.interpreting: Emitted while code interpreter is running.
  • response.code_interpreter_call.completed: Emitted when a code interpreter call completes.
  • response.code_interpreter_call_code.delta: Emitted for incremental code interpreter output.
  • response.code_interpreter_call_code.done: Emitted when code interpreter output is finalized.
  • response.output_text.annotation.added: Emitted when an output text annotation is added.
  • response.output_text.annotation.queued: Emitted when an output text annotation is queued.
  • response.custom_tool_call_input.delta: Emitted for incremental custom tool call input.
  • response.custom_tool_call_input.done: Emitted when custom tool call input is finalized.
  • error: Emitted when an error occurs. See the error object.

那年我双手插兜, 让bug稳如老狗