[
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_start (thinking)",
  "description": "Opens a thinking block (index i). With display omitted the block starts and only deltas with empty thinking follow.",
  "schema": {
   "type": "content_block_start",
   "index": "int",
   "content_block": {
    "type": "thinking",
    "thinking": "",
    "signature": ""
   }
  },
  "example": {
   "type": "content_block_start",
   "index": 0,
   "content_block": {
    "type": "thinking",
    "thinking": "",
    "signature": ""
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "verification": {
   "method": "live_api",
   "verified_at": "2026-09-18",
   "result": "success",
   "http_status": 200,
   "request_note": "think_02_enabled_stream"
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/thinking",
  "last_verified": "2026-09-18",
  "_fragment": "generated/fragments/streaming-events/anthropic-advanced.json"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_delta: thinking_delta",
  "description": "Incremental summarized thinking text (empty string under display omitted; progress-update text under display updates).",
  "schema": {
   "type": "content_block_delta",
   "index": "int",
   "delta": {
    "type": "thinking_delta",
    "thinking": "string"
   }
  },
  "example": {
   "type": "content_block_delta",
   "index": 0,
   "delta": {
    "type": "thinking_delta",
    "thinking": "The user is asking"
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "verification": {
   "method": "live_api",
   "verified_at": "2026-09-18",
   "result": "success",
   "http_status": 200,
   "request_note": "10 thinking_delta events observed on Haiku"
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/thinking",
  "last_verified": "2026-09-18",
  "_fragment": "generated/fragments/streaming-events/anthropic-advanced.json"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_delta: signature_delta",
  "description": "Single event carrying the encrypted signature, sent just before the thinking block's content_block_stop.",
  "schema": {
   "type": "content_block_delta",
   "index": "int",
   "delta": {
    "type": "signature_delta",
    "signature": "string"
   }
  },
  "example": {
   "type": "content_block_delta",
   "index": 0,
   "delta": {
    "type": "signature_delta",
    "signature": "EuUCCpoBCBEYAipABXfZ…"
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "verification": {
   "method": "live_api",
   "verified_at": "2026-09-18",
   "result": "success",
   "http_status": 200,
   "request_note": ""
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/thinking",
  "last_verified": "2026-09-18",
  "_fragment": "generated/fragments/streaming-events/anthropic-advanced.json"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_start (redacted_thinking)",
  "description": "Safety-redacted thinking block; data arrives complete in content_block_start (no readable deltas).",
  "schema": {
   "type": "content_block_start",
   "index": "int",
   "content_block": {
    "type": "redacted_thinking",
    "data": "string"
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED"
  ],
  "verification": null,
  "source": "https://platform.claude.com/docs/en/build-with-claude/thinking",
  "last_verified": "2026-09-18",
  "_fragment": "generated/fragments/streaming-events/anthropic-advanced.json"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_delta: citations_delta",
  "description": "One citation to append to the current text block's citations list.",
  "schema": {
   "type": "content_block_delta",
   "index": "int",
   "delta": {
    "type": "citations_delta",
    "citation": "char_location | page_location | content_block_location | search_result_location | web_search_result_location"
   }
  },
  "example": {
   "type": "content_block_delta",
   "index": 0,
   "delta": {
    "type": "citations_delta",
    "citation": {
     "type": "char_location",
     "cited_text": "Grass is green.",
     "document_index": 0,
     "document_title": "Colors",
     "start_char_index": 17,
     "end_char_index": 32
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "verification": {
   "method": "live_api",
   "verified_at": "2026-09-18",
   "result": "success",
   "http_status": 200,
   "request_note": "cite_05_stream_citations_delta"
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/citations",
  "last_verified": "2026-09-18",
  "_fragment": "generated/fragments/streaming-events/anthropic-advanced.json"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_start/delta/stop (compaction, threshold)",
  "description": "Threshold compaction block streams as content_block_start, then ONE content_block_delta carrying the whole summary, then content_block_stop.",
  "schema": {
   "content_block_start": {
    "content_block": {
     "type": "compaction"
    }
   },
   "content_block_delta": {
    "delta": {
     "type": "compaction_delta (BetaCompactionContentBlockDelta)",
     "content": "full summary"
    }
   },
   "content_block_stop": {}
  },
  "example": null,
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "verification": null,
  "source": "https://platform.claude.com/docs/en/build-with-claude/compaction",
  "last_verified": "2026-09-18",
  "_fragment": "generated/fragments/streaming-events/anthropic-advanced.json"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_start (compaction, on-demand)",
  "description": "With compact-2026-09-04 the signed block arrives whole in content_block_start followed by content_block_stop; no deltas; ping events may interleave.",
  "schema": {
   "type": "content_block_start",
   "content_block": {
    "type": "compaction",
    "content": "string",
    "signature": "string"
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "verification": null,
  "source": "https://platform.claude.com/docs/en/build-with-claude/compaction",
  "last_verified": "2026-09-18",
  "_fragment": "generated/fragments/streaming-events/anthropic-advanced.json"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "message_delta (usage.output_tokens_details / context_management)",
  "description": "Final message_delta carries output_tokens_details.thinking_tokens, and context_management.applied_edits when context editing ran; input_transformations only after a mid-stream fallback.",
  "schema": {
   "type": "message_delta",
   "delta": {
    "stop_reason": "end_turn|max_tokens|compaction|model_context_window_exceeded|…",
    "stop_sequence": null,
    "stop_details": null,
    "container": null
   },
   "usage": {
    "input_tokens": "int",
    "cache_creation_input_tokens": "int",
    "cache_read_input_tokens": "int",
    "output_tokens": "int",
    "output_tokens_details": {
     "thinking_tokens": "int"
    }
   },
   "context_management": {
    "applied_edits": []
   }
  },
  "example": {
   "type": "message_delta",
   "delta": {
    "stop_reason": "end_turn",
    "stop_sequence": null,
    "stop_details": null,
    "container": null
   },
   "usage": {
    "input_tokens": 48,
    "cache_creation_input_tokens": 0,
    "cache_read_input_tokens": 0,
    "output_tokens": 40,
    "output_tokens_details": {
     "thinking_tokens": 33
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "verification": {
   "method": "live_api",
   "verified_at": "2026-09-18",
   "result": "success",
   "http_status": 200,
   "request_note": ""
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/thinking",
  "last_verified": "2026-09-18",
  "_fragment": "generated/fragments/streaming-events/anthropic-advanced.json"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "message_start (usage cache fields / input_transformations)",
  "description": "message_start.message.usage carries cache_creation_input_tokens, cache_read_input_tokens and cache_creation.{ephemeral_5m,1h}_input_tokens; under thinking-binding-controls the message carries input_transformations.",
  "schema": {
   "type": "message_start",
   "message": {
    "usage": {
     "cache_creation_input_tokens": "int",
     "cache_read_input_tokens": "int",
     "cache_creation": {}
    },
    "input_transformations": "[] (beta)"
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "verification": {
   "method": "live_api",
   "verified_at": "2026-09-18",
   "result": "success",
   "http_status": 200,
   "request_note": ""
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/prompt-caching",
  "last_verified": "2026-09-18",
  "_fragment": "generated/fragments/streaming-events/anthropic-advanced.json"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_delta: text_delta (structured outputs)",
  "description": "JSON outputs stream as ordinary text_delta chunks of the JSON string; accumulate before parsing.",
  "schema": {
   "type": "content_block_delta",
   "delta": {
    "type": "text_delta",
    "text": "{\"name\":\""
   }
  },
  "example": {
   "type": "content_block_delta",
   "index": 0,
   "delta": {
    "type": "text_delta",
    "text": "{\""
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "verification": {
   "method": "live_api",
   "verified_at": "2026-09-18",
   "result": "success",
   "http_status": 200,
   "request_note": "so_02_json_schema_stream"
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/structured-outputs",
  "last_verified": "2026-09-18",
  "_fragment": "generated/fragments/streaming-events/anthropic-advanced.json"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "user.message",
  "description": "A user message with text, image, or document content. Starts or continues the agent's work; also accepted in a session's / deployment's `initial_events`. Reference: A user message event in the session conversation.",
  "schema": {
   "official_type_name": "BetaManagedAgentsUserMessageEvent",
   "fields": {
    "type": {
     "type": "\"user.message\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "content": {
     "type": "array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock",
     "required": true,
     "description": "Array of content blocks comprising the user message.",
     "fields": {
      "<BetaManagedAgentsTextBlock>": {
       "type": "BetaManagedAgentsTextBlock object",
       "description": "Regular text content.",
       "fields": {
        "type": {
         "type": "\"text\"",
         "required": true
        },
        "text": {
         "type": "string",
         "required": true,
         "description": "The text content."
        }
       }
      },
      "<BetaManagedAgentsImageBlock>": {
       "type": "BetaManagedAgentsImageBlock object",
       "description": "Image content specified directly as base64 data or as a reference via a URL.",
       "fields": {
        "type": {
         "type": "\"image\"",
         "required": true
        },
        "source": {
         "type": "BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource",
         "required": true,
         "description": "Union type for image source variants.",
         "fields": {
          "<BetaManagedAgentsBase64ImageSource>": {
           "type": "BetaManagedAgentsBase64ImageSource object",
           "description": "Base64-encoded image data."
          },
          "<BetaManagedAgentsURLImageSource>": {
           "type": "BetaManagedAgentsURLImageSource object",
           "description": "Image referenced by URL."
          },
          "<BetaManagedAgentsFileImageSource>": {
           "type": "BetaManagedAgentsFileImageSource object",
           "description": "Image referenced by file ID."
          }
         }
        }
       }
      },
      "<BetaManagedAgentsDocumentBlock>": {
       "type": "BetaManagedAgentsDocumentBlock object",
       "description": "Document content, either specified directly as base64 data, as text, or as a reference via a URL.",
       "fields": {
        "type": {
         "type": "\"document\"",
         "required": true
        },
        "source": {
         "type": "BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource",
         "required": true,
         "description": "Union type for document source variants.",
         "fields": {
          "<BetaManagedAgentsBase64DocumentSource>": {
           "type": "BetaManagedAgentsBase64DocumentSource object",
           "description": "Base64-encoded document data."
          },
          "<BetaManagedAgentsPlainTextDocumentSource>": {
           "type": "BetaManagedAgentsPlainTextDocumentSource object",
           "description": "Plain text document content."
          },
          "<BetaManagedAgentsURLDocumentSource>": {
           "type": "BetaManagedAgentsURLDocumentSource object",
           "description": "Document referenced by URL."
          },
          "<BetaManagedAgentsFileDocumentSource>": {
           "type": "BetaManagedAgentsFileDocumentSource object",
           "description": "Document referenced by file ID."
          }
         }
        },
        "context": {
         "type": "string or null",
         "description": "Additional context about the document for the model."
        },
        "title": {
         "type": "string or null",
         "description": "The title of the document."
        }
       }
      },
      "<BetaManagedAgentsRedactedBlock>": {
       "type": "BetaManagedAgentsRedactedBlock object",
       "description": "Placeholder for content withheld by Anthropic model policy.",
       "fields": {
        "type": {
         "type": "\"redacted\"",
         "required": true
        }
       }
      }
     }
    },
    "processed_at": {
     "type": "string or null",
     "description": "A timestamp in RFC 3339 format"
    }
   }
  },
  "schema_name": "BetaManagedAgentsUserMessageEvent",
  "example": {
   "type": "user.message",
   "content": [
    {
     "type": "text",
     "text": "List the files in the working directory."
    }
   ]
  },
  "notes": "Client-originated event as echoed/persisted on the stream and in GET /v1/sessions/{id}/events (server-assigned id, processed_at).",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "user.interrupt",
  "description": "Stop the agent mid-execution. Optional `session_thread_id` targets one thread; omitted = every non-archived thread. Interrupted turn ends with session.status_idle stop_reason end_turn (no interrupt-specific stop reason). Reference: An interrupt event that pauses agent execution and returns control to the user.",
  "schema": {
   "official_type_name": "BetaManagedAgentsUserInterruptEvent",
   "fields": {
    "type": {
     "type": "\"user.interrupt\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "processed_at": {
     "type": "string or null",
     "description": "A timestamp in RFC 3339 format"
    },
    "session_thread_id": {
     "type": "string or null",
     "description": "If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread."
    }
   }
  },
  "schema_name": "BetaManagedAgentsUserInterruptEvent",
  "example": {
   "type": "user.interrupt"
  },
  "notes": "Client-originated event as echoed/persisted on the stream and in GET /v1/sessions/{id}/events (server-assigned id, processed_at).",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "user.tool_confirmation",
  "description": "Approve (`allow`) or deny (`deny`, optional `deny_message`) an `agent.tool_use` / `agent.mcp_tool_use` whose `evaluated_permission` is \"ask\" (policy always_ask, or auto with no determination). 400 if the target event is not in \"ask\". Reference: A tool confirmation event that approves or denies a pending tool execution.",
  "schema": {
   "official_type_name": "BetaManagedAgentsUserToolConfirmationEvent",
   "fields": {
    "type": {
     "type": "\"user.tool_confirmation\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "result": {
     "type": "\"allow\" or \"deny\"",
     "required": true,
     "enum": [
      "allow",
      "deny"
     ],
     "description": "UserToolConfirmationResult enum"
    },
    "tool_use_id": {
     "type": "string",
     "required": true,
     "description": "The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field."
    },
    "deny_message": {
     "type": "string or null",
     "description": "Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'."
    },
    "processed_at": {
     "type": "string or null",
     "description": "A timestamp in RFC 3339 format"
    },
    "session_thread_id": {
     "type": "string or null",
     "description": "Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread."
    }
   }
  },
  "schema_name": "BetaManagedAgentsUserToolConfirmationEvent",
  "example": {
   "type": "user.tool_confirmation",
   "tool_use_id": "sevt_01def...",
   "result": "allow"
  },
  "notes": "Client-originated event as echoed/persisted on the stream and in GET /v1/sessions/{id}/events (server-assigned id, processed_at).",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "user.custom_tool_result",
  "description": "Response to an `agent.custom_tool_use` event; pass the event id as `custom_tool_use_id`. Processed on receipt (processed_at populated in the echo). Reference: Event sent by the client providing the result of a custom tool execution.",
  "schema": {
   "official_type_name": "BetaManagedAgentsUserCustomToolResultEvent",
   "fields": {
    "type": {
     "type": "\"user.custom_tool_result\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "custom_tool_use_id": {
     "type": "string",
     "required": true,
     "description": "The id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field."
    },
    "content": {
     "type": "array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock",
     "description": "The result content returned by the tool.",
     "fields": {
      "<BetaManagedAgentsTextBlock>": {
       "type": "BetaManagedAgentsTextBlock object",
       "description": "Regular text content."
      },
      "<BetaManagedAgentsImageBlock>": {
       "type": "BetaManagedAgentsImageBlock object",
       "description": "Image content specified directly as base64 data or as a reference via a URL."
      },
      "<BetaManagedAgentsDocumentBlock>": {
       "type": "BetaManagedAgentsDocumentBlock object",
       "description": "Document content, either specified directly as base64 data, as text, or as a reference via a URL."
      },
      "<BetaManagedAgentsSearchResultBlock>": {
       "type": "BetaManagedAgentsSearchResultBlock object",
       "description": "A block containing a web search result.",
       "fields": {
        "type": {
         "type": "\"search_result\"",
         "required": true
        },
        "citations": {
         "type": "BetaManagedAgentsSearchResultCitations",
         "required": true,
         "description": "Citation settings for a search result.",
         "fields": {
          "enabled": {
           "type": "boolean",
           "required": true,
           "description": "Whether citations are enabled for this search result."
          }
         }
        },
        "content": {
         "type": "array of BetaManagedAgentsSearchResultContent",
         "required": true,
         "description": "Array of text content blocks from the search result.",
         "fields": {
          "type": {
           "type": "\"text\"",
           "required": true
          },
          "text": {
           "type": "string",
           "required": true,
           "description": "The text content."
          }
         }
        },
        "source": {
         "type": "string",
         "required": true,
         "description": "The URL source of the search result."
        },
        "title": {
         "type": "string",
         "required": true,
         "description": "The title of the search result."
        }
       }
      }
     }
    },
    "is_error": {
     "type": "boolean or null",
     "description": "Whether the tool execution resulted in an error."
    },
    "processed_at": {
     "type": "string or null",
     "description": "A timestamp in RFC 3339 format"
    },
    "session_thread_id": {
     "type": "string or null",
     "description": "Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread."
    }
   }
  },
  "schema_name": "BetaManagedAgentsUserCustomToolResultEvent",
  "example": {
   "type": "user.custom_tool_result",
   "custom_tool_use_id": "sevt_01...",
   "content": [
    {
     "type": "text",
     "text": "72F and sunny"
    }
   ]
  },
  "notes": "Client-originated event as echoed/persisted on the stream and in GET /v1/sessions/{id}/events (server-assigned id, processed_at).",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "agent.custom_tool_use",
  "description": "Agent invokes one of your custom tools; session pauses (stop_reason requires_action, event_ids) until you send user.custom_tool_result. No permission fields (policies do not govern custom tools). Reference: Event emitted when the agent calls a custom tool. The session goes idle until the client sends a `user.custom_tool_result` event with the result.",
  "schema": {
   "official_type_name": "BetaManagedAgentsAgentCustomToolUseEvent",
   "fields": {
    "type": {
     "type": "\"agent.custom_tool_use\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "input": {
     "type": "map[unknown]",
     "required": true,
     "description": "Input parameters for the tool call."
    },
    "name": {
     "type": "string",
     "required": true,
     "description": "Name of the custom tool being called."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "session_thread_id": {
     "type": "string or null",
     "description": "When set, this event was cross-posted from a subagent's thread to surface its custom tool use on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.custom_tool_result` by `custom_tool_use_id`, so clients do not send it back."
    }
   }
  },
  "schema_name": "BetaManagedAgentsAgentCustomToolUseEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "agent.message",
  "description": "Agent response content blocks (text or redacted). Buffered: emitted after the model request finishes; authoritative record that reconciles any event_delta preview. Reference: An agent response event in the session conversation.",
  "schema": {
   "official_type_name": "BetaManagedAgentsAgentMessageEvent",
   "fields": {
    "type": {
     "type": "\"agent.message\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "content": {
     "type": "array of BetaManagedAgentsTextBlock or BetaManagedAgentsRedactedBlock",
     "required": true,
     "description": "Array of text blocks comprising the agent response.",
     "fields": {
      "<BetaManagedAgentsTextBlock>": {
       "type": "BetaManagedAgentsTextBlock object",
       "description": "Regular text content."
      },
      "<BetaManagedAgentsRedactedBlock>": {
       "type": "BetaManagedAgentsRedactedBlock object",
       "description": "Placeholder for content withheld by Anthropic model policy."
      }
     }
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    }
   }
  },
  "schema_name": "BetaManagedAgentsAgentMessageEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "agent.thinking",
  "description": "Progress signal that the agent is making forward progress through extended thinking. Carries no thinking content. Reference: Indicates the agent is making forward progress via extended thinking. A progress signal, not a content carrier.",
  "schema": {
   "official_type_name": "BetaManagedAgentsAgentThinkingEvent",
   "fields": {
    "type": {
     "type": "\"agent.thinking\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    }
   }
  },
  "schema_name": "BetaManagedAgentsAgentThinkingEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "agent.mcp_tool_use",
  "description": "Agent invokes an MCP server tool (`mcp_server_name`, `name`). Carries `evaluated_permission` and `evaluation`; MCP toolsets default to always_ask. Reference: Event emitted when the agent invokes a tool provided by an MCP server.",
  "schema": {
   "official_type_name": "BetaManagedAgentsAgentMCPToolUseEvent",
   "fields": {
    "type": {
     "type": "\"agent.mcp_tool_use\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "input": {
     "type": "map[unknown]",
     "required": true,
     "description": "Input parameters for the tool call."
    },
    "mcp_server_name": {
     "type": "string",
     "required": true,
     "description": "Name of the MCP server providing the tool."
    },
    "name": {
     "type": "string",
     "required": true,
     "description": "Name of the MCP tool being used."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "evaluated_permission": {
     "type": "\"allow\" or \"ask\" or \"deny\"",
     "enum": [
      "allow",
      "ask",
      "deny"
     ],
     "description": "AgentEvaluatedPermission enum"
    },
    "evaluation": {
     "type": "BetaManagedAgentsAgentToolEvaluation",
     "description": "Names the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.",
     "fields": {
      "<BetaManagedAgentsAgentToolEvaluationAlwaysAllow>": {
       "type": "BetaManagedAgentsAgentToolEvaluationAlwaysAllow object",
       "description": "The resolved permission_policy was always_allow; accompanies evaluated_permission \"allow\".",
       "fields": {
        "type": {
         "type": "\"always_allow\"",
         "required": true
        }
       }
      },
      "<BetaManagedAgentsAgentToolEvaluationAlwaysAsk>": {
       "type": "BetaManagedAgentsAgentToolEvaluationAlwaysAsk object",
       "description": "The resolved permission_policy was always_ask; accompanies evaluated_permission \"ask\".",
       "fields": {
        "type": {
         "type": "\"always_ask\"",
         "required": true
        }
       }
      },
      "<BetaManagedAgentsAgentToolEvaluationAuto>": {
       "type": "BetaManagedAgentsAgentToolEvaluationAuto object",
       "description": "The resolved permission_policy was auto: the server judged this invocation individually.",
       "fields": {
        "type": {
         "type": "\"auto\"",
         "required": true
        },
        "evaluated_permission": {
         "type": "BetaManagedAgentsAgentAutoEvaluatedPermission",
         "required": true,
         "description": "The server's per-invocation judgement under the auto permission policy. Its type always equals the event's top-level evaluated_permission. Open union: clients must tolerate unknown variants.",
         "fields": {
          "<BetaManagedAgentsAgentAutoEvaluatedPermissionAllow>": {
           "type": "BetaManagedAgentsAgentAutoEvaluatedPermissionAllow object",
           "description": "The server judged the invocation safe to execute without client approval."
          },
          "<BetaManagedAgentsAgentAutoEvaluatedPermissionAsk>": {
           "type": "BetaManagedAgentsAgentAutoEvaluatedPermissionAsk object",
           "description": "The server reached no judgement; the invocation is held for client approval."
          },
          "<BetaManagedAgentsAgentAutoEvaluatedPermissionDeny>": {
           "type": "BetaManagedAgentsAgentAutoEvaluatedPermissionDeny object",
           "description": "The server judged the invocation high-risk; it does not execute and a synthetic error tool result is appended."
          }
         }
        }
       }
      }
     }
    },
    "session_thread_id": {
     "type": "string or null",
     "description": "When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` by `tool_use_id`, so clients do not send it back."
    }
   }
  },
  "schema_name": "BetaManagedAgentsAgentMCPToolUseEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "agent.mcp_tool_result",
  "description": "Result of an MCP tool execution (`mcp_tool_use_id`). Reference: Event representing the result of an MCP tool execution.",
  "schema": {
   "official_type_name": "BetaManagedAgentsAgentMCPToolResultEvent",
   "fields": {
    "type": {
     "type": "\"agent.mcp_tool_result\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "mcp_tool_use_id": {
     "type": "string",
     "required": true,
     "description": "The id of the `agent.mcp_tool_use` event this result corresponds to."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "content": {
     "type": "array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock",
     "description": "The result content returned by the tool.",
     "fields": {
      "<BetaManagedAgentsTextBlock>": {
       "type": "BetaManagedAgentsTextBlock object",
       "description": "Regular text content."
      },
      "<BetaManagedAgentsImageBlock>": {
       "type": "BetaManagedAgentsImageBlock object",
       "description": "Image content specified directly as base64 data or as a reference via a URL."
      },
      "<BetaManagedAgentsDocumentBlock>": {
       "type": "BetaManagedAgentsDocumentBlock object",
       "description": "Document content, either specified directly as base64 data, as text, or as a reference via a URL."
      },
      "<BetaManagedAgentsSearchResultBlock>": {
       "type": "BetaManagedAgentsSearchResultBlock object",
       "description": "A block containing a web search result."
      }
     }
    },
    "is_error": {
     "type": "boolean or null",
     "description": "Whether the tool execution resulted in an error."
    }
   }
  },
  "schema_name": "BetaManagedAgentsAgentMCPToolResultEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "agent.tool_use",
  "description": "Agent invokes a pre-built agent tool (bash, read, write, edit, glob, grep, web_search, web_fetch). Carries `evaluated_permission` (allow|ask|deny) and usually `evaluation` (policy that produced it). If \"ask\", the session goes idle with stop_reason requires_action until a user.tool_confirmation arrives. Reference: Event emitted when the agent invokes a built-in agent tool.",
  "schema": {
   "official_type_name": "BetaManagedAgentsAgentToolUseEvent",
   "fields": {
    "type": {
     "type": "\"agent.tool_use\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "input": {
     "type": "map[unknown]",
     "required": true,
     "description": "Input parameters for the tool call."
    },
    "name": {
     "type": "string",
     "required": true,
     "description": "Name of the agent tool being used."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "evaluated_permission": {
     "type": "\"allow\" or \"ask\" or \"deny\"",
     "enum": [
      "allow",
      "ask",
      "deny"
     ],
     "description": "AgentEvaluatedPermission enum"
    },
    "evaluation": {
     "type": "BetaManagedAgentsAgentToolEvaluation",
     "description": "Names the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants."
    },
    "session_thread_id": {
     "type": "string or null",
     "description": "When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` or `user.tool_result` by `tool_use_id`, so clients do not send it back."
    }
   }
  },
  "schema_name": "BetaManagedAgentsAgentToolUseEvent",
  "example": {
   "type": "agent.tool_use",
   "id": "sevt_01def...",
   "name": "bash",
   "input": {
    "command": "pip install -r requirements.txt"
   },
   "evaluated_permission": "ask",
   "evaluation": {
    "type": "always_ask"
   },
   "processed_at": "2026-03-25T14:01:45Z"
  },
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "agent.tool_result",
  "description": "Result of a pre-built agent tool execution (`tool_use_id` links to agent.tool_use). `is_error: true` with error code text e.g. `url_not_allowed` for blocked web_fetch domains. Outputs over 100,000 chars are written to a sandbox file and truncated in the event. Reference: Event representing the result of an agent tool execution.",
  "schema": {
   "official_type_name": "BetaManagedAgentsAgentToolResultEvent",
   "fields": {
    "type": {
     "type": "\"agent.tool_result\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "tool_use_id": {
     "type": "string",
     "required": true,
     "description": "The id of the `agent.tool_use` event this result corresponds to."
    },
    "content": {
     "type": "array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock",
     "description": "The result content returned by the tool.",
     "fields": {
      "<BetaManagedAgentsTextBlock>": {
       "type": "BetaManagedAgentsTextBlock object",
       "description": "Regular text content."
      },
      "<BetaManagedAgentsImageBlock>": {
       "type": "BetaManagedAgentsImageBlock object",
       "description": "Image content specified directly as base64 data or as a reference via a URL."
      },
      "<BetaManagedAgentsDocumentBlock>": {
       "type": "BetaManagedAgentsDocumentBlock object",
       "description": "Document content, either specified directly as base64 data, as text, or as a reference via a URL."
      },
      "<BetaManagedAgentsSearchResultBlock>": {
       "type": "BetaManagedAgentsSearchResultBlock object",
       "description": "A block containing a web search result."
      }
     }
    },
    "is_error": {
     "type": "boolean or null",
     "description": "Whether the tool execution resulted in an error."
    }
   }
  },
  "schema_name": "BetaManagedAgentsAgentToolResultEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "agent.thread_message_received",
  "description": "Multiagent: a message from another thread arrived on the thread whose stream carries this event; on the primary thread, an agent (or the `anthropic.advisor` thread) sent a report/question/advice to the coordinator. Reference: Delivery event written to the target thread's input stream when an agent-to-agent message arrives.",
  "schema": {
   "official_type_name": "BetaManagedAgentsAgentThreadMessageReceivedEvent",
   "fields": {
    "type": {
     "type": "\"agent.thread_message_received\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "content": {
     "type": "array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock",
     "required": true,
     "description": "Message content blocks.",
     "fields": {
      "<BetaManagedAgentsTextBlock>": {
       "type": "BetaManagedAgentsTextBlock object",
       "description": "Regular text content."
      },
      "<BetaManagedAgentsImageBlock>": {
       "type": "BetaManagedAgentsImageBlock object",
       "description": "Image content specified directly as base64 data or as a reference via a URL."
      },
      "<BetaManagedAgentsDocumentBlock>": {
       "type": "BetaManagedAgentsDocumentBlock object",
       "description": "Document content, either specified directly as base64 data, as text, or as a reference via a URL."
      },
      "<BetaManagedAgentsRedactedBlock>": {
       "type": "BetaManagedAgentsRedactedBlock object",
       "description": "Placeholder for content withheld by Anthropic model policy."
      }
     }
    },
    "from_session_thread_id": {
     "type": "string",
     "required": true,
     "description": "Public `sthr_` ID of the thread that sent the message."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "from_agent_name": {
     "type": "string or null",
     "description": "Name of the callable agent this message came from. Absent when received from the primary agent."
    }
   }
  },
  "schema_name": "BetaManagedAgentsAgentThreadMessageReceivedEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "agent.thread_message_sent",
  "description": "Multiagent: the thread whose stream carries this event sent a message to another thread; on the primary thread, the coordinator sent a task or follow-up to another agent. Reference: Observability event emitted to the sender's output stream when an agent-to-agent message is sent.",
  "schema": {
   "official_type_name": "BetaManagedAgentsAgentThreadMessageSentEvent",
   "fields": {
    "type": {
     "type": "\"agent.thread_message_sent\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "content": {
     "type": "array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock",
     "required": true,
     "description": "Message content blocks.",
     "fields": {
      "<BetaManagedAgentsTextBlock>": {
       "type": "BetaManagedAgentsTextBlock object",
       "description": "Regular text content."
      },
      "<BetaManagedAgentsImageBlock>": {
       "type": "BetaManagedAgentsImageBlock object",
       "description": "Image content specified directly as base64 data or as a reference via a URL."
      },
      "<BetaManagedAgentsDocumentBlock>": {
       "type": "BetaManagedAgentsDocumentBlock object",
       "description": "Document content, either specified directly as base64 data, as text, or as a reference via a URL."
      },
      "<BetaManagedAgentsRedactedBlock>": {
       "type": "BetaManagedAgentsRedactedBlock object",
       "description": "Placeholder for content withheld by Anthropic model policy."
      }
     }
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "to_session_thread_id": {
     "type": "string",
     "required": true,
     "description": "Public `sthr_` ID of the thread the message was sent to."
    },
    "to_agent_name": {
     "type": "string or null",
     "description": "Name of the callable agent this message was sent to. Absent when sent to the primary agent."
    }
   }
  },
  "schema_name": "BetaManagedAgentsAgentThreadMessageSentEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "agent.thread_context_compacted",
  "description": "Conversation history was compacted (summarized) to fit the context window. Reference: Indicates that context compaction (summarization) occurred during the session.",
  "schema": {
   "official_type_name": "BetaManagedAgentsAgentThreadContextCompactedEvent",
   "fields": {
    "type": {
     "type": "\"agent.thread_context_compacted\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    }
   }
  },
  "schema_name": "BetaManagedAgentsAgentThreadContextCompactedEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "session.error",
  "description": "An error occurred; typed `error` object (unknown_error, model_overloaded_error, model_rate_limited_error, model_request_failed_error, mcp_connection_failed_error, mcp_authentication_failed_error, billing_error, credential_host_unreachable_error) with `retry_status` (retrying | exhausted | terminal). Reference: An error event indicating a problem occurred during session execution.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSessionErrorEvent",
   "fields": {
    "type": {
     "type": "\"session.error\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "error": {
     "type": "BetaManagedAgentsUnknownError or BetaManagedAgentsModelOverloadedError or BetaManagedAgentsModelRateLimitedError or 5 more",
     "required": true,
     "fields": {
      "<BetaManagedAgentsUnknownError>": {
       "type": "BetaManagedAgentsUnknownError object",
       "description": "An unknown or unexpected error occurred during session execution. A fallback variant; clients that don't recognize a new error code can match on `retry_status` and `message` alone.",
       "fields": {
        "type": {
         "type": "\"unknown_error\"",
         "required": true
        },
        "message": {
         "type": "string",
         "required": true,
         "description": "Human-readable error description."
        },
        "retry_status": {
         "type": "BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal",
         "required": true,
         "description": "What the client should do next in response to this error.",
         "fields": {
          "<BetaManagedAgentsRetryStatusRetrying>": {
           "type": "BetaManagedAgentsRetryStatusRetrying object",
           "description": "The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out."
          },
          "<BetaManagedAgentsRetryStatusExhausted>": {
           "type": "BetaManagedAgentsRetryStatusExhausted object",
           "description": "This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt."
          },
          "<BetaManagedAgentsRetryStatusTerminal>": {
           "type": "BetaManagedAgentsRetryStatusTerminal object",
           "description": "The session encountered a terminal error and will transition to `terminated` state."
          }
         }
        }
       }
      },
      "<BetaManagedAgentsModelOverloadedError>": {
       "type": "BetaManagedAgentsModelOverloadedError object",
       "description": "The model is currently overloaded. Emitted after automatic retries are exhausted.",
       "fields": {
        "type": {
         "type": "\"model_overloaded_error\"",
         "required": true
        },
        "message": {
         "type": "string",
         "required": true,
         "description": "Human-readable error description."
        },
        "retry_status": {
         "type": "BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal",
         "required": true,
         "description": "What the client should do next in response to this error.",
         "fields": {
          "<BetaManagedAgentsRetryStatusRetrying>": {
           "type": "BetaManagedAgentsRetryStatusRetrying object",
           "description": "The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out."
          },
          "<BetaManagedAgentsRetryStatusExhausted>": {
           "type": "BetaManagedAgentsRetryStatusExhausted object",
           "description": "This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt."
          },
          "<BetaManagedAgentsRetryStatusTerminal>": {
           "type": "BetaManagedAgentsRetryStatusTerminal object",
           "description": "The session encountered a terminal error and will transition to `terminated` state."
          }
         }
        }
       }
      },
      "<BetaManagedAgentsModelRateLimitedError>": {
       "type": "BetaManagedAgentsModelRateLimitedError object",
       "description": "The model request was rate-limited.",
       "fields": {
        "type": {
         "type": "\"model_rate_limited_error\"",
         "required": true
        },
        "message": {
         "type": "string",
         "required": true,
         "description": "Human-readable error description."
        },
        "retry_status": {
         "type": "BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal",
         "required": true,
         "description": "What the client should do next in response to this error.",
         "fields": {
          "<BetaManagedAgentsRetryStatusRetrying>": {
           "type": "BetaManagedAgentsRetryStatusRetrying object",
           "description": "The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out."
          },
          "<BetaManagedAgentsRetryStatusExhausted>": {
           "type": "BetaManagedAgentsRetryStatusExhausted object",
           "description": "This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt."
          },
          "<BetaManagedAgentsRetryStatusTerminal>": {
           "type": "BetaManagedAgentsRetryStatusTerminal object",
           "description": "The session encountered a terminal error and will transition to `terminated` state."
          }
         }
        }
       }
      },
      "<BetaManagedAgentsModelRequestFailedError>": {
       "type": "BetaManagedAgentsModelRequestFailedError object",
       "description": "A model request failed for a reason other than overload or rate-limiting.",
       "fields": {
        "type": {
         "type": "\"model_request_failed_error\"",
         "required": true
        },
        "message": {
         "type": "string",
         "required": true,
         "description": "Human-readable error description."
        },
        "retry_status": {
         "type": "BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal",
         "required": true,
         "description": "What the client should do next in response to this error.",
         "fields": {
          "<BetaManagedAgentsRetryStatusRetrying>": {
           "type": "BetaManagedAgentsRetryStatusRetrying object",
           "description": "The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out."
          },
          "<BetaManagedAgentsRetryStatusExhausted>": {
           "type": "BetaManagedAgentsRetryStatusExhausted object",
           "description": "This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt."
          },
          "<BetaManagedAgentsRetryStatusTerminal>": {
           "type": "BetaManagedAgentsRetryStatusTerminal object",
           "description": "The session encountered a terminal error and will transition to `terminated` state."
          }
         }
        }
       }
      },
      "<BetaManagedAgentsMCPConnectionFailedError>": {
       "type": "BetaManagedAgentsMCPConnectionFailedError object",
       "description": "Failed to connect to an MCP server.",
       "fields": {
        "type": {
         "type": "\"mcp_connection_failed_error\"",
         "required": true
        },
        "mcp_server_name": {
         "type": "string",
         "required": true,
         "description": "Name of the MCP server that failed to connect."
        },
        "message": {
         "type": "string",
         "required": true,
         "description": "Human-readable error description."
        },
        "retry_status": {
         "type": "BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal",
         "required": true,
         "description": "What the client should do next in response to this error.",
         "fields": {
          "<BetaManagedAgentsRetryStatusRetrying>": {
           "type": "BetaManagedAgentsRetryStatusRetrying object",
           "description": "The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out."
          },
          "<BetaManagedAgentsRetryStatusExhausted>": {
           "type": "BetaManagedAgentsRetryStatusExhausted object",
           "description": "This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt."
          },
          "<BetaManagedAgentsRetryStatusTerminal>": {
           "type": "BetaManagedAgentsRetryStatusTerminal object",
           "description": "The session encountered a terminal error and will transition to `terminated` state."
          }
         }
        }
       }
      },
      "<BetaManagedAgentsMCPAuthenticationFailedError>": {
       "type": "BetaManagedAgentsMCPAuthenticationFailedError object",
       "description": "Authentication to an MCP server failed.",
       "fields": {
        "type": {
         "type": "\"mcp_authentication_failed_error\"",
         "required": true
        },
        "mcp_server_name": {
         "type": "string",
         "required": true,
         "description": "Name of the MCP server that failed authentication."
        },
        "message": {
         "type": "string",
         "required": true,
         "description": "Human-readable error description."
        },
        "retry_status": {
         "type": "BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal",
         "required": true,
         "description": "What the client should do next in response to this error.",
         "fields": {
          "<BetaManagedAgentsRetryStatusRetrying>": {
           "type": "BetaManagedAgentsRetryStatusRetrying object",
           "description": "The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out."
          },
          "<BetaManagedAgentsRetryStatusExhausted>": {
           "type": "BetaManagedAgentsRetryStatusExhausted object",
           "description": "This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt."
          },
          "<BetaManagedAgentsRetryStatusTerminal>": {
           "type": "BetaManagedAgentsRetryStatusTerminal object",
           "description": "The session encountered a terminal error and will transition to `terminated` state."
          }
         }
        }
       }
      },
      "<BetaManagedAgentsBillingError>": {
       "type": "BetaManagedAgentsBillingError object",
       "description": "The caller's organization or workspace cannot make model requests — out of credits or spend limit reached. Retrying with the same credentials will not succeed; the caller must resolve the billing state.",
       "fields": {
        "type": {
         "type": "\"billing_error\"",
         "required": true
        },
        "message": {
         "type": "string",
         "required": true,
         "description": "Human-readable error description."
        },
        "retry_status": {
         "type": "BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal",
         "required": true,
         "description": "What the client should do next in response to this error.",
         "fields": {
          "<BetaManagedAgentsRetryStatusRetrying>": {
           "type": "BetaManagedAgentsRetryStatusRetrying object",
           "description": "The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out."
          },
          "<BetaManagedAgentsRetryStatusExhausted>": {
           "type": "BetaManagedAgentsRetryStatusExhausted object",
           "description": "This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt."
          },
          "<BetaManagedAgentsRetryStatusTerminal>": {
           "type": "BetaManagedAgentsRetryStatusTerminal object",
           "description": "The session encountered a terminal error and will transition to `terminated` state."
          }
         }
        }
       }
      },
      "<BetaManagedAgentsCredentialHostUnreachableError>": {
       "type": "BetaManagedAgentsCredentialHostUnreachableError object",
       "description": "An `environment_variable` credential's `auth.networking.allowed_hosts` includes a host the environment's network policy does not permit.",
       "fields": {
        "type": {
         "type": "\"credential_host_unreachable_error\"",
         "required": true
        },
        "credential_id": {
         "type": "string",
         "required": true,
         "description": "ID of the affected credential."
        },
        "message": {
         "type": "string",
         "required": true,
         "description": "Human-readable error description."
        },
        "retry_status": {
         "type": "BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal",
         "required": true,
         "description": "What the client should do next in response to this error.",
         "fields": {
          "<BetaManagedAgentsRetryStatusRetrying>": {
           "type": "BetaManagedAgentsRetryStatusRetrying object",
           "description": "The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out."
          },
          "<BetaManagedAgentsRetryStatusExhausted>": {
           "type": "BetaManagedAgentsRetryStatusExhausted object",
           "description": "This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt."
          },
          "<BetaManagedAgentsRetryStatusTerminal>": {
           "type": "BetaManagedAgentsRetryStatusTerminal object",
           "description": "The session encountered a terminal error and will transition to `terminated` state."
          }
         }
        },
        "vault_id": {
         "type": "string",
         "required": true,
         "description": "ID of the vault containing the affected credential."
        }
       }
      }
     }
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    }
   }
  },
  "schema_name": "BetaManagedAgentsSessionErrorEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "session.status_rescheduled",
  "description": "A transient error occurred and the session is retrying automatically. Reference: Indicates the session is recovering from an error state and is rescheduled for execution.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSessionStatusRescheduledEvent",
   "fields": {
    "type": {
     "type": "\"session.status_rescheduled\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    }
   }
  },
  "schema_name": "BetaManagedAgentsSessionStatusRescheduledEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "session.status_running",
  "description": "Agent is actively processing. Opens each turn. Reference: Indicates the session is actively running and the agent is working.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSessionStatusRunningEvent",
   "fields": {
    "type": {
     "type": "\"session.status_running\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    }
   }
  },
  "schema_name": "BetaManagedAgentsSessionStatusRunningEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "session.status_idle",
  "description": "Agent finished its current task and waits for input. `stop_reason.type`: end_turn | requires_action (with event_ids) | retries_exhausted | budget_reached. Reference: Indicates the agent has paused and is awaiting user input.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSessionStatusIdleEvent",
   "fields": {
    "type": {
     "type": "\"session.status_idle\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "stop_reason": {
     "type": "BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or BetaManagedAgentsSessionBudgetReached",
     "required": true,
     "fields": {
      "<BetaManagedAgentsSessionEndTurn>": {
       "type": "BetaManagedAgentsSessionEndTurn object",
       "description": "The agent completed its turn naturally and is ready for the next user message.",
       "fields": {
        "type": {
         "type": "\"end_turn\"",
         "required": true
        }
       }
      },
      "<BetaManagedAgentsSessionRequiresAction>": {
       "type": "BetaManagedAgentsSessionRequiresAction object",
       "description": "The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running.",
       "fields": {
        "type": {
         "type": "\"requires_action\"",
         "required": true
        },
        "event_ids": {
         "type": "array of string",
         "required": true,
         "description": "The ids of events the agent is blocked on. Resolving fewer than all re-emits `session.status_idle` with the remainder."
        }
       }
      },
      "<BetaManagedAgentsSessionRetriesExhausted>": {
       "type": "BetaManagedAgentsSessionRetriesExhausted object",
       "description": "The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`.",
       "fields": {
        "type": {
         "type": "\"retries_exhausted\"",
         "required": true
        }
       }
      },
      "<BetaManagedAgentsSessionBudgetReached>": {
       "type": "BetaManagedAgentsSessionBudgetReached object",
       "description": "The agent stopped because the session's tracked list cost reached its budget, or because its usage includes a model with no list price (which the budget cannot measure). Raise the budget to continue — or, if raising is rejected because a model has no list price, remove the budget.",
       "fields": {
        "type": {
         "type": "\"budget_reached\"",
         "required": true
        }
       }
      }
     }
    }
   }
  },
  "schema_name": "BetaManagedAgentsSessionStatusIdleEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "session.status_terminated",
  "description": "Session ended, because of an unrecoverable error or because it was archived. Reference: Indicates the session has terminated, either due to an error or completion.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSessionStatusTerminatedEvent",
   "fields": {
    "type": {
     "type": "\"session.status_terminated\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    }
   }
  },
  "schema_name": "BetaManagedAgentsSessionStatusTerminatedEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "session.thread_created",
  "description": "A multiagent thread was created (`session_thread_id`, `agent_name`; advisor threads use the reserved name `anthropic.advisor`). Reference: Emitted when a subagent is spawned as a new thread. Written to the parent thread's output stream so clients observing the session see child creation.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSessionThreadCreatedEvent",
   "fields": {
    "type": {
     "type": "\"session.thread_created\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "agent_name": {
     "type": "string",
     "required": true,
     "description": "Name of the callable agent the thread runs."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "session_thread_id": {
     "type": "string",
     "required": true,
     "description": "Public `sthr_` ID of the newly created thread."
    }
   }
  },
  "schema_name": "BetaManagedAgentsSessionThreadCreatedEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "span.outcome_evaluation_start",
  "description": "Outcome grader started evaluating iteration N (0-indexed) of `outcome_id`. Reference: Emitted when an outcome evaluation cycle begins.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSpanOutcomeEvaluationStartEvent",
   "fields": {
    "type": {
     "type": "\"span.outcome_evaluation_start\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "iteration": {
     "type": "number",
     "required": true,
     "description": "0-indexed revision cycle. 0 is the first evaluation; 1 is the re-evaluation after the first revision; etc."
    },
    "outcome_id": {
     "type": "string",
     "required": true,
     "description": "The `outc_` ID of the outcome being evaluated."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    }
   }
  },
  "schema_name": "BetaManagedAgentsSpanOutcomeEvaluationStartEvent",
  "example": {
   "type": "span.outcome_evaluation_start",
   "id": "sevt_01def...",
   "outcome_id": "outc_01a...",
   "iteration": 0,
   "processed_at": "2026-03-25T14:01:45Z"
  },
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "span.outcome_evaluation_end",
  "description": "Outcome evaluation cycle completed. `result`: satisfied | needs_revision (another cycle follows) | max_iterations_reached | failed | interrupted (terminal). Carries `explanation` and grader `usage`. Reference: Emitted when an outcome evaluation cycle completes. Carries the verdict and aggregate token usage. A verdict of `needs_revision` means another evaluation cycle follows; `satisfied`, `max_iterations_reached`, `failed`, or `interrupted` are terminal — no further evaluation cycles follow.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSpanOutcomeEvaluationEndEvent",
   "fields": {
    "type": {
     "type": "\"span.outcome_evaluation_end\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "explanation": {
     "type": "string",
     "required": true,
     "description": "Human-readable explanation of the verdict. For `needs_revision`, describes which criteria failed and why."
    },
    "iteration": {
     "type": "number",
     "required": true,
     "description": "0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`."
    },
    "outcome_evaluation_start_id": {
     "type": "string",
     "required": true,
     "description": "The id of the corresponding `span.outcome_evaluation_start` event."
    },
    "outcome_id": {
     "type": "string",
     "required": true,
     "description": "The `outc_` ID of the outcome being evaluated."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "result": {
     "type": "string",
     "required": true,
     "description": "Evaluation verdict. 'satisfied': criteria met, session goes idle. 'needs_revision': criteria not met, another revision cycle follows. 'max_iterations_reached': evaluation budget exhausted with criteria still unmet — one final acknowledgment turn follows before the session goes idle, but no further evaluation runs. 'failed': grader determined the rubric does not apply to the deliverables. 'interrup"
    },
    "usage": {
     "type": "BetaManagedAgentsSpanModelUsage",
     "required": true,
     "description": "Token usage for a single model request.",
     "fields": {
      "cache_creation_input_tokens": {
       "type": "number",
       "required": true,
       "description": "Tokens used to create prompt cache in this request."
      },
      "cache_read_input_tokens": {
       "type": "number",
       "required": true,
       "description": "Tokens read from prompt cache in this request."
      },
      "input_tokens": {
       "type": "number",
       "required": true,
       "description": "Input tokens consumed by this request."
      },
      "output_tokens": {
       "type": "number",
       "required": true,
       "description": "Output tokens generated by this request."
      },
      "speed": {
       "type": "\"standard\" or \"fast\" or null",
       "enum": [
        "standard",
        "fast"
       ],
       "description": "Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time."
      }
     }
    }
   }
  },
  "schema_name": "BetaManagedAgentsSpanOutcomeEvaluationEndEvent",
  "example": {
   "type": "span.outcome_evaluation_end",
   "id": "sevt_01jkl...",
   "outcome_evaluation_start_id": "sevt_01def...",
   "outcome_id": "outc_01a...",
   "result": "satisfied",
   "explanation": "All 12 criteria met: ...",
   "iteration": 0,
   "usage": {
    "input_tokens": 2400,
    "output_tokens": 350,
    "cache_creation_input_tokens": 0,
    "cache_read_input_tokens": 1800
   },
   "processed_at": "2026-03-25T14:03:00Z"
  },
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "span.model_request_start",
  "description": "A model inference call has started. Reference: Emitted when a model request is initiated by the agent.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSpanModelRequestStartEvent",
   "fields": {
    "type": {
     "type": "\"span.model_request_start\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    }
   }
  },
  "schema_name": "BetaManagedAgentsSpanModelRequestStartEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "span.model_request_end",
  "description": "A model inference call has completed. Includes `model_usage` (input/output/cache tokens, speed) and `is_error`. Also closes any unreconciled event_delta preview. Reference: Emitted when a model request completes.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSpanModelRequestEndEvent",
   "fields": {
    "type": {
     "type": "\"span.model_request_end\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "is_error": {
     "type": "boolean or null",
     "required": true,
     "description": "Whether the model request resulted in an error."
    },
    "model_request_start_id": {
     "type": "string",
     "required": true,
     "description": "The id of the corresponding `span.model_request_start` event."
    },
    "model_usage": {
     "type": "BetaManagedAgentsSpanModelUsage",
     "required": true,
     "description": "Token usage for a single model request."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    }
   }
  },
  "schema_name": "BetaManagedAgentsSpanModelRequestEndEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "span.outcome_evaluation_ongoing",
  "description": "Heartbeat while the grader runs (reasoning is opaque). Reference: Periodic heartbeat emitted while an outcome evaluation cycle is in progress. Distinguishes 'evaluation is actively running' from 'evaluation is stuck' between the corresponding `span.outcome_evaluation_start` and `span.outcome_evaluation_end` events.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent",
   "fields": {
    "type": {
     "type": "\"span.outcome_evaluation_ongoing\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "iteration": {
     "type": "number",
     "required": true,
     "description": "0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`."
    },
    "outcome_id": {
     "type": "string",
     "required": true,
     "description": "The `outc_` ID of the outcome being evaluated."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    }
   }
  },
  "schema_name": "BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent",
  "example": {
   "type": "span.outcome_evaluation_ongoing",
   "id": "sevt_01ghi...",
   "outcome_id": "outc_01a...",
   "iteration": 0,
   "processed_at": "2026-03-25T14:02:10Z"
  },
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "user.define_outcome",
  "description": "Define an outcome (description + rubric text or file, optional max_iterations default 3 max 20) for the agent to work toward; the agent starts immediately. Echoed back with `outcome_id`. One outcome at a time. Reference: Echo of a `user.define_outcome` input event. Carries the server-generated `outcome_id` that subsequent `span.outcome_evaluation_*` events reference.",
  "schema": {
   "official_type_name": "BetaManagedAgentsUserDefineOutcomeEvent",
   "fields": {
    "type": {
     "type": "\"user.define_outcome\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "description": {
     "type": "string",
     "required": true,
     "description": "What the agent should produce. Copied from the input event."
    },
    "max_iterations": {
     "type": "number or null",
     "required": true,
     "description": "Evaluate-then-revise cycles before giving up. Default 3, max 20."
    },
    "outcome_id": {
     "type": "string",
     "required": true,
     "description": "Server-generated `outc_` ID for this outcome. Referenced by `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "rubric": {
     "type": "BetaManagedAgentsFileRubric or BetaManagedAgentsTextRubric",
     "required": true,
     "description": "Rubric for grading the quality of an outcome.",
     "fields": {
      "<BetaManagedAgentsFileRubric>": {
       "type": "BetaManagedAgentsFileRubric object",
       "description": "Rubric referenced by a file uploaded via the Files API.",
       "fields": {
        "type": {
         "type": "\"file\"",
         "required": true
        },
        "file_id": {
         "type": "string",
         "required": true,
         "description": "ID of the rubric file."
        }
       }
      },
      "<BetaManagedAgentsTextRubric>": {
       "type": "BetaManagedAgentsTextRubric object",
       "description": "Rubric content provided inline as text.",
       "fields": {
        "type": {
         "type": "\"text\"",
         "required": true
        },
        "content": {
         "type": "string",
         "required": true,
         "description": "Rubric content. Plain text or markdown — the grader treats it as freeform text."
        }
       }
      }
     }
    }
   }
  },
  "schema_name": "BetaManagedAgentsUserDefineOutcomeEvent",
  "example": {
   "type": "user.define_outcome",
   "description": "Build a DCF model for Costco in .xlsx",
   "rubric": {
    "type": "file",
    "file_id": "file_01..."
   },
   "max_iterations": 5
  },
  "notes": "Client-originated event as echoed/persisted on the stream and in GET /v1/sessions/{id}/events (server-assigned id, processed_at).",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "session.deleted",
  "description": "Session was deleted. Terminates any active event stream; no further events. Reference: Emitted when a session has been deleted. Terminates any active event stream — no further events will be emitted for this session.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSessionDeletedEvent",
   "fields": {
    "type": {
     "type": "\"session.deleted\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    }
   }
  },
  "schema_name": "BetaManagedAgentsSessionDeletedEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "session.thread_status_running",
  "description": "A session thread began executing. Every session emits this for its primary thread; child-thread transitions are cross-posted to the primary stream. Reference: A session thread has begun executing. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSessionThreadStatusRunningEvent",
   "fields": {
    "type": {
     "type": "\"session.thread_status_running\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "agent_name": {
     "type": "string",
     "required": true,
     "description": "Name of the agent the thread runs."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "session_thread_id": {
     "type": "string",
     "required": true,
     "description": "Public sthr_ ID of the thread that started running."
    }
   }
  },
  "schema_name": "BetaManagedAgentsSessionThreadStatusRunningEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "session.thread_status_idle",
  "description": "A session thread finished its turn and awaits input. Includes `stop_reason` (same variants as session.status_idle). Cross-posted to the primary thread with `session_thread_id` when a subagent needs your input. Reference: A session thread has yielded and is awaiting input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSessionThreadStatusIdleEvent",
   "fields": {
    "type": {
     "type": "\"session.thread_status_idle\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "agent_name": {
     "type": "string",
     "required": true,
     "description": "Name of the agent the thread runs."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "session_thread_id": {
     "type": "string",
     "required": true,
     "description": "Public sthr_ ID of the thread that went idle."
    },
    "stop_reason": {
     "type": "BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or BetaManagedAgentsSessionBudgetReached",
     "required": true,
     "fields": {
      "<BetaManagedAgentsSessionEndTurn>": {
       "type": "BetaManagedAgentsSessionEndTurn object",
       "description": "The agent completed its turn naturally and is ready for the next user message."
      },
      "<BetaManagedAgentsSessionRequiresAction>": {
       "type": "BetaManagedAgentsSessionRequiresAction object",
       "description": "The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running."
      },
      "<BetaManagedAgentsSessionRetriesExhausted>": {
       "type": "BetaManagedAgentsSessionRetriesExhausted object",
       "description": "The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`."
      },
      "<BetaManagedAgentsSessionBudgetReached>": {
       "type": "BetaManagedAgentsSessionBudgetReached object",
       "description": "The agent stopped because the session's tracked list cost reached its budget, or because its usage includes a model with no list price (which the budget cannot measure). Raise the budget to continue — or, if raising is rejected because a model has no list price, remove the budget."
      }
     }
    }
   }
  },
  "schema_name": "BetaManagedAgentsSessionThreadStatusIdleEvent",
  "example": {
   "type": "session.thread_status_idle",
   "id": "sevt_01ABC...",
   "session_thread_id": "sth_01DEF...",
   "agent_name": "code-reviewer",
   "stop_reason": {
    "type": "requires_action",
    "event_ids": [
     "sevt_01XYZ..."
    ]
   }
  },
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "session.thread_status_terminated",
  "description": "A session thread was archived or reached a terminal error. Reference: A session thread has terminated and will accept no further input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSessionThreadStatusTerminatedEvent",
   "fields": {
    "type": {
     "type": "\"session.thread_status_terminated\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "agent_name": {
     "type": "string",
     "required": true,
     "description": "Name of the agent the thread runs."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "session_thread_id": {
     "type": "string",
     "required": true,
     "description": "Public sthr_ ID of the thread that terminated."
    }
   }
  },
  "schema_name": "BetaManagedAgentsSessionThreadStatusTerminatedEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "user.tool_result",
  "description": "For sessions on `self_hosted` environments only: your worker returns the result of an `agent_toolset` tool call (bash/read/write/edit/glob/grep). The SDK worker / `ant beta:worker` do this automatically. Reference: Event sent by the client providing the result of an agent-toolset tool execution. Only valid on `self_hosted` environments, where sandbox-routed tools are executed by the client rather than the server.",
  "schema": {
   "official_type_name": "BetaManagedAgentsUserToolResultEvent",
   "fields": {
    "type": {
     "type": "\"user.tool_result\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "tool_use_id": {
     "type": "string",
     "required": true,
     "description": "The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field."
    },
    "content": {
     "type": "array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock",
     "description": "The result content returned by the tool.",
     "fields": {
      "<BetaManagedAgentsTextBlock>": {
       "type": "BetaManagedAgentsTextBlock object",
       "description": "Regular text content."
      },
      "<BetaManagedAgentsImageBlock>": {
       "type": "BetaManagedAgentsImageBlock object",
       "description": "Image content specified directly as base64 data or as a reference via a URL."
      },
      "<BetaManagedAgentsDocumentBlock>": {
       "type": "BetaManagedAgentsDocumentBlock object",
       "description": "Document content, either specified directly as base64 data, as text, or as a reference via a URL."
      },
      "<BetaManagedAgentsSearchResultBlock>": {
       "type": "BetaManagedAgentsSearchResultBlock object",
       "description": "A block containing a web search result."
      }
     }
    },
    "is_error": {
     "type": "boolean or null",
     "description": "Whether the tool execution resulted in an error."
    },
    "processed_at": {
     "type": "string or null",
     "description": "A timestamp in RFC 3339 format"
    },
    "session_thread_id": {
     "type": "string or null",
     "description": "Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread."
    }
   }
  },
  "schema_name": "BetaManagedAgentsUserToolResultEvent",
  "notes": "Client-originated event as echoed/persisted on the stream and in GET /v1/sessions/{id}/events (server-assigned id, processed_at).",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "session.thread_status_rescheduled",
  "description": "A session thread hit a transient error and is retrying automatically. Reference: A session thread hit a transient error and is retrying automatically. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSessionThreadStatusRescheduledEvent",
   "fields": {
    "type": {
     "type": "\"session.thread_status_rescheduled\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "agent_name": {
     "type": "string",
     "required": true,
     "description": "Name of the agent the thread runs."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "session_thread_id": {
     "type": "string",
     "required": true,
     "description": "Public sthr_ ID of the thread that is retrying."
    }
   }
  },
  "schema_name": "BetaManagedAgentsSessionThreadStatusRescheduledEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "session.updated",
  "description": "A session update changed at least one field (agent tools/mcp_servers, budget, title, metadata). Carries only the changed fields; applies on the next turn. Reference: Emitted when an UpdateSession request changed at least one field. Carries only the fields that changed; absent fields were not part of the update. The new configuration applies from the next turn.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSessionUpdatedEvent",
   "fields": {
    "type": {
     "type": "\"session.updated\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "agent": {
     "type": "BetaManagedAgentsSessionAgent or null",
     "description": "Resolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.",
     "fields": {
      "type": {
       "type": "\"agent\"",
       "required": true
      },
      "id": {
       "type": "string",
       "required": true
      },
      "description": {
       "type": "string or null",
       "required": true
      },
      "mcp_servers": {
       "type": "array of BetaManagedAgentsMCPServerURLDefinition",
       "required": true,
       "fields": {
        "type": {
         "type": "\"url\"",
         "required": true
        },
        "name": {
         "type": "string",
         "required": true
        },
        "url": {
         "type": "string",
         "required": true
        }
       }
      },
      "model": {
       "type": "BetaManagedAgentsModelConfig",
       "required": true,
       "description": "Model identifier and configuration.",
       "fields": {
        "id": {
         "type": "BetaManagedAgentsModel",
         "required": true,
         "description": "The model that will power your agent. See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.",
         "fields": {
          "<\"claude-fable-5-1\" or \"claude-sonnet-5\" or \"claude-fable-5\" or 11 more>": {
           "type": "\"claude-fable-5-1\" or \"claude-sonnet-5\" or \"claude-fable-5\" or 11 more",
           "enum": [
            "claude-fable-5-1",
            "claude-sonnet-5",
            "claude-fable-5",
            "claude-opus-5",
            "claude-opus-4-8",
            "claude-opus-4-7",
            "claude-opus-4-6",
            "claude-sonnet-4-6",
            "claude-haiku-4-5",
            "claude-haiku-4-5-20251001",
            "claude-opus-4-5",
            "claude-opus-4-5-20251101",
            "claude-sonnet-4-5",
            "claude-sonnet-4-5-20250929"
           ],
           "description": "The model that will power your agent. See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options."
          },
          "<string>": {
           "type": "string"
          }
         }
        },
        "effort": {
         "type": "BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more",
         "description": "How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes.",
         "fields": {
          "<BetaManagedAgentsEffortLow>": {
           "type": "BetaManagedAgentsEffortLow object",
           "description": "Low effort. Favors latency over reasoning depth."
          },
          "<BetaManagedAgentsEffortMedium>": {
           "type": "BetaManagedAgentsEffortMedium object",
           "description": "Medium effort. Balances latency and reasoning depth."
          },
          "<BetaManagedAgentsEffortHigh>": {
           "type": "BetaManagedAgentsEffortHigh object",
           "description": "High effort. Favors reasoning depth."
          },
          "<BetaManagedAgentsEffortXhigh>": {
           "type": "BetaManagedAgentsEffortXhigh object",
           "description": "Extra-high effort. Not all models accept this level."
          },
          "<BetaManagedAgentsEffortMax>": {
           "type": "BetaManagedAgentsEffortMax object",
           "description": "Maximum effort. Favors reasoning depth over latency."
          }
         }
        },
        "inference_geo": {
         "type": "string",
         "description": "Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo."
        },
        "speed": {
         "type": "\"standard\" or \"fast\"",
         "enum": [
          "standard",
          "fast"
         ],
         "description": "Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time."
        }
       }
      },
      "multiagent": {
       "type": "BetaManagedAgentsSessionMultiagentCoordinator or null",
       "required": true,
       "description": "Resolved coordinator topology with full agent definitions for each roster member.",
       "fields": {
        "type": {
         "type": "\"coordinator\"",
         "required": true
        },
        "agents": {
         "type": "array of BetaManagedAgentsSessionThreadAgent or BetaManagedAgentsAdvisor",
         "required": true,
         "description": "Full `agent` definitions the coordinator may spawn as session threads.",
         "fields": {
          "<BetaManagedAgentsSessionThreadAgent>": {
           "type": "BetaManagedAgentsSessionThreadAgent object",
           "description": "Resolved `agent` definition for a single `session_thread`. Snapshot of the agent at thread creation time. The multiagent roster is not repeated here; read it from `Session.agent`."
          },
          "<BetaManagedAgentsAdvisor>": {
           "type": "BetaManagedAgentsAdvisor object",
           "description": "Platform advisor roster entry: a model the session's primary thread may consult mid-turn."
          }
         }
        }
       }
      },
      "name": {
       "type": "string",
       "required": true
      },
      "skills": {
       "type": "array of BetaManagedAgentsAnthropicSkill or BetaManagedAgentsCustomSkill",
       "required": true,
       "fields": {
        "<BetaManagedAgentsAnthropicSkill>": {
         "type": "BetaManagedAgentsAnthropicSkill object",
         "description": "A resolved Anthropic-managed skill."
        },
        "<BetaManagedAgentsCustomSkill>": {
         "type": "BetaManagedAgentsCustomSkill object",
         "description": "A resolved user-created custom skill."
        }
       }
      },
      "system": {
       "type": "string or null",
       "required": true
      },
      "tools": {
       "type": "array of BetaManagedAgentsAgentToolset20260401 or BetaManagedAgentsMCPToolset or BetaManagedAgentsCustomTool",
       "required": true,
       "fields": {
        "<BetaManagedAgentsAgentToolset20260401>": {
         "type": "BetaManagedAgentsAgentToolset20260401 object"
        },
        "<BetaManagedAgentsMCPToolset>": {
         "type": "BetaManagedAgentsMCPToolset object"
        },
        "<BetaManagedAgentsCustomTool>": {
         "type": "BetaManagedAgentsCustomTool object",
         "description": "A custom tool as returned in API responses."
        }
       }
      },
      "version": {
       "type": "number",
       "required": true
      }
     }
    },
    "budget": {
     "type": "BetaManagedAgentsBudgetLimit or null",
     "description": "A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.",
     "fields": {
      "type": {
       "type": "\"limit\"",
       "required": true
      },
      "max_list_cost": {
       "type": "BetaMonetaryAmount",
       "required": true,
       "description": "A monetary amount in a specific currency.",
       "fields": {
        "amount": {
         "type": "string",
         "required": true,
         "description": "Amount in minor units of the currency, as an integer decimal string with no leading zeros: \"2500\" is $25.00 and \"50\" is fifty cents. A string rather than a number so no float rounding is ever applied."
        },
        "currency": {
         "type": "BetaCurrency",
         "required": true,
         "description": "Uppercase ISO-4217 currency code. `USD` is the only currency currently supported; the accepted set is closed and grows only when a new currency is priced."
        }
       }
      }
     }
    },
    "metadata": {
     "type": "map[string]",
     "description": "The session's full metadata bag after the update. Present when the update set non-empty metadata; absent when metadata was unchanged or cleared to empty."
    },
    "title": {
     "type": "string or null",
     "description": "The session's new title. Present only when the update changed it."
    }
   }
  },
  "schema_name": "BetaManagedAgentsSessionUpdatedEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "event_start",
  "description": "Stream-only preview (requires `event_deltas[]=agent.message|agent.thinking` on the stream connection). Announces the upcoming buffered event's `type` and `id`. Never persisted; no id/processed_at of its own. Reference: Opens a preview of a buffered event. Carries the previewed event's type and id only. Followed by zero or more event_delta events with the same event id, normally concluded by the buffered event carrying that id. If the producing model request ends without that event (an error or interrupt mid-stream), its terminal span.model_request_end closes the preview. Only sent on stream connections that opt in via event_deltas; never appears in event history.",
  "schema": {
   "official_type_name": "BetaManagedAgentsStartEvent",
   "fields": {
    "type": {
     "type": "\"event_start\"",
     "required": true
    },
    "event": {
     "type": "BetaManagedAgentsStartEventPreview",
     "required": true,
     "description": "The previewed event's type and id. The event type determines which delta types the preview's event_delta events carry: agent.message events stream content_delta fragments; agent.thinking previews are start-only — no deltas follow, and the buffered agent.thinking with the same id concludes them.",
     "fields": {
      "<BetaManagedAgentsAgentMessagePreview>": {
       "type": "BetaManagedAgentsAgentMessagePreview object",
       "fields": {
        "type": {
         "type": "\"agent.message\"",
         "required": true
        },
        "id": {
         "type": "string",
         "required": true,
         "description": "The id the buffered agent.message will carry if it is emitted. Matches the event_id on this preview's event_delta events."
        }
       }
      },
      "<BetaManagedAgentsAgentThinkingPreview>": {
       "type": "BetaManagedAgentsAgentThinkingPreview object",
       "fields": {
        "type": {
         "type": "\"agent.thinking\"",
         "required": true
        },
        "id": {
         "type": "string",
         "required": true,
         "description": "The id the buffered agent.thinking will carry if it is emitted. Start-only — no event_delta events follow."
        }
       }
      }
     }
    }
   }
  },
  "schema_name": "BetaManagedAgentsStartEvent",
  "example": {
   "type": "event_start",
   "event": {
    "type": "agent.message",
    "id": "sevt_01abc..."
   }
  },
  "notes": "Stream-only; emitted only on connections that pass event_deltas[]; not in event history; also on thread streams /v1/sessions/{id}/threads/{thread_id}/stream.",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "event_delta",
  "description": "Stream-only preview: incremental text for the previewed `agent.message` (`event_id`, `delta.type = content_delta`, `delta.index`, `delta.content.text`). Best-effort (deltas may be shed under load), never persisted, not replayed on reconnect. Wire format differs from Messages API streaming (no content_block_start/stop, delta type is content_delta). Reference: An incremental update to an event that is still being streamed. Deltas are best-effort and may stop early; when the buffered event with id == event_id is produced it carries the complete content. A model request that ends early (an error or interrupt) produces no buffered event — its terminal span.model_request_end closes the preview. Only sent on stream connections that opt in via event_deltas; never appears in event history.",
  "schema": {
   "official_type_name": "BetaManagedAgentsDeltaEvent",
   "fields": {
    "type": {
     "type": "\"event_delta\"",
     "required": true
    },
    "delta": {
     "type": "BetaManagedAgentsDeltaContent",
     "required": true,
     "description": "One fragment of the previewed event. The delta type is named for the previewed event's field it streams into: agent.message events stream content_delta fragments, each a partial element of the content array.",
     "fields": {
      "type": {
       "type": "\"content_delta\"",
       "required": true
      },
      "content": {
       "type": "BetaManagedAgentsTextBlock",
       "required": true,
       "description": "Regular text content."
      },
      "index": {
       "type": "number",
       "description": "Which entry in the previewed event's content array this fragment lands in. Insert content as that entry when the index is new; append to the existing entry otherwise."
      }
     }
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The id of the event being previewed. Matches event.id on the corresponding event_start and the buffered event that reconciles the preview."
    }
   }
  },
  "schema_name": "BetaManagedAgentsDeltaEvent",
  "example": {
   "type": "event_delta",
   "event_id": "sevt_01abc...",
   "delta": {
    "type": "content_delta",
    "index": 0,
    "content": {
     "type": "text",
     "text": "Here is the summary"
    }
   }
  },
  "notes": "Stream-only; emitted only on connections that pass event_deltas[]; not in event history; also on thread streams /v1/sessions/{id}/threads/{thread_id}/stream.",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "system.message",
  "description": "Append privileged system-level context (text only, 1-1000 items) for the accompanying turn and all subsequent turns, as a role:\"system\" turn. At most one per request, must be last. Supported on Claude Fable 5.1, Mythos 5.1, Fable 5, Mythos 5, Opus 5, Opus 4.8; otherwise 400 `model_does_not_support_mid_conversation_system`. Reference: A mid-conversation system message event. Carries system-role content that is appended to the session as a `role: \"system\"` turn.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSystemMessageEvent",
   "fields": {
    "type": {
     "type": "\"system.message\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "content": {
     "type": "array of BetaManagedAgentsSystemContentBlock",
     "required": true,
     "description": "System content blocks. Text-only.",
     "fields": {
      "type": {
       "type": "\"text\"",
       "required": true
      },
      "text": {
       "type": "string",
       "required": true,
       "description": "The text content."
      }
     }
    },
    "processed_at": {
     "type": "string or null",
     "description": "A timestamp in RFC 3339 format"
    }
   }
  },
  "schema_name": "BetaManagedAgentsSystemMessageEvent",
  "example": {
   "type": "system.message",
   "content": [
    {
     "type": "text",
     "text": "The user's current timezone is America/New_York."
    }
   ]
  },
  "notes": "Client-originated event as echoed/persisted on the stream and in GET /v1/sessions/{id}/events (server-assigned id, processed_at).",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "server→client",
  "event": "session.usage",
  "description": "Snapshot of the session's cumulative usage and tracked list cost plus an echo of the session `budget` (null when none). Emitted immediately before every idle transition and when a thread pauses at the budget. Reference: Periodic snapshot of the session's cumulative usage and tracked list cost.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSessionUsageEvent",
   "fields": {
    "type": {
     "type": "\"session.usage\"",
     "required": true
    },
    "id": {
     "type": "string",
     "required": true,
     "description": "Unique identifier for this event."
    },
    "processed_at": {
     "type": "string",
     "required": true,
     "description": "A timestamp in RFC 3339 format"
    },
    "usage": {
     "type": "BetaManagedAgentsSessionUsageSnapshot",
     "required": true,
     "description": "Point-in-time snapshot of a session's cumulative usage.",
     "fields": {
      "active_seconds": {
       "type": "number",
       "description": "Cumulative time in seconds during which the session had at least one thread in running status. Overlapping activity from concurrent threads is counted once. This is the duration the session's runtime cost is priced on."
      },
      "cache_creation": {
       "type": "BetaManagedAgentsCacheCreationUsage",
       "description": "Prompt-cache creation token usage broken down by cache lifetime.",
       "fields": {
        "ephemeral_1h_input_tokens": {
         "type": "number",
         "description": "Tokens used to create 1-hour ephemeral cache entries."
        },
        "ephemeral_5m_input_tokens": {
         "type": "number",
         "description": "Tokens used to create 5-minute ephemeral cache entries."
        }
       }
      },
      "cache_read_input_tokens": {
       "type": "number",
       "description": "Total tokens read from prompt cache."
      },
      "input_tokens": {
       "type": "number",
       "description": "Total input tokens consumed across all turns."
      },
      "list_cost": {
       "type": "BetaMonetaryAmount",
       "description": "A monetary amount in a specific currency."
      },
      "output_tokens": {
       "type": "number",
       "description": "Total output tokens generated across all turns."
      },
      "server_tool_use": {
       "type": "BetaManagedAgentsServerToolUsage",
       "description": "Cumulative count of server-executed tool invocations, broken down by tool.",
       "fields": {
        "web_fetch_requests": {
         "type": "number",
         "description": "Number of server-executed web fetch requests."
        },
        "web_search_requests": {
         "type": "number",
         "description": "Number of server-executed web search requests."
        }
       }
      }
     }
    },
    "budget": {
     "type": "BetaManagedAgentsBudgetLimit or null",
     "description": "A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`."
    }
   }
  },
  "schema_name": "BetaManagedAgentsSessionUsageEvent",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "client→server",
  "event": "user.message",
  "description": "A user message with text, image, or document content. Starts or continues the agent's work; also accepted in a session's / deployment's `initial_events`. Reference: Parameters for sending a user message to the session.",
  "schema": {
   "official_type_name": "BetaManagedAgentsUserMessageEventParams",
   "fields": {
    "type": {
     "type": "\"user.message\"",
     "required": true
    },
    "content": {
     "type": "array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock",
     "required": true,
     "description": "Array of content blocks for the user message.",
     "fields": {
      "<BetaManagedAgentsTextBlock>": {
       "type": "BetaManagedAgentsTextBlock object",
       "description": "Regular text content.",
       "fields": {
        "type": {
         "type": "\"text\"",
         "required": true
        },
        "text": {
         "type": "string",
         "required": true,
         "description": "The text content."
        }
       }
      },
      "<BetaManagedAgentsImageBlock>": {
       "type": "BetaManagedAgentsImageBlock object",
       "description": "Image content specified directly as base64 data or as a reference via a URL.",
       "fields": {
        "type": {
         "type": "\"image\"",
         "required": true
        },
        "source": {
         "type": "BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource",
         "required": true,
         "description": "Union type for image source variants.",
         "fields": {
          "<BetaManagedAgentsBase64ImageSource>": {
           "type": "BetaManagedAgentsBase64ImageSource object",
           "description": "Base64-encoded image data."
          },
          "<BetaManagedAgentsURLImageSource>": {
           "type": "BetaManagedAgentsURLImageSource object",
           "description": "Image referenced by URL."
          },
          "<BetaManagedAgentsFileImageSource>": {
           "type": "BetaManagedAgentsFileImageSource object",
           "description": "Image referenced by file ID."
          }
         }
        }
       }
      },
      "<BetaManagedAgentsDocumentBlock>": {
       "type": "BetaManagedAgentsDocumentBlock object",
       "description": "Document content, either specified directly as base64 data, as text, or as a reference via a URL.",
       "fields": {
        "type": {
         "type": "\"document\"",
         "required": true
        },
        "source": {
         "type": "BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource",
         "required": true,
         "description": "Union type for document source variants.",
         "fields": {
          "<BetaManagedAgentsBase64DocumentSource>": {
           "type": "BetaManagedAgentsBase64DocumentSource object",
           "description": "Base64-encoded document data."
          },
          "<BetaManagedAgentsPlainTextDocumentSource>": {
           "type": "BetaManagedAgentsPlainTextDocumentSource object",
           "description": "Plain text document content."
          },
          "<BetaManagedAgentsURLDocumentSource>": {
           "type": "BetaManagedAgentsURLDocumentSource object",
           "description": "Document referenced by URL."
          },
          "<BetaManagedAgentsFileDocumentSource>": {
           "type": "BetaManagedAgentsFileDocumentSource object",
           "description": "Document referenced by file ID."
          }
         }
        },
        "context": {
         "type": "string or null",
         "description": "Additional context about the document for the model."
        },
        "title": {
         "type": "string or null",
         "description": "The title of the document."
        }
       }
      },
      "<BetaManagedAgentsRedactedBlock>": {
       "type": "BetaManagedAgentsRedactedBlock object",
       "description": "Placeholder for content withheld by Anthropic model policy.",
       "fields": {
        "type": {
         "type": "\"redacted\"",
         "required": true
        }
       }
      }
     }
    }
   }
  },
  "schema_name": "BetaManagedAgentsUserMessageEventParams",
  "example": {
   "type": "user.message",
   "content": [
    {
     "type": "text",
     "text": "List the files in the working directory."
    }
   ]
  },
  "notes": "Sent in POST /v1/sessions/{session_id}/events body {\"events\":[...]}. user.message and user.define_outcome are also accepted in POST /v1/sessions initial_events (max 50) and in deployments initial_events (which additionally accept system.message).",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "client→server",
  "event": "user.interrupt",
  "description": "Stop the agent mid-execution. Optional `session_thread_id` targets one thread; omitted = every non-archived thread. Interrupted turn ends with session.status_idle stop_reason end_turn (no interrupt-specific stop reason). Reference: Parameters for sending an interrupt to pause the agent.",
  "schema": {
   "official_type_name": "BetaManagedAgentsUserInterruptEventParams",
   "fields": {
    "type": {
     "type": "\"user.interrupt\"",
     "required": true
    },
    "session_thread_id": {
     "type": "string or null",
     "description": "If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread."
    }
   }
  },
  "schema_name": "BetaManagedAgentsUserInterruptEventParams",
  "example": {
   "type": "user.interrupt"
  },
  "notes": "Sent in POST /v1/sessions/{session_id}/events body {\"events\":[...]}. user.message and user.define_outcome are also accepted in POST /v1/sessions initial_events (max 50) and in deployments initial_events (which additionally accept system.message).",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "client→server",
  "event": "user.tool_confirmation",
  "description": "Approve (`allow`) or deny (`deny`, optional `deny_message`) an `agent.tool_use` / `agent.mcp_tool_use` whose `evaluated_permission` is \"ask\" (policy always_ask, or auto with no determination). 400 if the target event is not in \"ask\". Reference: Parameters for confirming or denying a tool execution request.",
  "schema": {
   "official_type_name": "BetaManagedAgentsUserToolConfirmationEventParams",
   "fields": {
    "type": {
     "type": "\"user.tool_confirmation\"",
     "required": true
    },
    "result": {
     "type": "\"allow\" or \"deny\"",
     "required": true,
     "enum": [
      "allow",
      "deny"
     ],
     "description": "UserToolConfirmationResult enum"
    },
    "tool_use_id": {
     "type": "string",
     "required": true,
     "description": "The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field."
    },
    "deny_message": {
     "type": "string or null",
     "description": "Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'."
    }
   }
  },
  "schema_name": "BetaManagedAgentsUserToolConfirmationEventParams",
  "example": {
   "type": "user.tool_confirmation",
   "tool_use_id": "sevt_01def...",
   "result": "allow"
  },
  "notes": "Sent in POST /v1/sessions/{session_id}/events body {\"events\":[...]}. user.message and user.define_outcome are also accepted in POST /v1/sessions initial_events (max 50) and in deployments initial_events (which additionally accept system.message).",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "client→server",
  "event": "user.custom_tool_result",
  "description": "Response to an `agent.custom_tool_use` event; pass the event id as `custom_tool_use_id`. Processed on receipt (processed_at populated in the echo). Reference: Parameters for providing the result of a custom tool execution.",
  "schema": {
   "official_type_name": "BetaManagedAgentsUserCustomToolResultEventParams",
   "fields": {
    "type": {
     "type": "\"user.custom_tool_result\"",
     "required": true
    },
    "custom_tool_use_id": {
     "type": "string",
     "required": true,
     "description": "The id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field."
    },
    "content": {
     "type": "array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock",
     "description": "The result content returned by the tool.",
     "fields": {
      "<BetaManagedAgentsTextBlock>": {
       "type": "BetaManagedAgentsTextBlock object",
       "description": "Regular text content."
      },
      "<BetaManagedAgentsImageBlock>": {
       "type": "BetaManagedAgentsImageBlock object",
       "description": "Image content specified directly as base64 data or as a reference via a URL."
      },
      "<BetaManagedAgentsDocumentBlock>": {
       "type": "BetaManagedAgentsDocumentBlock object",
       "description": "Document content, either specified directly as base64 data, as text, or as a reference via a URL."
      },
      "<BetaManagedAgentsSearchResultBlock>": {
       "type": "BetaManagedAgentsSearchResultBlock object",
       "description": "A block containing a web search result.",
       "fields": {
        "type": {
         "type": "\"search_result\"",
         "required": true
        },
        "citations": {
         "type": "BetaManagedAgentsSearchResultCitations",
         "required": true,
         "description": "Citation settings for a search result.",
         "fields": {
          "enabled": {
           "type": "boolean",
           "required": true,
           "description": "Whether citations are enabled for this search result."
          }
         }
        },
        "content": {
         "type": "array of BetaManagedAgentsSearchResultContent",
         "required": true,
         "description": "Array of text content blocks from the search result.",
         "fields": {
          "type": {
           "type": "\"text\"",
           "required": true
          },
          "text": {
           "type": "string",
           "required": true,
           "description": "The text content."
          }
         }
        },
        "source": {
         "type": "string",
         "required": true,
         "description": "The URL source of the search result."
        },
        "title": {
         "type": "string",
         "required": true,
         "description": "The title of the search result."
        }
       }
      }
     }
    },
    "is_error": {
     "type": "boolean or null",
     "description": "Whether the tool execution resulted in an error."
    }
   }
  },
  "schema_name": "BetaManagedAgentsUserCustomToolResultEventParams",
  "example": {
   "type": "user.custom_tool_result",
   "custom_tool_use_id": "sevt_01...",
   "content": [
    {
     "type": "text",
     "text": "72F and sunny"
    }
   ]
  },
  "notes": "Sent in POST /v1/sessions/{session_id}/events body {\"events\":[...]}. user.message and user.define_outcome are also accepted in POST /v1/sessions initial_events (max 50) and in deployments initial_events (which additionally accept system.message).",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "client→server",
  "event": "user.define_outcome",
  "description": "Define an outcome (description + rubric text or file, optional max_iterations default 3 max 20) for the agent to work toward; the agent starts immediately. Echoed back with `outcome_id`. One outcome at a time. Reference: Parameters for defining an outcome the agent should work toward. The agent begins work on receipt.",
  "schema": {
   "official_type_name": "BetaManagedAgentsUserDefineOutcomeEventParams",
   "fields": {
    "type": {
     "type": "\"user.define_outcome\"",
     "required": true
    },
    "description": {
     "type": "string",
     "required": true,
     "description": "What the agent should produce. This is the task specification."
    },
    "rubric": {
     "type": "BetaManagedAgentsFileRubricParams or BetaManagedAgentsTextRubricParams",
     "required": true,
     "description": "Rubric for grading the quality of an outcome.",
     "fields": {
      "<BetaManagedAgentsFileRubricParams>": {
       "type": "BetaManagedAgentsFileRubricParams object",
       "description": "Rubric referenced by a file uploaded via the Files API.",
       "fields": {
        "type": {
         "type": "\"file\"",
         "required": true
        },
        "file_id": {
         "type": "string",
         "required": true,
         "description": "ID of the rubric file."
        }
       }
      },
      "<BetaManagedAgentsTextRubricParams>": {
       "type": "BetaManagedAgentsTextRubricParams object",
       "description": "Rubric content provided inline as text.",
       "fields": {
        "type": {
         "type": "\"text\"",
         "required": true
        },
        "content": {
         "type": "string",
         "required": true,
         "description": "Rubric content. Plain text or markdown — the grader treats it as freeform text. Maximum 262144 characters."
        }
       }
      }
     }
    },
    "max_iterations": {
     "type": "number or null",
     "description": "Eval→revision cycles before giving up. Default 3, max 20."
    }
   }
  },
  "schema_name": "BetaManagedAgentsUserDefineOutcomeEventParams",
  "example": {
   "type": "user.define_outcome",
   "description": "Build a DCF model for Costco in .xlsx",
   "rubric": {
    "type": "file",
    "file_id": "file_01..."
   },
   "max_iterations": 5
  },
  "notes": "Sent in POST /v1/sessions/{session_id}/events body {\"events\":[...]}. user.message and user.define_outcome are also accepted in POST /v1/sessions initial_events (max 50) and in deployments initial_events (which additionally accept system.message).",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "client→server",
  "event": "user.tool_result",
  "description": "For sessions on `self_hosted` environments only: your worker returns the result of an `agent_toolset` tool call (bash/read/write/edit/glob/grep). The SDK worker / `ant beta:worker` do this automatically. Reference: Parameters for providing the result of an agent-toolset tool execution. Only valid on `self_hosted` environments, where sandbox-routed tools are executed by the client rather than the server.",
  "schema": {
   "official_type_name": "BetaManagedAgentsUserToolResultEventParams",
   "fields": {
    "type": {
     "type": "\"user.tool_result\"",
     "required": true
    },
    "tool_use_id": {
     "type": "string",
     "required": true,
     "description": "The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field."
    },
    "content": {
     "type": "array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock",
     "description": "The result content returned by the tool.",
     "fields": {
      "<BetaManagedAgentsTextBlock>": {
       "type": "BetaManagedAgentsTextBlock object",
       "description": "Regular text content."
      },
      "<BetaManagedAgentsImageBlock>": {
       "type": "BetaManagedAgentsImageBlock object",
       "description": "Image content specified directly as base64 data or as a reference via a URL."
      },
      "<BetaManagedAgentsDocumentBlock>": {
       "type": "BetaManagedAgentsDocumentBlock object",
       "description": "Document content, either specified directly as base64 data, as text, or as a reference via a URL."
      },
      "<BetaManagedAgentsSearchResultBlock>": {
       "type": "BetaManagedAgentsSearchResultBlock object",
       "description": "A block containing a web search result."
      }
     }
    },
    "is_error": {
     "type": "boolean or null",
     "description": "Whether the tool execution resulted in an error."
    }
   }
  },
  "schema_name": "BetaManagedAgentsUserToolResultEventParams",
  "notes": "Sent in POST /v1/sessions/{session_id}/events body {\"events\":[...]}. user.message and user.define_outcome are also accepted in POST /v1/sessions initial_events (max 50) and in deployments initial_events (which additionally accept system.message).",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "managed-agents",
  "direction": "client→server",
  "event": "system.message",
  "description": "Append privileged system-level context (text only, 1-1000 items) for the accompanying turn and all subsequent turns, as a role:\"system\" turn. At most one per request, must be last. Supported on Claude Fable 5.1, Mythos 5.1, Fable 5, Mythos 5, Opus 5, Opus 4.8; otherwise 400 `model_does_not_support_mid_conversation_system`. Reference: Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a `role: \"system\"` turn rather than replacing the top-level system prompt. At most one per request: it must be the final event and immediately follow the `user.message`, `user.tool_result`, or `user.custom_tool_result` it accompanies. Only supported on models that accept mid-conversation system messages.",
  "schema": {
   "official_type_name": "BetaManagedAgentsSystemMessageEventParams",
   "fields": {
    "type": {
     "type": "\"system.message\"",
     "required": true
    },
    "content": {
     "type": "array of BetaManagedAgentsSystemContentBlock",
     "required": true,
     "description": "System content blocks to append. Text-only.",
     "fields": {
      "type": {
       "type": "\"text\"",
       "required": true
      },
      "text": {
       "type": "string",
       "required": true,
       "description": "The text content."
      }
     }
    }
   }
  },
  "schema_name": "BetaManagedAgentsSystemMessageEventParams",
  "example": {
   "type": "system.message",
   "content": [
    {
     "type": "text",
     "text": "The user's current timezone is America/New_York."
    }
   ]
  },
  "notes": "Sent in POST /v1/sessions/{session_id}/events body {\"events\":[...]}. user.message and user.define_outcome are also accepted in POST /v1/sessions initial_events (max 50) and in deployments initial_events (which additionally accept system.message).",
  "source": {
   "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send",
   "retrieved_at": "2026-09-18"
  },
  "sources": [
   {
    "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/reference",
    "retrieved_at": "2026-09-18"
   },
   {
    "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming",
    "retrieved_at": "2026-09-18"
   }
  ],
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "beta_header": "managed-agents-2026-04-01",
  "_fragment": "generated/fragments/streaming-events/anthropic-managed-agents.json",
  "api_raw": "managed-agents"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "message_start",
  "description": "First event. Carries a Message with empty content[], stop_reason null and initial usage (input_tokens, cache fields, output_tokens≈1, service_tier, inference_geo). Under thinking-binding-controls beta also `input_transformations`.",
  "schema": {
   "type": "message_start",
   "message": "Message (content: [], stop_reason: null)"
  },
  "example": {
   "type": "message_start",
   "message": {
    "id": "msg_011CfBxdepf8pJzAy8mYQMdq",
    "type": "message",
    "role": "assistant",
    "model": "claude-haiku-4-5-20251001",
    "content": [],
    "container": null,
    "stop_reason": null,
    "stop_sequence": null,
    "stop_details": null,
    "usage": {
     "input_tokens": 11,
     "cache_creation_input_tokens": 0,
     "cache_read_input_tokens": 0,
     "cache_creation": {
      "ephemeral_5m_input_tokens": 0,
      "ephemeral_1h_input_tokens": 0
     },
     "output_tokens": 1,
     "service_tier": "standard",
     "inference_geo": "not_available"
    }
   }
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/streaming",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "ordering": "exactly once, first",
  "_fragment": "generated/fragments/streaming-events/anthropic-messages.json",
  "api_raw": "POST /v1/messages (stream=true)"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_start",
  "description": "Opens content block `index`. content_block is the empty shell: text {text:''}, tool_use {id,name,input:{},caller}, thinking {thinking:'',signature:''}, server_tool_use, or a complete server-tool result block (web_search_tool_result, fallback…) that has no deltas.",
  "schema": {
   "type": "content_block_start",
   "index": "integer",
   "content_block": "ContentBlock (shell)"
  },
  "example": {
   "type": "content_block_start",
   "index": 0,
   "content_block": {
    "type": "tool_use",
    "id": "toolu_01CdL4eFnH8XJ3UK7Wx4o7zs",
    "name": "get_weather",
    "input": {},
    "caller": {
     "type": "direct"
    }
   }
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/streaming",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "ordering": "once per block, before its deltas; indexes increase 0,1,2…",
  "_fragment": "generated/fragments/streaming-events/anthropic-messages.json",
  "api_raw": "POST /v1/messages (stream=true)"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_delta / text_delta",
  "description": "Appends text to a text block.",
  "schema": {
   "type": "content_block_delta",
   "index": "integer",
   "delta": {
    "type": "text_delta",
    "text": "string"
   }
  },
  "example": {
   "type": "content_block_delta",
   "index": 0,
   "delta": {
    "type": "text_delta",
    "text": "OK"
   }
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/streaming",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "_fragment": "generated/fragments/streaming-events/anthropic-messages.json",
  "api_raw": "POST /v1/messages (stream=true)"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_delta / input_json_delta",
  "description": "Partial JSON string fragments of tool_use/server_tool_use `input`; concatenate and parse at content_block_stop. First fragment is often ''. Without eager_input_streaming the API buffers whole key/value pairs; with it fragments arrive unbuffered and may be invalid JSON.",
  "schema": {
   "type": "content_block_delta",
   "index": "integer",
   "delta": {
    "type": "input_json_delta",
    "partial_json": "string"
   }
  },
  "example": {
   "type": "content_block_delta",
   "index": 0,
   "delta": {
    "type": "input_json_delta",
    "partial_json": "{\"city\""
   }
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/streaming",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "observed_fragments": [
   "",
   "{\"city\"",
   ": \"Pari",
   "s\"}"
  ],
  "_fragment": "generated/fragments/streaming-events/anthropic-messages.json",
  "api_raw": "POST /v1/messages (stream=true)"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_delta / thinking_delta",
  "description": "Appends reasoning text to a thinking block (empty string when display=omitted).",
  "schema": {
   "type": "content_block_delta",
   "index": "integer",
   "delta": {
    "type": "thinking_delta",
    "thinking": "string"
   }
  },
  "example": {
   "type": "content_block_delta",
   "index": 0,
   "delta": {
    "type": "thinking_delta",
    "thinking": "The user is asking me to reply with"
   }
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/streaming",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "_fragment": "generated/fragments/streaming-events/anthropic-messages.json",
  "api_raw": "POST /v1/messages (stream=true)"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_delta / signature_delta",
  "description": "Signature of the thinking block, sent once just before its content_block_stop; replay it unchanged in later turns.",
  "schema": {
   "type": "content_block_delta",
   "index": "integer",
   "delta": {
    "type": "signature_delta",
    "signature": "string"
   }
  },
  "example": {
   "type": "content_block_delta",
   "index": 0,
   "delta": {
    "type": "signature_delta",
    "signature": "EuwCCpoBCBEYAipA…"
   }
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/streaming",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "_fragment": "generated/fragments/streaming-events/anthropic-messages.json",
  "api_raw": "POST /v1/messages (stream=true)"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_delta / citations_delta",
  "description": "Adds one citation to a text block (char_location | page_location | content_block_location | web_search_result_location | search_result_location).",
  "schema": {
   "type": "content_block_delta",
   "index": "integer",
   "delta": {
    "type": "citations_delta",
    "citation": "TextCitation"
   }
  },
  "example": {
   "type": "content_block_delta",
   "index": 0,
   "delta": {
    "type": "citations_delta",
    "citation": {
     "type": "char_location",
     "cited_text": "The sky is blue.",
     "document_index": 0,
     "document_title": "note",
     "start_char_index": 0,
     "end_char_index": 16
    }
   }
  },
  "source": "https://platform.claude.com/docs/en/api/messages",
  "status": [
   "DOCUMENTED"
  ],
  "_fragment": "generated/fragments/streaming-events/anthropic-messages.json",
  "api_raw": "POST /v1/messages (stream=true)"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_stop",
  "description": "Closes block `index`.",
  "schema": {
   "type": "content_block_stop",
   "index": "integer"
  },
  "example": {
   "type": "content_block_stop",
   "index": 0
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/streaming",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "_fragment": "generated/fragments/streaming-events/anthropic-messages.json",
  "api_raw": "POST /v1/messages (stream=true)"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "message_delta",
  "description": "Top-level changes to the final Message: delta{stop_reason, stop_sequence, stop_details, container} and CUMULATIVE usage {input_tokens, cache_creation_input_tokens, cache_read_input_tokens, output_tokens, output_tokens_details?{thinking_tokens}, server_tool_use?}. Beta adds usage.iterations/fallback_credit and input_transformations after a fallback.",
  "schema": {
   "type": "message_delta",
   "delta": {
    "stop_reason": "StopReason",
    "stop_sequence": "string|null",
    "stop_details": "RefusalStopDetails|null",
    "container": "Container|null"
   },
   "usage": "MessageDeltaUsage"
  },
  "example": {
   "type": "message_delta",
   "delta": {
    "stop_reason": "end_turn",
    "stop_sequence": null,
    "stop_details": null,
    "container": null
   },
   "usage": {
    "input_tokens": 40,
    "cache_creation_input_tokens": 0,
    "cache_read_input_tokens": 0,
    "output_tokens": 39,
    "output_tokens_details": {
     "thinking_tokens": 32
    }
   }
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/streaming",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "ordering": "one or more, after the last content_block_stop; stop_reason only here (null in message_start)",
  "_fragment": "generated/fragments/streaming-events/anthropic-messages.json",
  "api_raw": "POST /v1/messages (stream=true)"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "message_stop",
  "description": "Last event; no payload besides type.",
  "schema": {
   "type": "message_stop"
  },
  "example": {
   "type": "message_stop"
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/streaming",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "ordering": "exactly once, last",
  "_fragment": "generated/fragments/streaming-events/anthropic-messages.json",
  "api_raw": "POST /v1/messages (stream=true)"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "ping",
  "description": "Keep-alive; may appear anywhere, any number of times (live: right after the first content_block_start).",
  "schema": {
   "type": "ping"
  },
  "example": {
   "type": "ping"
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/streaming",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "_fragment": "generated/fragments/streaming-events/anthropic-messages.json",
  "api_raw": "POST /v1/messages (stream=true)"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "error",
  "description": "Mid-stream error after the HTTP 200 (e.g. overloaded_error ≙ 529, api_error). Same shape as HTTP error bodies without request_id; SDKs raise (C#: AnthropicSseException).",
  "schema": {
   "type": "error",
   "error": {
    "type": "overloaded_error|api_error|…",
    "message": "string"
   }
  },
  "example": {
   "type": "error",
   "error": {
    "type": "overloaded_error",
    "message": "Overloaded"
   }
  },
  "source": "https://platform.claude.com/docs/en/build-with-claude/streaming",
  "status": [
   "DOCUMENTED"
  ],
  "_fragment": "generated/fragments/streaming-events/anthropic-messages.json",
  "api_raw": "POST /v1/messages (stream=true)"
 },
 {
  "provider": "anthropic",
  "api": "messages",
  "direction": "server→client",
  "event": "(unknown event types)",
  "description": "Versioning policy: new event types may be added; clients must ignore unknown events gracefully.",
  "schema": {},
  "example": {},
  "source": "https://platform.claude.com/docs/en/api/versioning",
  "status": [
   "DOCUMENTED"
  ],
  "_fragment": "generated/fragments/streaming-events/anthropic-messages.json",
  "api_raw": "POST /v1/messages (stream=true)"
 },
 {
  "provider": "anthropic",
  "api": "complete-legacy",
  "direction": "server→client",
  "event": "completion (legacy /v1/complete)",
  "description": "Legacy Text Completions streamed `completion` events (incremental text since version 2023-06-01). Endpoint now returns 400 deprecated.",
  "schema": {
   "type": "completion",
   "completion": "string",
   "stop_reason": "string|null",
   "model": "string"
  },
  "example": {},
  "source": "https://platform.claude.com/docs/en/api/completions",
  "status": [
   "DOCUMENTED",
   "LEGACY",
   "DEPRECATED"
  ],
  "_fragment": "generated/fragments/streaming-events/anthropic-messages.json",
  "api_raw": "POST /v1/complete (stream=true)"
 },
 {
  "provider": "gemini",
  "api": "generate-content",
  "direction": "server→client",
  "event": "sse_framing",
  "description": "With `?alt=sse` the response is `text/event-stream`; every chunk is one line `data: <GenerateContentResponse JSON>` followed by an empty line (CRLF). There is no `event:` name, no `id:`, no `[DONE]` sentinel — the stream simply ends after the chunk whose candidate has `finishReason`. Errors before the first chunk are ordinary JSON error bodies with the HTTP status (429 observed).",
  "schema": {
   "line": "data: {…}",
   "separator": "\\r\\n\\r\\n",
   "content_type": "text/event-stream"
  },
  "example": "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"1 \"}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 13,\"candidatesTokenCount\": 2,\"totalTokenCount\": 15,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 13}]},\"modelVersion\": \"gemini-3.5-flash-lite\",\"responseId\": \"bwWu…\"}",
  "source": "https://ai.google.dev/gemini-api/docs/generate-content/text-generation",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "ordering": "framing",
  "_fragment": "generated/fragments/streaming-events/gemini-core.json",
  "api_raw": "POST /v1beta/models/{model}:streamGenerateContent"
 },
 {
  "provider": "gemini",
  "api": "generate-content",
  "direction": "server→client",
  "event": "json_array_framing",
  "description": "Without `alt=sse` the response is `application/json; charset=UTF-8`: a pretty-printed JSON array streamed incrementally — first line `[{`, chunks separated by a line containing only `,`, closed by `]`. Parse with an incremental JSON array reader (or just JSON.parse the whole body when done). Same chunk objects and sequence as SSE (verified byte-for-byte equivalent content, 122 lines vs 8).",
  "schema": {
   "body": "[{…}\\n,\\n{…}\\n]",
   "content_type": "application/json; charset=UTF-8"
  },
  "example": "[{\n  \"candidates\": [ … ]\n}\n,\n{\n  …\n}\n]",
  "source": "https://ai.google.dev/api/generate-content",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "ordering": "framing",
  "_fragment": "generated/fragments/streaming-events/gemini-core.json",
  "api_raw": "POST /v1beta/models/{model}:streamGenerateContent"
 },
 {
  "provider": "gemini",
  "api": "generate-content",
  "direction": "server→client",
  "event": "chunk",
  "description": "Partial GenerateContentResponse. `candidates[0].content.parts[]` holds the delta (text, or later functionCall/inlineData parts); `index` present; `finishReason` ABSENT until the last chunk; `usageMetadata` is present in EVERY chunk with the prompt count and the running candidatesTokenCount; `modelVersion` and `responseId` repeat on every chunk (responseId constant for the stream).",
  "schema": {
   "candidates": [
    {
     "content": {
      "parts": [
       {
        "text": "string"
       }
      ],
      "role": "model"
     },
     "index": 0
    }
   ],
   "usageMetadata": "UsageMetadata (running)",
   "modelVersion": "string",
   "responseId": "string"
  },
  "example": {
   "candidates": [
    {
     "content": {
      "parts": [
       {
        "text": "2 3 4 5 6 7 8 9 10"
       }
      ],
      "role": "model"
     },
     "index": 0
    }
   ],
   "usageMetadata": {
    "promptTokenCount": 13,
    "candidatesTokenCount": 11,
    "totalTokenCount": 24,
    "promptTokensDetails": [
     {
      "modality": "TEXT",
      "tokenCount": 13
     }
    ]
   },
   "modelVersion": "gemini-3.5-flash-lite",
   "responseId": "bwWuasWFKLCg_PUP1deUqA4"
  },
  "source": "https://ai.google.dev/api/generate-content",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "ordering": "1..N, in order; text deltas concatenate",
  "_fragment": "generated/fragments/streaming-events/gemini-core.json",
  "api_raw": "POST /v1beta/models/{model}:streamGenerateContent"
 },
 {
  "provider": "gemini",
  "api": "generate-content",
  "direction": "server→client",
  "event": "thought_chunk",
  "description": "When `thinkingConfig.includeThoughts` is true and the model emits a summary, thought chunks arrive first with parts `{text, thought: true}` (rolling, incremental summaries), then answer chunks. Not guaranteed: on gemini-3.5-flash with thinkingBudget 128 the stream carried 103 thought tokens (usageMetadata.thoughtsTokenCount) but no thought part was emitted.",
  "schema": {
   "candidates": [
    {
     "content": {
      "parts": [
       {
        "text": "string",
        "thought": true
       }
      ],
      "role": "model"
     },
     "index": 0
    }
   ]
  },
  "example": {
   "candidates": [
    {
     "content": {
      "parts": [
       {
        "text": "**My Calculation…**",
        "thought": true
       }
      ],
      "role": "model"
     },
     "index": 0
    }
   ]
  },
  "source": "https://ai.google.dev/gemini-api/docs/generate-content/thinking",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "ordering": "before answer chunks, optional",
  "_fragment": "generated/fragments/streaming-events/gemini-core.json",
  "api_raw": "POST /v1beta/models/{model}:streamGenerateContent"
 },
 {
  "provider": "gemini",
  "api": "generate-content",
  "direction": "server→client",
  "event": "final_chunk",
  "description": "Last chunk: candidate carries `finishReason` (STOP | MAX_TOKENS | SAFETY | …) and, on Gemini 3 models, a trailing part with EMPTY text plus the `thoughtSignature` for the turn (parsers must accept empty-text parts and read signatures even when no function call is present). `usageMetadata` is final (thoughtsTokenCount when thinking; serviceTier). No further event follows.",
  "schema": {
   "candidates": [
    {
     "content": {
      "parts": [
       {
        "text": "",
        "thoughtSignature": "base64"
       }
      ],
      "role": "model"
     },
     "finishReason": "STOP",
     "index": 0
    }
   ],
   "usageMetadata": "UsageMetadata (final)"
  },
  "example": {
   "candidates": [
    {
     "content": {
      "parts": [
       {
        "text": "",
        "thoughtSignature": "El4KXAFpFH0Tj8ibw628e4UGqQ/FKjqAxyrUKGYdJjscvhzEIdwXPojRcRqghAV7ag+au7NSSEk+dDmeZ/ifCrT2xowk/MYXT8undf7sBSJGt2HvoKnHy8+Ubm…"
       }
      ],
      "role": "model"
     },
     "finishReason": "STOP",
     "index": 0
    }
   ],
   "usageMetadata": {
    "promptTokenCount": 13,
    "candidatesTokenCount": 26,
    "totalTokenCount": 39,
    "promptTokensDetails": [
     {
      "modality": "TEXT",
      "tokenCount": 13
     }
    ],
    "serviceTier": "standard"
   },
   "modelVersion": "gemini-3.5-flash-lite",
   "responseId": "bwWuasWFKLCg_PUP1deUqA4"
  },
  "source": "https://ai.google.dev/gemini-api/docs/generate-content/thought-signatures",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "ordering": "exactly once, last",
  "_fragment": "generated/fragments/streaming-events/gemini-core.json",
  "api_raw": "POST /v1beta/models/{model}:streamGenerateContent"
 },
 {
  "provider": "gemini",
  "api": "generate-content",
  "direction": "server→client",
  "event": "structured_output_chunks",
  "description": "With responseMimeType application/json the text deltas are valid partial JSON strings that concatenate into the final object (docs). Live: SSE 3 chunks: text deltas 13 + 24 chars of partial JSON ('{\"colors\": [\"red\", …'), final chunk empty text + thoughtSignature, finishReason MAX_TOKENS (maxOutputTokens 32).",
  "schema": {
   "candidates": [
    {
     "content": {
      "parts": [
       {
        "text": "partial JSON"
       }
      ]
     }
    }
   ]
  },
  "example": {
   "parts": [
    {
     "text": "{\"colors\": [\"red\","
    }
   ]
  },
  "source": "https://ai.google.dev/gemini-api/docs/generate-content/structured-output",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "ordering": "1..N",
  "_fragment": "generated/fragments/streaming-events/gemini-core.json",
  "api_raw": "POST /v1beta/models/{model}:streamGenerateContent"
 },
 {
  "provider": "gemini",
  "api": "generate-content",
  "direction": "server→client",
  "event": "prompt_blocked",
  "description": "If the prompt itself is blocked the (single) response has `promptFeedback.blockReason` (SAFETY | OTHER | BLOCKLIST | PROHIBITED_CONTENT | IMAGE_SAFETY) + `promptFeedback.safetyRatings` and NO candidates. Not triggered by this atlas (harmless prompts only).",
  "schema": {
   "promptFeedback": {
    "blockReason": "SAFETY",
    "safetyRatings": [
     {
      "category": "HARM_CATEGORY_…",
      "probability": "HIGH",
      "blocked": true
     }
    ]
   }
  },
  "example": null,
  "source": "https://ai.google.dev/gemini-api/docs/safety-settings",
  "status": [
   "DOCUMENTED",
   "UNVERIFIED"
  ],
  "ordering": "replaces the chunk sequence",
  "_fragment": "generated/fragments/streaming-events/gemini-core.json",
  "api_raw": "POST /v1beta/models/{model}:streamGenerateContent"
 },
 {
  "provider": "gemini",
  "api": "generate-content",
  "direction": "server→client",
  "event": "single_event_alt_sse_on_generateContent",
  "description": "Undocumented: calling the NON-streaming :generateContent with `?alt=sse` returns `text/event-stream` with exactly one `data:` line carrying the complete response.",
  "schema": {
   "line": "data: <full GenerateContentResponse>"
  },
  "example": "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"OK.\",\"thoughtSignature\": \"…\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {…},\"modelVersion\": \"gemini-3.5-flash-lite\",\"responseId\": \"agWu…\"}",
  "source": "https://generativelanguage.googleapis.com/$discovery/rest?version=v1beta",
  "status": [
   "LIVE_DISCOVERED",
   "LIVE_VERIFIED"
  ],
  "ordering": "exactly once",
  "_fragment": "generated/fragments/streaming-events/gemini-core.json",
  "api_raw": "POST /v1beta/models/{model}:generateContent?alt=sse"
 },
 {
  "provider": "gemini",
  "api": "interactions",
  "direction": "server→client",
  "event": "interaction.created",
  "description": "First event: the interaction resource has been created (partial Interaction: id, model|agent, object, status in_progress).",
  "schema": {
   "event_type": "'interaction.created'",
   "event_id": "string (resume token, optional)",
   "interaction": {
    "id": "string (required)",
    "object": "string ('interaction')",
    "model": "string",
    "agent": "string",
    "status": "in_progress|requires_action|completed|failed|cancelled|incomplete",
    "service_tier": "flex|standard|priority",
    "created": "ISO 8601",
    "updated": "ISO 8601",
    "steps": "Step[] (only if included; normally absent)",
    "usage": {
     "total_input_tokens": "integer",
     "total_output_tokens": "integer",
     "total_thought_tokens": "integer",
     "total_cached_tokens": "integer",
     "total_tool_use_tokens": "integer",
     "total_tokens": "integer",
     "input_tokens_by_modality": "ModalityTokens[] {modality: text|image|audio|video|document, tokens}",
     "output_tokens_by_modality": "ModalityTokens[]",
     "cached_tokens_by_modality": "ModalityTokens[]",
     "tool_use_tokens_by_modality": "ModalityTokens[]",
     "grounding_tool_count": "GroundingToolCount[] {type: google_search|google_maps, count}"
    }
   }
  },
  "example": {
   "event_id": "evt_123",
   "event_type": "interaction.created",
   "interaction": {
    "id": "v1_ChdXS0l4...",
    "model": "gemini-3-flash-preview",
    "object": "interaction",
    "status": "in_progress"
   }
  },
  "order_hint": 10,
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/api/interactions#Resource:InteractionSseEvent",
  "transport": "SSE (`event:` line = event_type, `data:` = JSON) on POST /v1beta/interactions {stream:true} and GET /v1beta/interactions/{id}?stream=true",
  "schema_name": "InteractionCreatedEvent",
  "live_observation_2026_09_18": "{interaction:{id,status:in_progress,object,model}, event_type}",
  "_fragment": "generated/fragments/streaming-events/gemini-interactions.json"
 },
 {
  "provider": "gemini",
  "api": "interactions",
  "direction": "server→client",
  "event": "interaction.status_update",
  "description": "Interaction-level status transition; may appear between steps (e.g. in_progress → requires_action). The breaking-changes guide says it is being replaced by `interaction.in_progress` / `interaction.requires_action`, but the current reference and live-shaped guide streams still emit it.",
  "schema": {
   "event_type": "'interaction.status_update'",
   "event_id": "string",
   "interaction_id": "string (required)",
   "status": "in_progress|requires_action|completed|failed|cancelled|incomplete|budget_exceeded(deprecated) (required)"
  },
  "example": {
   "event_type": "interaction.status_update",
   "interaction_id": "v1_ChdTMjQ0...",
   "status": "in_progress"
  },
  "order_hint": 20,
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/api/interactions#Resource:InteractionSseEvent",
  "transport": "SSE (`event:` line = event_type, `data:` = JSON) on POST /v1beta/interactions {stream:true} and GET /v1beta/interactions/{id}?stream=true",
  "schema_name": "InteractionStatusUpdate",
  "live_observation_2026_09_18": "{interaction_id, status:in_progress, event_type}",
  "_fragment": "generated/fragments/streaming-events/gemini-interactions.json"
 },
 {
  "provider": "gemini",
  "api": "interactions",
  "direction": "server→client",
  "event": "interaction.in_progress",
  "description": "Listed as a NEW event type in the May-2026 breaking-changes guide (replacing interaction.status_update) but NOT defined in the InteractionSseEvent reference union and not shown in any example stream. UNVERIFIED.",
  "schema": {
   "event_type": "'interaction.in_progress'",
   "interaction_id?": "string"
  },
  "example": null,
  "order_hint": 21,
  "status": [
   "DOCUMENTED",
   "UNVERIFIED",
   "DOCUMENTATION_INCOMPLETE"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/interactions-breaking-changes-may-2026",
  "transport": "SSE (`event:` line = event_type, `data:` = JSON) on POST /v1beta/interactions {stream:true} and GET /v1beta/interactions/{id}?stream=true",
  "_fragment": "generated/fragments/streaming-events/gemini-interactions.json"
 },
 {
  "provider": "gemini",
  "api": "interactions",
  "direction": "server→client",
  "event": "interaction.requires_action",
  "description": "Listed as a NEW event type in the breaking-changes guide (interaction paused for client input, e.g. function_call). Not in the reference union; also the name of a webhook event. UNVERIFIED as SSE event.",
  "schema": {
   "event_type": "'interaction.requires_action'",
   "interaction_id?": "string"
  },
  "example": null,
  "order_hint": 22,
  "status": [
   "DOCUMENTED",
   "UNVERIFIED",
   "DOCUMENTATION_INCOMPLETE"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/interactions-breaking-changes-may-2026",
  "transport": "SSE (`event:` line = event_type, `data:` = JSON) on POST /v1beta/interactions {stream:true} and GET /v1beta/interactions/{id}?stream=true",
  "_fragment": "generated/fragments/streaming-events/gemini-interactions.json"
 },
 {
  "provider": "gemini",
  "api": "interactions",
  "direction": "server→client",
  "event": "step.start",
  "description": "Marks the beginning of step `index`; `step` carries the step type (model_output, thought, function_call [with id, name, arguments {}], user_input, or server-tool *_call/*_result). Determines which delta types follow.",
  "schema": {
   "event_type": "'step.start'",
   "event_id": "string",
   "index": "integer (required)",
   "step": "Step (required; partial, e.g. {type:'model_output'} or {type:'function_call', id, name, arguments:{}})"
  },
  "example": {
   "event_type": "step.start",
   "index": 0,
   "step": {
    "type": "function_call",
    "id": "un6k8t18",
    "name": "get_weather",
    "arguments": {}
   }
  },
  "order_hint": 30,
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/api/interactions#Resource:InteractionSseEvent",
  "transport": "SSE (`event:` line = event_type, `data:` = JSON) on POST /v1beta/interactions {stream:true} and GET /v1beta/interactions/{id}?stream=true",
  "schema_name": "StepStart",
  "live_observation_2026_09_18": "{index, step:{type}, event_type} — types seen: thought, model_output",
  "_fragment": "generated/fragments/streaming-events/gemini-interactions.json"
 },
 {
  "provider": "gemini",
  "api": "interactions",
  "direction": "server→client",
  "event": "step.delta",
  "description": "step.delta variant `delta.type = processing_result`. ProcessingResultDelta: result of a server-initiated media processing step.",
  "schema": {
   "event_type": "'step.delta'",
   "index": "integer",
   "delta": {
    "type": "'processing_result'",
    "signature": "string"
   }
  },
  "example": {
   "event_type": "step.delta",
   "index": 0,
   "delta": {
    "type": "processing_result"
   }
  },
  "order_hint": 64,
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "source": "https://ai.google.dev/api/interactions#Resource:InteractionSseEvent",
  "transport": "SSE (`event:` line = event_type, `data:` = JSON) on POST /v1beta/interactions {stream:true} and GET /v1beta/interactions/{id}?stream=true",
  "delta_type": "processing_result",
  "schema_name": "ProcessingResultDelta",
  "_fragment": "generated/fragments/streaming-events/gemini-interactions.json"
 },
 {
  "provider": "gemini",
  "api": "interactions",
  "direction": "server→client",
  "event": "step.stop",
  "description": "Marks the end of step `index`. May carry `step_usage` (this step) and `usage` (cumulative).",
  "schema": {
   "event_type": "'step.stop'",
   "event_id": "string",
   "index": "integer (required)",
   "step_usage": {
    "total_input_tokens": "integer",
    "total_output_tokens": "integer",
    "total_thought_tokens": "integer",
    "total_cached_tokens": "integer",
    "total_tool_use_tokens": "integer",
    "total_tokens": "integer",
    "input_tokens_by_modality": "ModalityTokens[] {modality: text|image|audio|video|document, tokens}",
    "output_tokens_by_modality": "ModalityTokens[]",
    "cached_tokens_by_modality": "ModalityTokens[]",
    "tool_use_tokens_by_modality": "ModalityTokens[]",
    "grounding_tool_count": "GroundingToolCount[] {type: google_search|google_maps, count}"
   },
   "usage": {
    "total_input_tokens": "integer",
    "total_output_tokens": "integer",
    "total_thought_tokens": "integer",
    "total_cached_tokens": "integer",
    "total_tool_use_tokens": "integer",
    "total_tokens": "integer",
    "input_tokens_by_modality": "ModalityTokens[] {modality: text|image|audio|video|document, tokens}",
    "output_tokens_by_modality": "ModalityTokens[]",
    "cached_tokens_by_modality": "ModalityTokens[]",
    "tool_use_tokens_by_modality": "ModalityTokens[]",
    "grounding_tool_count": "GroundingToolCount[] {type: google_search|google_maps, count}"
   }
  },
  "example": {
   "event_type": "step.stop",
   "index": 0
  },
  "order_hint": 70,
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/api/interactions#Resource:InteractionSseEvent",
  "transport": "SSE (`event:` line = event_type, `data:` = JSON) on POST /v1beta/interactions {stream:true} and GET /v1beta/interactions/{id}?stream=true",
  "schema_name": "StepStop",
  "live_observation_2026_09_18": "{index, event_type}",
  "_fragment": "generated/fragments/streaming-events/gemini-interactions.json"
 },
 {
  "provider": "gemini",
  "api": "interactions",
  "direction": "server→client",
  "event": "interaction.completed",
  "description": "Final event: partial Interaction with terminal `status` and `usage` (no `steps`). In non-streaming mode this object is the top-level response.",
  "schema": {
   "event_type": "'interaction.completed'",
   "event_id": "string",
   "interaction": {
    "id": "string (required)",
    "object": "string ('interaction')",
    "model": "string",
    "agent": "string",
    "status": "in_progress|requires_action|completed|failed|cancelled|incomplete",
    "service_tier": "flex|standard|priority",
    "created": "ISO 8601",
    "updated": "ISO 8601",
    "steps": "Step[] (only if included; normally absent)",
    "usage": {
     "total_input_tokens": "integer",
     "total_output_tokens": "integer",
     "total_thought_tokens": "integer",
     "total_cached_tokens": "integer",
     "total_tool_use_tokens": "integer",
     "total_tokens": "integer",
     "input_tokens_by_modality": "ModalityTokens[] {modality: text|image|audio|video|document, tokens}",
     "output_tokens_by_modality": "ModalityTokens[]",
     "cached_tokens_by_modality": "ModalityTokens[]",
     "tool_use_tokens_by_modality": "ModalityTokens[]",
     "grounding_tool_count": "GroundingToolCount[] {type: google_search|google_maps, count}"
    }
   }
  },
  "example": {
   "event_type": "interaction.completed",
   "interaction": {
    "id": "v1_abc123",
    "status": "completed",
    "object": "interaction",
    "model": "gemini-3-flash-preview",
    "usage": {
     "total_input_tokens": 7,
     "total_output_tokens": 12,
     "total_tokens": 19
    }
   }
  },
  "order_hint": 80,
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/api/interactions#Resource:InteractionSseEvent",
  "transport": "SSE (`event:` line = event_type, `data:` = JSON) on POST /v1beta/interactions {stream:true} and GET /v1beta/interactions/{id}?stream=true",
  "schema_name": "InteractionCompletedEvent",
  "live_observation_2026_09_18": "{interaction:{full Interaction incl. usage}, event_type}",
  "_fragment": "generated/fragments/streaming-events/gemini-interactions.json"
 },
 {
  "provider": "gemini",
  "api": "interactions",
  "direction": "server→client",
  "event": "error",
  "description": "Emitted when an error occurs during the interaction / stream (e.g. not_found on resume, gateway_timeout).",
  "schema": {
   "event_type": "'error'",
   "event_id": "string",
   "error": {
    "code": "string (URI/short code, e.g. not_found, gateway_timeout)",
    "message": "string"
   }
  },
  "example": {
   "event_type": "error",
   "error": {
    "message": "Deadline expired before operation could complete.",
    "code": "gateway_timeout"
   }
  },
  "order_hint": 90,
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "source": "https://ai.google.dev/api/interactions#Resource:InteractionSseEvent",
  "transport": "SSE (`event:` line = event_type, `data:` = JSON) on POST /v1beta/interactions {stream:true} and GET /v1beta/interactions/{id}?stream=true",
  "schema_name": "ErrorEvent",
  "_fragment": "generated/fragments/streaming-events/gemini-interactions.json"
 },
 {
  "provider": "gemini",
  "api": "interactions",
  "direction": "server→client",
  "event": "done",
  "description": "Terminal SSE marker after interaction.completed: `event: done` / `data: [DONE]` (shown in the streaming guide; not part of the InteractionSseEvent union).",
  "schema": {
   "event": "done",
   "data": "[DONE] (literal, not JSON)"
  },
  "example": "event: done\ndata: [DONE]",
  "order_hint": 99,
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/streaming",
  "transport": "SSE (`event:` line = event_type, `data:` = JSON) on POST /v1beta/interactions {stream:true} and GET /v1beta/interactions/{id}?stream=true",
  "live_observation_2026_09_18": "terminal SSE frame 'event: done' / 'data: [DONE]'",
  "_fragment": "generated/fragments/streaming-events/gemini-interactions.json"
 },
 {
  "provider": "gemini",
  "api": "interactions",
  "direction": "server→client",
  "event": "interaction.start",
  "description": "LEGACY event type of the pre-May-2026 `outputs` schema, replaced by `interaction.created`. Only emitted with `Api-Revision: 2026-05-07`; legacy schema removed 2026-06-08.",
  "schema": {
   "event_type": "'interaction.start'"
  },
  "example": null,
  "order_hint": 100,
  "status": [
   "DEPRECATED",
   "RETIRED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/interactions-breaking-changes-may-2026",
  "transport": "SSE (`event:` line = event_type, `data:` = JSON) on POST /v1beta/interactions {stream:true} and GET /v1beta/interactions/{id}?stream=true",
  "replaced_by": "interaction.created",
  "_fragment": "generated/fragments/streaming-events/gemini-interactions.json"
 },
 {
  "provider": "gemini",
  "api": "interactions",
  "direction": "server→client",
  "event": "content.start",
  "description": "LEGACY event type of the pre-May-2026 `outputs` schema, replaced by `step.start`. Only emitted with `Api-Revision: 2026-05-07`; legacy schema removed 2026-06-08.",
  "schema": {
   "event_type": "'content.start'"
  },
  "example": null,
  "order_hint": 100,
  "status": [
   "DEPRECATED",
   "RETIRED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/interactions-breaking-changes-may-2026",
  "transport": "SSE (`event:` line = event_type, `data:` = JSON) on POST /v1beta/interactions {stream:true} and GET /v1beta/interactions/{id}?stream=true",
  "replaced_by": "step.start",
  "_fragment": "generated/fragments/streaming-events/gemini-interactions.json"
 },
 {
  "provider": "gemini",
  "api": "interactions",
  "direction": "server→client",
  "event": "content.delta",
  "description": "LEGACY event type of the pre-May-2026 `outputs` schema, replaced by `step.delta`. Only emitted with `Api-Revision: 2026-05-07`; legacy schema removed 2026-06-08.",
  "schema": {
   "event_type": "'content.delta'"
  },
  "example": null,
  "order_hint": 100,
  "status": [
   "DEPRECATED",
   "RETIRED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/interactions-breaking-changes-may-2026",
  "transport": "SSE (`event:` line = event_type, `data:` = JSON) on POST /v1beta/interactions {stream:true} and GET /v1beta/interactions/{id}?stream=true",
  "replaced_by": "step.delta",
  "_fragment": "generated/fragments/streaming-events/gemini-interactions.json"
 },
 {
  "provider": "gemini",
  "api": "interactions",
  "direction": "server→client",
  "event": "content.stop",
  "description": "LEGACY event type of the pre-May-2026 `outputs` schema, replaced by `step.stop`. Only emitted with `Api-Revision: 2026-05-07`; legacy schema removed 2026-06-08.",
  "schema": {
   "event_type": "'content.stop'"
  },
  "example": null,
  "order_hint": 100,
  "status": [
   "DEPRECATED",
   "RETIRED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/interactions-breaking-changes-may-2026",
  "transport": "SSE (`event:` line = event_type, `data:` = JSON) on POST /v1beta/interactions {stream:true} and GET /v1beta/interactions/{id}?stream=true",
  "replaced_by": "step.stop",
  "_fragment": "generated/fragments/streaming-events/gemini-interactions.json"
 },
 {
  "provider": "gemini",
  "api": "interactions",
  "direction": "server→client",
  "event": "interaction.complete",
  "description": "LEGACY event type of the pre-May-2026 `outputs` schema, replaced by `interaction.completed`. Only emitted with `Api-Revision: 2026-05-07`; legacy schema removed 2026-06-08.",
  "schema": {
   "event_type": "'interaction.complete'"
  },
  "example": null,
  "order_hint": 100,
  "status": [
   "DEPRECATED",
   "RETIRED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/interactions-breaking-changes-may-2026",
  "transport": "SSE (`event:` line = event_type, `data:` = JSON) on POST /v1beta/interactions {stream:true} and GET /v1beta/interactions/{id}?stream=true",
  "replaced_by": "interaction.completed",
  "_fragment": "generated/fragments/streaming-events/gemini-interactions.json"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "client→server",
  "event": "setup",
  "description": "First (and only first) client message; session configuration for the whole connection (model, generationConfig, systemInstruction, tools, VAD, transcription, resumption, compression, proactivity). Cannot be changed while connected (except via resume with a new setup, model excluded). Wait for setupComplete before sending anything else. A message must contain exactly one of setup/clientContent/realtimeInput/toolResponse.",
  "schema": {
   "official_type_name": "BidiGenerateContentSetup",
   "schema_name": "BidiGenerateContentSetup",
   "fields": {
    "model": {
     "type": "string",
     "required": true,
     "description": "Required. `models/{model}` resource name (e.g. models/gemini-3.8-live)."
    },
    "generationConfig": {
     "type": "GenerationConfig (subset)",
     "required": false,
     "description": "Not supported in Live: responseLogprobs, responseMimeType, logprobs, responseSchema, responseJsonSchema, stopSequence, skipResponseCache, routingConfig, audioTimestamp.",
     "fields": {
      "responseModalities[]": {
       "type": "enum[]",
       "required": false,
       "description": "Requested output modalities. Native audio models support only [\"AUDIO\"] (use outputAudioTranscription for text); gemini-3.5-transcribe-live uses [\"TEXT\"]. SDK default: AUDIO.",
       "enum": [
        "TEXT",
        "AUDIO"
       ]
      },
      "speechConfig": {
       "type": "SpeechConfig",
       "required": false,
       "description": "Voice / language configuration.",
       "fields": {
        "voiceConfig": {
         "type": "VoiceConfig",
         "required": false,
         "description": "Single-voice output configuration.",
         "fields": {
          "prebuiltVoiceConfig": {
           "type": "PrebuiltVoiceConfig",
           "required": false,
           "description": "The prebuilt voice to use.",
           "fields": {
            "voiceName": {
             "type": "string",
             "required": false,
             "description": "Optional. Name of the preset voice (any Gemini TTS voice: Zephyr, Puck, Charon, Kore, Fenrir, Leda, Orus, Aoede, Callirrhoe, Autonoe, Enceladus, Iapetus, Umbriel, Algieba, Despina, Erinome, Algenib, Rasalgethi, Laomedeia, Achernar, Alnilam, Schedar, Gacrux, Pulcherrima, Achird, Zubenelgenubi, Vindemiatrix, Sadachbia, Sadaltager, Sulafat)."
            }
           }
          }
         }
        },
        "multiSpeakerVoiceConfig": {
         "type": "MultiSpeakerVoiceConfig",
         "required": false,
         "description": "Multi-speaker setup; mutually exclusive with voiceConfig (TTS feature; not documented for Live — UNVERIFIED in Live).",
         "fields": {
          "speakerVoiceConfigs[]": {
           "type": "SpeakerVoiceConfig[]",
           "required": true,
           "description": "Required. All enabled speaker voices (SDK doc: exactly two).",
           "fields": {
            "speaker": {
             "type": "string",
             "required": true,
             "description": "Required. Speaker name as used in the prompt."
            },
            "voiceConfig": {
             "type": "VoiceConfig",
             "required": true,
             "description": "Required. Voice for this speaker.",
             "fields": {
              "prebuiltVoiceConfig": {
               "type": "PrebuiltVoiceConfig",
               "required": false,
               "description": "The prebuilt voice to use.",
               "fields": {
                "voiceName": {
                 "type": "string",
                 "required": false,
                 "description": "Optional. Name of the preset voice (any Gemini TTS voice: Zephyr, Puck, Charon, Kore, Fenrir, Leda, Orus, Aoede, Callirrhoe, Autonoe, Enceladus, Iapetus, Umbriel, Algieba, Despina, Erinome, Algenib, Rasalgethi, Laomedeia, Achernar, Alnilam, Schedar, Gacrux, Pulcherrima, Achird, Zubenelgenubi, Vindemiatrix, Sadachbia, Sadaltager, Sulafat)."
                }
               }
              }
             }
            }
           }
          }
         },
         "status": [
          "UNVERIFIED"
         ]
        },
        "languageCode": {
         "type": "string",
         "required": false,
         "description": "Optional. BCP-47 language code for speech recognition and synthesis (de-DE, en-AU, en-GB, en-IN, en-US, es-US, fr-FR, hi-IN, pt-BR, ar-XA, es-ES, fr-CA, id-ID, it-IT, ja-JP, tr-TR, vi-VN, bn-IN, gu-IN, kn-IN, ml-IN, mr-IN, ta-IN, te-IN, nl-NL, ko-KR, cmn-CN, pl-PL, ru-RU, th-TH). Native audio output models choose the language automatically and do NOT support setting it explicitly."
        }
       }
      },
      "mediaResolution": {
       "type": "enum",
       "required": false,
       "description": "Token allocation per visual input frame (LOW=64 tokens, MEDIUM=256, HIGH=zoomed reframing 256). Audio tokenization is fixed per second regardless.",
       "enum": [
        "MEDIA_RESOLUTION_UNSPECIFIED",
        "MEDIA_RESOLUTION_LOW",
        "MEDIA_RESOLUTION_MEDIUM",
        "MEDIA_RESOLUTION_HIGH"
       ]
      },
      "thinkingConfig": {
       "type": "ThinkingConfig",
       "required": false,
       "description": "Thinking configuration (model-dependent, see thinkingLevel).",
       "fields": {
        "thinkingLevel": {
         "type": "enum",
         "required": false,
         "description": "Reasoning depth. gemini-3.1-flash-live-preview: MINIMAL (default), LOW, MEDIUM, HIGH. gemini-3.8-live-extended-thinking: LOW, MEDIUM, HIGH (MINIMAL not supported). gemini-3.8-live: NOT supported — omit thinkingConfig.",
         "enum": [
          "THINKING_LEVEL_UNSPECIFIED",
          "MINIMAL",
          "LOW",
          "MEDIUM",
          "HIGH"
         ]
        },
        "thinkingBudget": {
         "type": "integer",
         "required": false,
         "description": "Thoughts token budget (0 disabled, -1 automatic). Gemini 2.5 native-audio models; replaced by thinkingLevel from Gemini 3.1 onward."
        },
        "includeThoughts": {
         "type": "boolean",
         "required": false,
         "description": "Return thought summaries in modelTurn parts (part.thought=true) when available."
        }
       }
      },
      "translationConfig": {
       "type": "TranslationConfig",
       "required": false,
       "description": "Live translation (gemini-3.5-live-translate-preview only).",
       "fields": {
        "targetLanguageCode": {
         "type": "string",
         "required": true,
         "description": "Required. BCP-47 target language (e.g. \"en\", \"es\", \"pl\"). Guide: defaults to \"en\"."
        },
        "echoTargetLanguage": {
         "type": "boolean",
         "required": false,
         "description": "If true, input already in the target language is echoed (parroted) as audio; if false (default) the model stays silent for it."
        }
       }
      },
      "enableAffectiveDialog": {
       "type": "boolean",
       "required": false,
       "description": "Detect emotions and adapt responses (Gemini 2.5 native audio only; not supported on 3.1; removed on 3.8 — remove from code)."
      },
      "temperature": {
       "type": "number",
       "required": false,
       "description": "Sampling temperature."
      },
      "topP": {
       "type": "number",
       "required": false,
       "description": "Nucleus sampling."
      },
      "topK": {
       "type": "integer",
       "required": false,
       "description": "Top-k sampling."
      },
      "maxOutputTokens": {
       "type": "integer",
       "required": false,
       "description": "Max output tokens."
      },
      "candidateCount": {
       "type": "integer",
       "required": false,
       "description": "Number of candidates."
      },
      "presencePenalty": {
       "type": "number",
       "required": false,
       "description": "Presence penalty."
      },
      "frequencyPenalty": {
       "type": "number",
       "required": false,
       "description": "Frequency penalty."
      },
      "seed": {
       "type": "integer",
       "required": false,
       "description": "Best-effort deterministic seed (SDK LiveConnectConfig)."
      }
     }
    },
    "systemInstruction": {
     "type": "Content",
     "required": false,
     "description": "Text-only parts; each part becomes a separate paragraph.",
     "fields": {
      "role": {
       "type": "string",
       "required": false,
       "description": "\"user\" or \"model\".",
       "enum": [
        "user",
        "model"
       ]
      },
      "parts[]": {
       "type": "Part[]",
       "required": false,
       "description": "Parts: text, inlineData{mimeType,data}, functionCall, functionResponse, thought ... (systemInstruction: text parts only, each part a separate paragraph)."
      }
     }
    },
    "tools[]": {
     "type": "Tool[]",
     "required": false,
     "description": "Tools the model may use.",
     "fields": {
      "functionDeclarations[]": {
       "type": "FunctionDeclaration[]",
       "required": false,
       "description": "Client-executed functions.",
       "fields": {
        "name": {
         "type": "string",
         "required": true,
         "description": "Required. Function name (a-z, A-Z, 0-9, _ - : . ; max 128)."
        },
        "description": {
         "type": "string",
         "required": true,
         "description": "Required. Function description."
        },
        "parameters": {
         "type": "Schema",
         "required": false,
         "description": "OpenAPI-style parameter schema."
        },
        "parametersJsonSchema": {
         "type": "object",
         "required": false,
         "description": "JSON Schema alternative to parameters."
        },
        "behavior": {
         "type": "enum",
         "required": false,
         "description": "Live-only. BLOCKING = model waits for the response; NON_BLOCKING = asynchronous (conversation continues). Default: gemini-3.8-live NON_BLOCKING; gemini-3.8-live-extended-thinking NON_BLOCKING only (BLOCKING = hard error); gemini-3.1-flash-live-preview synchronous only (NON_BLOCKING not supported); Gemini 2.5 supports both.",
         "enum": [
          "UNSPECIFIED",
          "BLOCKING",
          "NON_BLOCKING"
         ]
        },
        "response": {
         "type": "Schema",
         "required": false,
         "description": "Response schema."
        },
        "responseJsonSchema": {
         "type": "object",
         "required": false,
         "description": "JSON Schema for the response."
        }
       }
      },
      "googleSearch": {
       "type": "object {}",
       "required": false,
       "description": "Grounding with Google Search (supported on Live agent models; not on translate/transcribe)."
      },
      "codeExecution": {
       "type": "object {}",
       "required": false,
       "description": "Not supported on current Live models (tools table)."
      },
      "urlContext": {
       "type": "object {}",
       "required": false,
       "description": "Not supported on current Live models (tools table); serverContent.urlContextMetadata exists in the schema nonetheless."
      },
      "googleMaps": {
       "type": "object",
       "required": false,
       "description": "Not supported on Live models."
      }
     }
    },
    "realtimeInputConfig": {
     "type": "RealtimeInputConfig",
     "required": false,
     "description": "VAD / activity handling / turn coverage.",
     "fields": {
      "automaticActivityDetection": {
       "type": "AutomaticActivityDetection",
       "required": false,
       "description": "Server-side VAD; enabled by default if not set.",
       "fields": {
        "disabled": {
         "type": "boolean",
         "required": false,
         "description": "Default false (automatic VAD on: detected voice and text count as activity). true = client must send activityStart/activityEnd."
        },
        "startOfSpeechSensitivity": {
         "type": "enum",
         "required": false,
         "description": "How readily speech start is detected. Default START_SENSITIVITY_HIGH.",
         "enum": [
          "START_SENSITIVITY_UNSPECIFIED",
          "START_SENSITIVITY_HIGH",
          "START_SENSITIVITY_LOW"
         ]
        },
        "prefixPaddingMs": {
         "type": "integer (int32)",
         "required": false,
         "description": "Speech duration required before start-of-speech is committed (look-back padding). Lower = more sensitive, more false positives; 0 may clip first syllables."
        },
        "endOfSpeechSensitivity": {
         "type": "enum",
         "required": false,
         "description": "How readily end of speech is detected. Default END_SENSITIVITY_HIGH.",
         "enum": [
          "END_SENSITIVITY_UNSPECIFIED",
          "END_SENSITIVITY_HIGH",
          "END_SENSITIVITY_LOW"
         ]
        },
        "silenceDurationMs": {
         "type": "integer (int32)",
         "required": false,
         "description": "Non-speech duration before end-of-speech is committed. Server default ~800 ms; recommended 500-800 ms."
        }
       }
      },
      "activityHandling": {
       "type": "enum",
       "required": false,
       "description": "Effect of user activity on model output. Default START_OF_ACTIVITY_INTERRUPTS (barge-in).",
       "enum": [
        "ACTIVITY_HANDLING_UNSPECIFIED",
        "START_OF_ACTIVITY_INTERRUPTS",
        "NO_INTERRUPTION"
       ]
      },
      "turnCoverage": {
       "type": "enum",
       "required": false,
       "description": "Which realtime input is part of the user turn. Default: Gemini 2.5 TURN_INCLUDES_ONLY_ACTIVITY; Gemini 3.1+ TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO.",
       "enum": [
        "TURN_COVERAGE_UNSPECIFIED",
        "TURN_INCLUDES_ONLY_ACTIVITY",
        "TURN_INCLUDES_ALL_INPUT",
        "TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO"
       ]
      }
     }
    },
    "sessionResumption": {
     "type": "SessionResumptionConfig",
     "required": false,
     "description": "If present the server sends sessionResumptionUpdate messages.",
     "fields": {
      "handle": {
       "type": "string",
       "required": false,
       "description": "Handle from a previous SessionResumptionUpdate.newHandle. Absent = new session. Valid 2 h after the last session termination."
      },
      "transparent": {
       "type": "boolean",
       "required": false,
       "description": "SDK-only: server includes lastConsumedClientMessageIndex in sessionResumptionUpdate for transparent reconnects. Not in the REST reference.",
       "status": [
        "UNVERIFIED"
       ]
      }
     }
    },
    "contextWindowCompression": {
     "type": "ContextWindowCompressionConfig",
     "required": false,
     "description": "Automatic context reduction beyond a length; enables unlimited session duration.",
     "fields": {
      "slidingWindow": {
       "type": "SlidingWindow",
       "required": false,
       "description": "Sliding-window mechanism (union compressionMechanism); discards from the start, always cutting at a USER turn; system instructions kept.",
       "fields": {
        "targetTokens": {
         "type": "integer (int64, JSON string)",
         "required": false,
         "description": "Tokens to keep after compression. Default triggerTokens/2. Must be < triggerTokens."
        }
       }
      },
      "triggerTokens": {
       "type": "integer (int64, JSON string)",
       "required": false,
       "description": "Token count (before a turn) that triggers compression. Default 80% of the model context window."
      }
     }
    },
    "inputAudioTranscription": {
     "type": "AudioTranscriptionConfig",
     "required": false,
     "description": "Enable transcription of user audio ({} = defaults).",
     "fields": {
      "languageCodes[]": {
       "type": "string[]",
       "required": false,
       "description": "BCP-47 hints for languages present in the audio; omitted/empty = automatic detection."
      },
      "customVocabulary[]": {
       "type": "string[]",
       "required": false,
       "description": "Up to 1,000 phrases to bias recognition (best results <= 100)."
      },
      "mode": {
       "type": "enum",
       "required": false,
       "description": "VERBATIM (default) or SMART (disfluency removal, cleanup, formatting). Incompatible with timestamps/diarization.",
       "enum": [
        "MODE_UNSPECIFIED",
        "VERBATIM",
        "SMART"
       ]
      },
      "wordTimestamp": {
       "type": "boolean",
       "required": false,
       "description": "Word-level timestamps (NOT supported over the Live API per live-transcribe limitations)."
      },
      "diarization": {
       "type": "boolean",
       "required": false,
       "description": "Speaker diarization (NOT supported over the Live API per live-transcribe limitations)."
      }
     }
    },
    "outputAudioTranscription": {
     "type": "AudioTranscriptionConfig",
     "required": false,
     "description": "Enable transcription of model audio ({} = defaults).",
     "fields": {
      "languageCodes[]": {
       "type": "string[]",
       "required": false,
       "description": "BCP-47 hints for languages present in the audio; omitted/empty = automatic detection."
      },
      "customVocabulary[]": {
       "type": "string[]",
       "required": false,
       "description": "Up to 1,000 phrases to bias recognition (best results <= 100)."
      },
      "mode": {
       "type": "enum",
       "required": false,
       "description": "VERBATIM (default) or SMART (disfluency removal, cleanup, formatting). Incompatible with timestamps/diarization.",
       "enum": [
        "MODE_UNSPECIFIED",
        "VERBATIM",
        "SMART"
       ]
      },
      "wordTimestamp": {
       "type": "boolean",
       "required": false,
       "description": "Word-level timestamps (NOT supported over the Live API per live-transcribe limitations)."
      },
      "diarization": {
       "type": "boolean",
       "required": false,
       "description": "Speaker diarization (NOT supported over the Live API per live-transcribe limitations)."
      }
     }
    },
    "proactivity": {
     "type": "ProactivityConfig",
     "required": false,
     "description": "Proactive audio.",
     "fields": {
      "proactiveAudio": {
       "type": "boolean",
       "required": false,
       "description": "Model may decline to answer irrelevant/incomplete input. Gemini 2.5: opt-in; gemini-3.8-live*: permanently enabled (false returns an error); gemini-3.1-flash-live-preview: not supported."
      }
     }
    },
    "historyConfig": {
     "type": "HistoryConfig",
     "required": false,
     "description": "Initial-history handshake.",
     "fields": {
      "initialHistoryInClientContent": {
       "type": "boolean",
       "required": false,
       "description": "If true, after setupComplete the server first ingests clientContent until turnComplete=true (history may end with role model) without a model call; then realtimeInput starts the conversation."
      }
     }
    },
    "labels": {
     "type": "object<string,string>",
     "required": false,
     "description": "Discovery-only: user metadata labels (e.g. {\"safety_identifier\": ...}); not in the public Live reference page.",
     "status": [
      "UNVERIFIED"
     ]
    }
   }
  },
  "example": {
   "setup": {
    "model": "models/gemini-3.8-live",
    "generationConfig": {
     "responseModalities": [
      "AUDIO"
     ],
     "speechConfig": {
      "voiceConfig": {
       "prebuiltVoiceConfig": {
        "voiceName": "Puck"
       }
      }
     }
    },
    "systemInstruction": {
     "parts": [
      {
       "text": "You are a helpful assistant."
      }
     ]
    },
    "tools": [
     {
      "functionDeclarations": [
       {
        "name": "searchFlights",
        "description": "Searches for flights between cities.",
        "behavior": "NON_BLOCKING",
        "parameters": {
         "type": "OBJECT",
         "properties": {
          "destination": {
           "type": "STRING"
          }
         },
         "required": [
          "destination"
         ]
        }
       }
      ]
     },
     {
      "googleSearch": {}
     }
    ],
    "realtimeInputConfig": {
     "automaticActivityDetection": {
      "disabled": false,
      "startOfSpeechSensitivity": "START_SENSITIVITY_LOW",
      "endOfSpeechSensitivity": "END_SENSITIVITY_LOW",
      "prefixPaddingMs": 20,
      "silenceDurationMs": 100
     }
    },
    "inputAudioTranscription": {},
    "outputAudioTranscription": {},
    "sessionResumption": {},
    "contextWindowCompression": {
     "triggerTokens": "25600",
     "slidingWindow": {
      "targetTokens": "12800"
     }
    }
   }
  },
  "order_hint": 0,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/api/live",
  "sdk_names": {
   "python": "client.aio.live.connect(model=..., config=LiveConnectConfig)",
   "node": "ai.live.connect({model, config, callbacks})"
  },
  "live_observation_2026_09_18": "sent; accepted (setupComplete followed)",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "client→server",
  "event": "clientContent",
  "description": "Incremental conversation update: turns[] appended unconditionally to history (roles user/model; supported for the whole session lifecycle from Gemini 3.1). Interrupts any current generation. turnComplete=true triggers generation now; otherwise the server waits for more.",
  "schema": {
   "official_type_name": "BidiGenerateContentClientContent",
   "schema_name": "BidiGenerateContentClientContent",
   "fields": {
    "turns[]": {
     "type": "Content[]",
     "required": false,
     "description": "Content appended to the conversation (history and/or latest request), roles user/model.",
     "fields": {
      "role": {
       "type": "string",
       "required": false,
       "description": "\"user\" or \"model\".",
       "enum": [
        "user",
        "model"
       ]
      },
      "parts[]": {
       "type": "Part[]",
       "required": false,
       "description": "Parts: text, inlineData{mimeType,data}, functionCall, functionResponse, thought ... (systemInstruction: text parts only, each part a separate paragraph)."
      }
     }
    },
    "turnComplete": {
     "type": "boolean",
     "required": false,
     "description": "true = start generation with accumulated prompt (unconditionally interrupts active generation); otherwise the server waits for more messages."
    }
   }
  },
  "example": {
   "clientContent": {
    "turns": [
     {
      "role": "user",
      "parts": [
       {
        "text": "Hello world!"
       }
      ]
     }
    ],
    "turnComplete": true
   }
  },
  "order_hint": 2,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/api/live",
  "sdk_names": {
   "python": "session.send_client_content(turns=..., turn_complete=True)",
   "node": "session.sendClientContent({turns, turnComplete})"
  },
  "live_observation_2026_09_18": "sent with turns[] + turnComplete:true",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "client→server",
  "event": "realtimeInput",
  "description": "Realtime user input (audio / video / text / activity signals). Concurrent streams, ordering across streams not guaranteed; can be sent continuously without interrupting generation; end of turn derived from activity (VAD or activityEnd); processed incrementally. Always treated as user input. Exactly one sub-field per message in practice.",
  "schema": {
   "official_type_name": "BidiGenerateContentRealtimeInput",
   "schema_name": "BidiGenerateContentRealtimeInput",
   "fields": {
    "audio": {
     "type": "Blob",
     "required": false,
     "description": "Realtime audio chunk: raw 16-bit little-endian PCM, natively 16 kHz mono (any rate accepted, declare it in mimeType).",
     "fields": {
      "mimeType": {
       "type": "string",
       "required": true,
       "description": "IANA MIME type, e.g. audio/pcm;rate=16000, image/jpeg, image/png."
      },
      "data": {
       "type": "string (base64)",
       "required": true,
       "description": "Raw bytes, base64-encoded in JSON."
      }
     }
    },
    "video": {
     "type": "Blob",
     "required": false,
     "description": "Realtime video frame as an individual image (JPEG/PNG), max 1 frame/s.",
     "fields": {
      "mimeType": {
       "type": "string",
       "required": true,
       "description": "IANA MIME type, e.g. audio/pcm;rate=16000, image/jpeg, image/png."
      },
      "data": {
       "type": "string (base64)",
       "required": true,
       "description": "Raw bytes, base64-encoded in JSON."
      }
     }
    },
    "text": {
     "type": "string",
     "required": false,
     "description": "Realtime text input stream."
    },
    "activityStart": {
     "type": "ActivityStart {}",
     "required": false,
     "description": "Marks start of user activity; only when automatic VAD is disabled."
    },
    "activityEnd": {
     "type": "ActivityEnd {}",
     "required": false,
     "description": "Marks end of user activity; only when automatic VAD is disabled."
    },
    "audioStreamEnd": {
     "type": "boolean",
     "required": false,
     "description": "Audio stream ended (mic off / hybrid VAD end-of-speech). Only with automatic VAD enabled; flushes cached audio; reopened by sending audio again."
    },
    "mediaResolution": {
     "type": "enum",
     "required": false,
     "description": "Per-message override of setup.generationConfig.mediaResolution.",
     "enum": [
      "MEDIA_RESOLUTION_UNSPECIFIED",
      "MEDIA_RESOLUTION_LOW",
      "MEDIA_RESOLUTION_MEDIUM",
      "MEDIA_RESOLUTION_HIGH"
     ]
    },
    "mediaChunks[]": {
     "type": "Blob[]",
     "required": false,
     "description": "DEPRECATED — use audio/video/text. Only the first chunk is honoured.",
     "fields": {
      "mimeType": {
       "type": "string",
       "required": true,
       "description": "IANA MIME type, e.g. audio/pcm;rate=16000, image/jpeg, image/png."
      },
      "data": {
       "type": "string (base64)",
       "required": true,
       "description": "Raw bytes, base64-encoded in JSON."
      }
     },
     "status": [
      "DOCUMENTED",
      "DEPRECATED"
     ]
    }
   }
  },
  "example": {
   "realtimeInput": {
    "audio": {
     "data": "UklGRiQAAABXQVZF...",
     "mimeType": "audio/pcm;rate=16000"
    }
   }
  },
  "order_hint": 2,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/api/live",
  "sdk_names": {
   "python": "session.send_realtime_input(audio=Blob(...) | video=... | text=... | activity_start=ActivityStart() | activity_end=ActivityEnd() | audio_stream_end=True)",
   "node": "session.sendRealtimeInput({audio|video|text|activityStart|activityEnd|audioStreamEnd})"
  },
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "client→server",
  "event": "realtimeInput.audio",
  "description": "Audio chunk of the realtime audio stream: Blob{mimeType:'audio/pcm;rate=16000', data:base64}. Raw 16-bit little-endian PCM mono; 16 kHz native, other rates resampled server-side when declared in mimeType. Recommended chunks 20-100 ms (transcribe guide: 100 ms).",
  "schema": {
   "official_type_name": "Blob (BidiGenerateContentRealtimeInput.audio)",
   "schema_name": "Blob (BidiGenerateContentRealtimeInput.audio)",
   "fields": {
    "mimeType": {
     "type": "string",
     "required": true,
     "description": "IANA MIME type, e.g. audio/pcm;rate=16000, image/jpeg, image/png."
    },
    "data": {
     "type": "string (base64)",
     "required": true,
     "description": "Raw bytes, base64-encoded in JSON."
    }
   }
  },
  "example": {
   "realtimeInput": {
    "audio": {
     "data": "UklGRiQAAABXQVZF...",
     "mimeType": "audio/pcm;rate=16000"
    }
   }
  },
  "order_hint": 2,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/capabilities",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "client→server",
  "event": "realtimeInput.video",
  "description": "One video frame as an individual image (image/jpeg or image/png), max 1 frame per second. With TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO (default on 3.1+), all frames are billed/included — send frames only when needed.",
  "schema": {
   "official_type_name": "Blob (BidiGenerateContentRealtimeInput.video)",
   "schema_name": "Blob (BidiGenerateContentRealtimeInput.video)",
   "fields": {
    "mimeType": {
     "type": "string",
     "required": true,
     "description": "IANA MIME type, e.g. audio/pcm;rate=16000, image/jpeg, image/png."
    },
    "data": {
     "type": "string (base64)",
     "required": true,
     "description": "Raw bytes, base64-encoded in JSON."
    }
   }
  },
  "example": {
   "realtimeInput": {
    "video": {
     "data": "<base64 JPEG>",
     "mimeType": "image/jpeg"
    }
   }
  },
  "order_hint": 2,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/capabilities",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "client→server",
  "event": "realtimeInput.text",
  "description": "Realtime text input stream (string). Counted as activity for automatic VAD.",
  "schema": {
   "official_type_name": "string (BidiGenerateContentRealtimeInput.text)",
   "schema_name": "string (BidiGenerateContentRealtimeInput.text)",
   "fields": {
    "text": {
     "type": "string",
     "required": false,
     "description": "Realtime text input stream."
    }
   }
  },
  "example": {
   "realtimeInput": {
    "text": "Hello, how are you?"
   }
  },
  "order_hint": 2,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/get-started-websocket",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "client→server",
  "event": "realtimeInput.activityStart",
  "description": "Marks the start of user activity (push-to-talk). Only valid when realtimeInputConfig.automaticActivityDetection.disabled=true. Empty object.",
  "schema": {
   "official_type_name": "BidiGenerateContentRealtimeInput.ActivityStart",
   "schema_name": "BidiGenerateContentRealtimeInput.ActivityStart",
   "fields": {}
  },
  "example": {
   "realtimeInput": {
    "activityStart": {}
   }
  },
  "order_hint": 2,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/capabilities",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "client→server",
  "event": "realtimeInput.activityEnd",
  "description": "Marks the end of user activity; the server acts immediately (no silence tolerance). Only when automatic VAD is disabled. Empty object.",
  "schema": {
   "official_type_name": "BidiGenerateContentRealtimeInput.ActivityEnd",
   "schema_name": "BidiGenerateContentRealtimeInput.ActivityEnd",
   "fields": {}
  },
  "example": {
   "realtimeInput": {
    "activityEnd": {}
   }
  },
  "order_hint": 2,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/capabilities",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "client→server",
  "event": "realtimeInput.audioStreamEnd",
  "description": "Boolean flag: audio stream ended (mic off; or hybrid VAD: client detected end of speech -> immediate finalization). Only with automatic VAD enabled. Send when the stream pauses > 1 s to flush cached audio; resume by sending audio.",
  "schema": {
   "official_type_name": "bool (BidiGenerateContentRealtimeInput.audioStreamEnd)",
   "schema_name": "bool (BidiGenerateContentRealtimeInput.audioStreamEnd)",
   "fields": {
    "audioStreamEnd": {
     "type": "boolean",
     "required": false,
     "description": "Audio stream ended (mic off / hybrid VAD end-of-speech). Only with automatic VAD enabled; flushes cached audio; reopened by sending audio again."
    }
   }
  },
  "example": {
   "realtimeInput": {
    "audioStreamEnd": true
   }
  },
  "order_hint": 2,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/capabilities",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "client→server",
  "event": "realtimeInput.mediaChunks",
  "description": "DEPRECATED: inlined media Blob list. Multiple chunks not supported (all but the first ignored). Use audio / video / text instead.",
  "schema": {
   "official_type_name": "Blob[] (BidiGenerateContentRealtimeInput.mediaChunks)",
   "schema_name": "Blob[] (BidiGenerateContentRealtimeInput.mediaChunks)",
   "fields": {
    "mediaChunks[]": {
     "type": "Blob[]",
     "required": false,
     "description": "DEPRECATED — use audio/video/text. Only the first chunk is honoured.",
     "fields": {
      "mimeType": {
       "type": "string",
       "required": true,
       "description": "IANA MIME type, e.g. audio/pcm;rate=16000, image/jpeg, image/png."
      },
      "data": {
       "type": "string (base64)",
       "required": true,
       "description": "Raw bytes, base64-encoded in JSON."
      }
     },
     "status": [
      "DOCUMENTED",
      "DEPRECATED"
     ]
    }
   }
  },
  "example": {
   "realtimeInput": {
    "mediaChunks": [
     {
      "data": "<base64 PCM>",
      "mimeType": "audio/pcm;rate=16000"
     }
    ]
   }
  },
  "order_hint": 2,
  "status": [
   "DOCUMENTED",
   "DEPRECATED"
  ],
  "source": "https://ai.google.dev/api/live",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "client→server",
  "event": "toolResponse",
  "description": "Client response to a toolCall: functionResponses[] matched by id. Live-only extras per FunctionResponse: scheduling (INTERRUPT/WHEN_IDLE/SILENT) and willContinue for NON_BLOCKING functions. No automatic tool handling in Live — the client must reply.",
  "schema": {
   "official_type_name": "BidiGenerateContentToolResponse",
   "schema_name": "BidiGenerateContentToolResponse",
   "fields": {
    "functionResponses[]": {
     "type": "FunctionResponse[]",
     "required": false,
     "description": "Responses matched to toolCall.functionCalls by id.",
     "fields": {
      "id": {
       "type": "string",
       "required": false,
       "description": "Must match FunctionCall.id."
      },
      "name": {
       "type": "string",
       "required": true,
       "description": "Required. Function name."
      },
      "response": {
       "type": "object",
       "required": true,
       "description": "Required. JSON result; keys of your choice (\"output\", \"result\", \"error\" ...)."
      },
      "scheduling": {
       "type": "enum",
       "required": false,
       "description": "NON_BLOCKING calls only: INTERRUPT (interrupt and speak now), WHEN_IDLE (default; after current output), SILENT (add to context only).",
       "enum": [
        "SCHEDULING_UNSPECIFIED",
        "SILENT",
        "WHEN_IDLE",
        "INTERRUPT"
       ]
      },
      "willContinue": {
       "type": "boolean",
       "required": false,
       "description": "NON_BLOCKING calls only: more responses follow (generator). false + empty response finishes the call (still may trigger generation unless scheduling=SILENT)."
      },
      "parts[]": {
       "type": "FunctionResponsePart[]",
       "required": false,
       "description": "Multimodal parts (inlineData/fileData) of the response."
      }
     }
    }
   }
  },
  "example": {
   "toolResponse": {
    "functionResponses": [
     {
      "id": "call_123",
      "name": "searchFlights",
      "response": {
       "output": {
        "flight": "DL 145",
        "price": "$145"
       },
       "scheduling": "INTERRUPT"
      }
     }
    ]
   }
  },
  "order_hint": 4,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/api/live",
  "sdk_names": {
   "python": "session.send_tool_response(function_responses=[...])",
   "node": "session.sendToolResponse({functionResponses})"
  },
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "setupComplete",
  "description": "Acknowledges setup; sent once per connection. Empty object in the REST reference (SDK types also list sessionId and voiceConsentSignature — UNVERIFIED).",
  "schema": {
   "official_type_name": "BidiGenerateContentSetupComplete",
   "schema_name": "BidiGenerateContentSetupComplete",
   "fields": {
    "sessionId": {
     "type": "string",
     "required": false,
     "description": "SDK-only, UNVERIFIED.",
     "status": [
      "UNVERIFIED"
     ]
    }
   }
  },
  "example": {
   "setupComplete": {}
  },
  "order_hint": 1,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/api/live",
  "live_observation_2026_09_18": "received as {} immediately after setup",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "serverContent",
  "description": "Incremental model output and turn-state flags. Generated as fast as possible (not realtime) — clients buffer/play. Exactly one top-level field per server message besides usageMetadata; a single serverContent may carry several fields/parts (audio + transcript).",
  "schema": {
   "official_type_name": "BidiGenerateContentServerContent",
   "schema_name": "BidiGenerateContentServerContent",
   "fields": {
    "modelTurn": {
     "type": "Content",
     "required": false,
     "description": "Generated content: parts with inlineData {mimeType:'audio/pcm;rate=24000', data} for audio, text for TEXT modality, thought summaries. One message can hold several parts.",
     "fields": {
      "role": {
       "type": "string",
       "required": false,
       "description": "\"user\" or \"model\".",
       "enum": [
        "user",
        "model"
       ]
      },
      "parts[]": {
       "type": "Part[]",
       "required": false,
       "description": "Parts: text, inlineData{mimeType,data}, functionCall, functionResponse, thought ... (systemInstruction: text parts only, each part a separate paragraph)."
      }
     }
    },
    "generationComplete": {
     "type": "boolean",
     "required": false,
     "description": "Model finished generating. Absent in interrupted turns (interrupted -> turnComplete). With realtime playback there is a gap before turnComplete."
    },
    "turnComplete": {
     "type": "boolean",
     "required": false,
     "description": "Model turn complete; generation resumes only on new client messages. On extended-thinking, check interactionStatus (IDLE vs IN_PROGRESS)."
    },
    "interrupted": {
     "type": "boolean",
     "required": false,
     "description": "A client message/VAD barge-in interrupted generation: stop playback and flush queue."
    },
    "groundingMetadata": {
     "type": "GroundingMetadata",
     "required": false,
     "description": "Search grounding metadata (webSearchQueries, groundingChunks, groundingSupports, searchEntryPoint)."
    },
    "inputTranscription": {
     "type": "BidiGenerateContentTranscription",
     "required": false,
     "description": "Finalized user-audio transcript (independent stream, no ordering guarantee).",
     "fields": {
      "text": {
       "type": "string",
       "required": false,
       "description": "Transcription text."
      },
      "languageCode": {
       "type": "string",
       "required": false,
       "description": "BCP-47 code of the transcript (translate model reports it)."
      },
      "finished": {
       "type": "boolean",
       "required": false,
       "description": "SDK-only: end of transcription.",
       "status": [
        "UNVERIFIED"
       ]
      }
     }
    },
    "interimInputTranscription": {
     "type": "BidiGenerateContentTranscription",
     "required": false,
     "description": "Low-latency partial hypothesis, updated frequently while the user speaks.",
     "fields": {
      "text": {
       "type": "string",
       "required": false,
       "description": "Transcription text."
      },
      "languageCode": {
       "type": "string",
       "required": false,
       "description": "BCP-47 code of the transcript (translate model reports it)."
      },
      "finished": {
       "type": "boolean",
       "required": false,
       "description": "SDK-only: end of transcription.",
       "status": [
        "UNVERIFIED"
       ]
      }
     }
    },
    "outputTranscription": {
     "type": "BidiGenerateContentTranscription",
     "required": false,
     "description": "Model-audio transcript; last one of a turn precedes generationComplete/interrupted.",
     "fields": {
      "text": {
       "type": "string",
       "required": false,
       "description": "Transcription text."
      },
      "languageCode": {
       "type": "string",
       "required": false,
       "description": "BCP-47 code of the transcript (translate model reports it)."
      },
      "finished": {
       "type": "boolean",
       "required": false,
       "description": "SDK-only: end of transcription.",
       "status": [
        "UNVERIFIED"
       ]
      }
     }
    },
    "urlContextMetadata": {
     "type": "UrlContextMetadata",
     "required": false,
     "description": "urlMetadata[] from the URL context tool."
    },
    "waitingForInput": {
     "type": "boolean",
     "required": false,
     "description": "Model idle because it expects the user to continue."
    },
    "interactionStatus": {
     "type": "enum",
     "required": false,
     "description": "Always sent alongside turnComplete. IN_PROGRESS = background reasoning / async tool calls pending; IDLE = fully done; REQUIRES_ACTION deprecated.",
     "enum": [
      "INTERACTION_STATUS_UNSPECIFIED",
      "IN_PROGRESS",
      "REQUIRES_ACTION",
      "IDLE"
     ]
    },
    "speechState": {
     "type": "enum (deprecated)",
     "required": false,
     "description": "DEPRECATED: use VoiceActivity. Speech detection state on realtimeInput.audio.",
     "status": [
      "DOCUMENTED",
      "DEPRECATED"
     ]
    },
    "turnCompleteReason": {
     "type": "enum",
     "required": false,
     "description": "SDK-only: TURN_COMPLETE_REASON_UNSPECIFIED, MALFORMED_FUNCTION_CALL, RESPONSE_REJECTED, NEED_MORE_INPUT, PROHIBITED_INPUT_CONTENT, ... Not in the REST reference.",
     "status": [
      "UNVERIFIED"
     ]
    }
   }
  },
  "example": {
   "serverContent": {
    "modelTurn": {
     "parts": [
      {
       "inlineData": {
        "mimeType": "audio/pcm;rate=24000",
        "data": "..."
       }
      }
     ]
    }
   }
  },
  "order_hint": 3,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/api/live",
  "live_observation_2026_09_18": "received",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "serverContent.modelTurn",
  "description": "Content generated by the model: parts[] with inlineData audio (audio/pcm;rate=24000, base64), text (TEXT modality / transcribe model), executableCode/codeExecutionResult when applicable, thought summaries (part.thought). Process every part of every message.",
  "schema": {
   "official_type_name": "Content (BidiGenerateContentServerContent.modelTurn)",
   "schema_name": "Content (BidiGenerateContentServerContent.modelTurn)",
   "fields": {
    "role": {
     "type": "string",
     "required": false,
     "description": "\"user\" or \"model\".",
     "enum": [
      "user",
      "model"
     ]
    },
    "parts[]": {
     "type": "Part[]",
     "required": false,
     "description": "Parts: text, inlineData{mimeType,data}, functionCall, functionResponse, thought ... (systemInstruction: text parts only, each part a separate paragraph)."
    }
   }
  },
  "example": {
   "serverContent": {
    "modelTurn": {
     "parts": [
      {
       "inlineData": {
        "mimeType": "audio/pcm;rate=24000",
        "data": "..."
       }
      }
     ]
    }
   }
  },
  "order_hint": 3,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/api/live",
  "live_observation_2026_09_18": "parts: first a {text, thought:true} summary, then {inlineData:{mimeType:'audio/pcm;rate=24000', data}} chunks (0–6 chunks for 'OK')",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "serverContent.generationComplete",
  "description": "true when the model finished generating the turn's content. Not sent for interrupted turns (interrupted -> turnComplete). With realtime playback assumed, turnComplete follows after a playback-length delay.",
  "schema": {
   "official_type_name": "bool",
   "schema_name": "bool",
   "fields": {
    "generationComplete": {
     "type": "boolean",
     "required": false,
     "description": "Model finished generating. Absent in interrupted turns (interrupted -> turnComplete). With realtime playback there is a gap before turnComplete."
    }
   }
  },
  "example": {
   "serverContent": {
    "generationComplete": true
   }
  },
  "order_hint": 4,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/session-management",
  "live_observation_2026_09_18": "true, one message before turnComplete",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "serverContent.turnComplete",
  "description": "true when the model's turn is over; nothing more until new client input. Comes with interactionStatus. On gemini-3.8-live-extended-thinking, turnComplete=true with interactionStatus=IN_PROGRESS means an utterance ended but background reasoning/async tool calls continue — keep listening until IDLE.",
  "schema": {
   "official_type_name": "bool",
   "schema_name": "bool",
   "fields": {
    "turnComplete": {
     "type": "boolean",
     "required": false,
     "description": "Model turn complete; generation resumes only on new client messages. On extended-thinking, check interactionStatus (IDLE vs IN_PROGRESS)."
    },
    "interactionStatus": {
     "type": "enum",
     "required": false,
     "description": "Always sent alongside turnComplete. IN_PROGRESS = background reasoning / async tool calls pending; IDLE = fully done; REQUIRES_ACTION deprecated.",
     "enum": [
      "INTERACTION_STATUS_UNSPECIFIED",
      "IN_PROGRESS",
      "REQUIRES_ACTION",
      "IDLE"
     ]
    }
   }
  },
  "example": {
   "serverContent": {
    "turnComplete": true,
    "interactionStatus": "IDLE"
   }
  },
  "order_hint": 5,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/api/live",
  "live_observation_2026_09_18": "true; usageMetadata rides in the same message",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "serverContent.interactionStatus",
  "description": "Session activity state, always alongside turnComplete: IN_PROGRESS (still processing / background reasoning / awaiting async tool responses) or IDLE (all done). REQUIRES_ACTION deprecated. Also appears alongside toolCall on extended-thinking flows.",
  "schema": {
   "official_type_name": "InteractionStatus enum",
   "schema_name": "InteractionStatus enum",
   "fields": {
    "interactionStatus": {
     "type": "enum",
     "required": false,
     "description": "Always sent alongside turnComplete. IN_PROGRESS = background reasoning / async tool calls pending; IDLE = fully done; REQUIRES_ACTION deprecated.",
     "enum": [
      "INTERACTION_STATUS_UNSPECIFIED",
      "IN_PROGRESS",
      "REQUIRES_ACTION",
      "IDLE"
     ]
    }
   }
  },
  "example": {
   "serverContent": {
    "modelTurn": {
     "parts": [
      {
       "inlineData": {
        "mimeType": "audio/pcm;rate=24000",
        "data": "..."
       }
      }
     ]
    },
    "turnComplete": true,
    "interactionStatus": "IN_PROGRESS"
   }
  },
  "order_hint": 5,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/thinking",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "serverContent.interrupted",
  "description": "true when user activity (VAD barge-in, clientContent, realtimeInput) interrupted generation: stop playback and empty the queue. Pending function calls are discarded (see toolCallCancellation). Only content already sent stays in history.",
  "schema": {
   "official_type_name": "bool",
   "schema_name": "bool",
   "fields": {
    "interrupted": {
     "type": "boolean",
     "required": false,
     "description": "A client message/VAD barge-in interrupted generation: stop playback and flush queue."
    }
   }
  },
  "example": {
   "serverContent": {
    "interrupted": true
   }
  },
  "order_hint": 3,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/capabilities",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "serverContent.groundingMetadata",
  "description": "Grounding metadata when googleSearch is enabled (queries, chunks, supports, searchEntryPoint).",
  "schema": {
   "official_type_name": "GroundingMetadata",
   "schema_name": "GroundingMetadata",
   "fields": {
    "groundingMetadata": {
     "type": "GroundingMetadata",
     "required": false,
     "description": "Search grounding metadata (webSearchQueries, groundingChunks, groundingSupports, searchEntryPoint)."
    }
   }
  },
  "example": {
   "serverContent": {
    "groundingMetadata": {
     "webSearchQueries": [
      "largest earthquake California Dec 5 2024"
     ],
     "groundingChunks": [
      {
       "web": {
        "uri": "https://...",
        "title": "..."
       }
      }
     ]
    }
   }
  },
  "order_hint": 3,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/tools",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "serverContent.inputTranscription",
  "description": "Finalized transcript of user audio (requires setup.inputAudioTranscription). Independent of modelTurn ordering. languageCode filled by the translate model; SMART mode returns cleaned text.",
  "schema": {
   "official_type_name": "BidiGenerateContentTranscription",
   "schema_name": "BidiGenerateContentTranscription",
   "fields": {
    "text": {
     "type": "string",
     "required": false,
     "description": "Transcription text."
    },
    "languageCode": {
     "type": "string",
     "required": false,
     "description": "BCP-47 code of the transcript (translate model reports it)."
    },
    "finished": {
     "type": "boolean",
     "required": false,
     "description": "SDK-only: end of transcription.",
     "status": [
      "UNVERIFIED"
     ]
    }
   }
  },
  "example": {
   "serverContent": {
    "inputTranscription": {
     "text": "Hello, how are you?",
     "languageCode": "en"
    }
   }
  },
  "order_hint": 3,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/live-transcribe",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "serverContent.interimInputTranscription",
  "description": "Low-latency partial hypothesis while the user speaks (frequent updates; live captions). Documented for gemini-3.5-transcribe-live.",
  "schema": {
   "official_type_name": "BidiGenerateContentTranscription",
   "schema_name": "BidiGenerateContentTranscription",
   "fields": {
    "text": {
     "type": "string",
     "required": false,
     "description": "Transcription text."
    },
    "languageCode": {
     "type": "string",
     "required": false,
     "description": "BCP-47 code of the transcript (translate model reports it)."
    },
    "finished": {
     "type": "boolean",
     "required": false,
     "description": "SDK-only: end of transcription.",
     "status": [
      "UNVERIFIED"
     ]
    }
   }
  },
  "example": {
   "serverContent": {
    "interimInputTranscription": {
     "text": "Hello, how"
    }
   }
  },
  "order_hint": 3,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/live-transcribe",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "serverContent.outputTranscription",
  "description": "Transcript of the model's audio (requires setup.outputAudioTranscription). Part of the generation output; last one of a turn is sent before generationComplete/interrupted; roughly aligned with the audio but not strictly ordered.",
  "schema": {
   "official_type_name": "BidiGenerateContentTranscription",
   "schema_name": "BidiGenerateContentTranscription",
   "fields": {
    "text": {
     "type": "string",
     "required": false,
     "description": "Transcription text."
    },
    "languageCode": {
     "type": "string",
     "required": false,
     "description": "BCP-47 code of the transcript (translate model reports it)."
    },
    "finished": {
     "type": "boolean",
     "required": false,
     "description": "SDK-only: end of transcription.",
     "status": [
      "UNVERIFIED"
     ]
    }
   }
  },
  "example": {
   "serverContent": {
    "outputTranscription": {
     "text": "I'm doing well, thanks!",
     "languageCode": "en"
    }
   }
  },
  "order_hint": 3,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/capabilities",
  "live_observation_2026_09_18": "{text:'OK'} (needs setup.outputAudioTranscription:{})",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "serverContent.urlContextMetadata",
  "description": "URL context retrieval metadata (urlMetadata[]). Field exists in the schema; the URL context tool is listed as not supported on current Live models.",
  "schema": {
   "official_type_name": "UrlContextMetadata",
   "schema_name": "UrlContextMetadata",
   "fields": {
    "urlContextMetadata": {
     "type": "UrlContextMetadata",
     "required": false,
     "description": "urlMetadata[] from the URL context tool."
    }
   }
  },
  "example": {
   "serverContent": {
    "urlContextMetadata": {
     "urlMetadata": [
      {
       "retrievedUrl": "https://...",
       "urlRetrievalStatus": "URL_RETRIEVAL_STATUS_SUCCESS"
      }
     ]
    }
   }
  },
  "order_hint": 3,
  "status": [
   "DOCUMENTED",
   "UNVERIFIED"
  ],
  "source": "https://ai.google.dev/api/live",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "serverContent.waitingForInput",
  "description": "true when the model is not generating because it expects the user to continue talking.",
  "schema": {
   "official_type_name": "bool",
   "schema_name": "bool",
   "fields": {
    "waitingForInput": {
     "type": "boolean",
     "required": false,
     "description": "Model idle because it expects the user to continue."
    }
   }
  },
  "example": {
   "serverContent": {
    "waitingForInput": true
   }
  },
  "order_hint": 3,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/api/live",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "serverContent.speechState",
  "description": "DEPRECATED (use VoiceActivity): state of speech detection on realtimeInput.audio; unset if unchanged.",
  "schema": {
   "official_type_name": "BidiGenerateContentServerContent.SpeechState",
   "schema_name": "BidiGenerateContentServerContent.SpeechState",
   "fields": {
    "speechState": {
     "type": "enum (deprecated)",
     "required": false,
     "description": "DEPRECATED: use VoiceActivity. Speech detection state on realtimeInput.audio.",
     "status": [
      "DOCUMENTED",
      "DEPRECATED"
     ]
    }
   }
  },
  "example": {
   "serverContent": {
    "speechState": "<enum>"
   }
  },
  "order_hint": 3,
  "status": [
   "DOCUMENTED",
   "DEPRECATED"
  ],
  "source": "https://ai.google.dev/api/live",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "toolCall",
  "description": "Request to execute functionCalls[] (id, name, args) and answer with toolResponse using the same ids. Can arrive while audio is still streaming (async / extended thinking). BLOCKING functions pause the model until answered.",
  "schema": {
   "official_type_name": "BidiGenerateContentToolCall",
   "schema_name": "BidiGenerateContentToolCall",
   "fields": {
    "functionCalls[]": {
     "type": "FunctionCall[]",
     "required": false,
     "description": "Calls to execute; reply with toolResponse using matching ids.",
     "fields": {
      "id": {
       "type": "string",
       "required": false,
       "description": "Unique id to echo in FunctionResponse.id."
      },
      "name": {
       "type": "string",
       "required": true,
       "description": "Function name."
      },
      "args": {
       "type": "object",
       "required": false,
       "description": "Arguments."
      }
     }
    }
   }
  },
  "example": {
   "toolCall": {
    "functionCalls": [
     {
      "id": "call_123",
      "name": "searchFlights",
      "args": {
       "destination": "Seattle"
      }
     }
    ]
   }
  },
  "order_hint": 3,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/tools",
  "sdk_names": {
   "python": "message.tool_call.function_calls",
   "node": "message.toolCall.functionCalls"
  },
  "live_observation_2026_09_18": "{functionCalls:[{name,args,id:'function-call-…'}]} after the thought part, for a NON_BLOCKING declaration (mode ANY not settable: setup.toolConfig is rejected)",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "toolCallCancellation",
  "description": "Previously issued tool calls with these ids must not be executed / should be undone. Only occurs when the client interrupts a server turn (barge-in discards pending calls).",
  "schema": {
   "official_type_name": "BidiGenerateContentToolCallCancellation",
   "schema_name": "BidiGenerateContentToolCallCancellation",
   "fields": {
    "ids[]": {
     "type": "string[]",
     "required": true,
     "description": "Ids of tool calls to cancel/undo."
    }
   }
  },
  "example": {
   "toolCallCancellation": {
    "ids": [
     "call_123"
    ]
   }
  },
  "order_hint": 3,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/capabilities",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "usageMetadata",
  "description": "Token usage; may accompany any server message (top-level field alongside the union). Includes per-modality breakdowns (promptTokensDetails / responseTokensDetails: TEXT, AUDIO, IMAGE, VIDEO) and thoughtsTokenCount. Billing compounds per turn over the whole context window (~25 audio tokens/s).",
  "schema": {
   "official_type_name": "UsageMetadata",
   "schema_name": "UsageMetadata",
   "fields": {
    "promptTokenCount": {
     "type": "integer",
     "required": false,
     "description": "Prompt tokens (includes cached content)."
    },
    "cachedContentTokenCount": {
     "type": "integer",
     "required": false,
     "description": "Cached prompt tokens."
    },
    "responseTokenCount": {
     "type": "integer",
     "required": false,
     "description": "Tokens across generated candidates."
    },
    "toolUsePromptTokenCount": {
     "type": "integer",
     "required": false,
     "description": "Tool-use prompt tokens."
    },
    "thoughtsTokenCount": {
     "type": "integer",
     "required": false,
     "description": "Thinking tokens."
    },
    "totalTokenCount": {
     "type": "integer",
     "required": false,
     "description": "prompt + response (+ thoughts + tool-use)."
    },
    "promptTokensDetails[]": {
     "type": "ModalityTokenCount[]",
     "required": false,
     "description": "Per-modality prompt breakdown (TEXT/AUDIO/IMAGE/VIDEO...).",
     "fields": {
      "modality": {
       "type": "enum",
       "required": false,
       "description": "Modality of the count.",
       "enum": [
        "MODALITY_UNSPECIFIED",
        "TEXT",
        "IMAGE",
        "VIDEO",
        "AUDIO",
        "DOCUMENT"
       ]
      },
      "tokenCount": {
       "type": "integer",
       "required": false,
       "description": "Tokens."
      }
     }
    },
    "cacheTokensDetails[]": {
     "type": "ModalityTokenCount[]",
     "required": false,
     "description": "Per-modality cached breakdown.",
     "fields": {
      "modality": {
       "type": "enum",
       "required": false,
       "description": "Modality of the count.",
       "enum": [
        "MODALITY_UNSPECIFIED",
        "TEXT",
        "IMAGE",
        "VIDEO",
        "AUDIO",
        "DOCUMENT"
       ]
      },
      "tokenCount": {
       "type": "integer",
       "required": false,
       "description": "Tokens."
      }
     }
    },
    "responseTokensDetails[]": {
     "type": "ModalityTokenCount[]",
     "required": false,
     "description": "Per-modality response breakdown.",
     "fields": {
      "modality": {
       "type": "enum",
       "required": false,
       "description": "Modality of the count.",
       "enum": [
        "MODALITY_UNSPECIFIED",
        "TEXT",
        "IMAGE",
        "VIDEO",
        "AUDIO",
        "DOCUMENT"
       ]
      },
      "tokenCount": {
       "type": "integer",
       "required": false,
       "description": "Tokens."
      }
     }
    },
    "toolUsePromptTokensDetails[]": {
     "type": "ModalityTokenCount[]",
     "required": false,
     "description": "Per-modality tool-use prompt breakdown.",
     "fields": {
      "modality": {
       "type": "enum",
       "required": false,
       "description": "Modality of the count.",
       "enum": [
        "MODALITY_UNSPECIFIED",
        "TEXT",
        "IMAGE",
        "VIDEO",
        "AUDIO",
        "DOCUMENT"
       ]
      },
      "tokenCount": {
       "type": "integer",
       "required": false,
       "description": "Tokens."
      }
     }
    }
   }
  },
  "example": {
   "usageMetadata": {
    "promptTokenCount": 1250,
    "responseTokenCount": 420,
    "totalTokenCount": 1670,
    "promptTokensDetails": [
     {
      "modality": "AUDIO",
      "tokenCount": 1200
     },
     {
      "modality": "TEXT",
      "tokenCount": 50
     }
    ],
    "responseTokensDetails": [
     {
      "modality": "AUDIO",
      "tokenCount": 420
     }
    ]
   }
  },
  "order_hint": 6,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/capabilities",
  "live_observation_2026_09_18": "{promptTokenCount, responseTokenCount, totalTokenCount, promptTokensDetails, responseTokensDetails[{modality:AUDIO}], thoughtsTokenCount}",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "goAway",
  "description": "Server will close the connection soon; timeLeft (Duration) before termination as ABORTED. Connection lifetime ~10 min: reconnect with sessionResumption.handle before it elapses.",
  "schema": {
   "official_type_name": "GoAway",
   "schema_name": "GoAway",
   "fields": {
    "timeLeft": {
     "type": "string (google.protobuf.Duration, e.g. \"30s\")",
     "required": true,
     "description": "Remaining time before the connection is terminated as ABORTED; never below a model-specific minimum (documented with rate limits — value not published)."
    }
   }
  },
  "example": {
   "goAway": {
    "timeLeft": "30s"
   }
  },
  "order_hint": "any time (before connection reset)",
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/session-management",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "sessionResumptionUpdate",
  "description": "Periodic resumption state (only if setup.sessionResumption present): newHandle + resumable. Keep the latest resumable handle; pass it as sessionResumption.handle on the next connection (valid 2 h after the last session ends). Not resumable while generating / running functions.",
  "schema": {
   "official_type_name": "SessionResumptionUpdate",
   "schema_name": "SessionResumptionUpdate",
   "fields": {
    "newHandle": {
     "type": "string",
     "required": false,
     "description": "New resumable handle; empty when resumable=false."
    },
    "resumable": {
     "type": "boolean",
     "required": false,
     "description": "False while the model is generating / executing function calls (resuming then loses data)."
    },
    "lastConsumedClientMessageIndex": {
     "type": "integer",
     "required": false,
     "description": "SDK-only, when SessionResumptionConfig.transparent is set: index of the last client message included in the state.",
     "status": [
      "UNVERIFIED"
     ]
    }
   }
  },
  "example": {
   "sessionResumptionUpdate": {
    "newHandle": "<opaque handle>",
    "resumable": true
   }
  },
  "order_hint": "periodic (any time)",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://ai.google.dev/gemini-api/docs/live-api/session-management",
  "live_observation_2026_09_18": "{newHandle, resumable:true} right after setupComplete and after turnComplete when setup.sessionResumption:{} is set",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "voiceActivity",
  "description": "SDK types only (LiveServerMessage.voice_activity): voiceActivityType ACTIVITY_START/ACTIVITY_END + audioOffset. Not in the REST reference page — UNVERIFIED.",
  "schema": {
   "official_type_name": "VoiceActivity",
   "schema_name": "VoiceActivity",
   "fields": {
    "voiceActivityType": {
     "type": "enum",
     "required": false,
     "description": "",
     "enum": [
      "TYPE_UNSPECIFIED",
      "ACTIVITY_START",
      "ACTIVITY_END"
     ]
    },
    "audioOffset": {
     "type": "string (Duration)",
     "required": false,
     "description": "Time of the activity relative to the start of the audio stream."
    }
   }
  },
  "example": {
   "voiceActivity": {
    "voiceActivityType": "ACTIVITY_START",
    "audioOffset": "1.250s"
   }
  },
  "order_hint": "any time",
  "status": [
   "UNVERIFIED"
  ],
  "source": "https://github.com/googleapis/python-genai/blob/main/google/genai/types.py",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "live",
  "direction": "server→client",
  "event": "voiceActivityDetectionSignal",
  "description": "SDK types only, marked 'Allowlisted only': vadSignalType VAD_SIGNAL_TYPE_SOS / VAD_SIGNAL_TYPE_EOS. Requires setup explicitVadSignal (SDK) — UNVERIFIED.",
  "schema": {
   "official_type_name": "VoiceActivityDetectionSignal",
   "schema_name": "VoiceActivityDetectionSignal",
   "fields": {
    "vadSignalType": {
     "type": "enum",
     "required": false,
     "description": "",
     "enum": [
      "VAD_SIGNAL_TYPE_UNSPECIFIED",
      "VAD_SIGNAL_TYPE_SOS",
      "VAD_SIGNAL_TYPE_EOS"
     ]
    }
   }
  },
  "example": {
   "voiceActivityDetectionSignal": {
    "vadSignalType": "VAD_SIGNAL_TYPE_SOS"
   }
  },
  "order_hint": "any time",
  "status": [
   "UNVERIFIED"
  ],
  "source": "https://github.com/googleapis/python-genai/blob/main/google/genai/types.py",
  "_fragment": "generated/fragments/streaming-events/gemini-live.json",
  "api_raw": "live"
 },
 {
  "provider": "gemini",
  "api": "lyria-realtime",
  "direction": "client→server",
  "event": "setup",
  "description": "First message only. Selects the model. Wait for setupComplete before sending anything else.",
  "schema": {
   "setup": {
    "model": "string (models/lyria-realtime-exp)"
   }
  },
  "example": {
   "setup": {
    "model": "models/lyria-realtime-exp"
   }
  },
  "source": "https://ai.google.dev/gemini-api/docs/realtime-music-generation",
  "_fragment": "generated/fragments/streaming-events/gemini-lyria-realtime.json",
  "api_raw": "lyria-realtime (BidiGenerateMusic WebSocket)"
 },
 {
  "provider": "gemini",
  "api": "lyria-realtime",
  "direction": "server→client",
  "event": "setupComplete",
  "description": "Acknowledges setup. Live 2026-09-18: first server frame keys ['setupComplete']",
  "schema": {
   "setupComplete": {}
  },
  "example": {
   "setupComplete": {}
  },
  "source": "https://ai.google.dev/gemini-api/docs/realtime-music-generation",
  "_fragment": "generated/fragments/streaming-events/gemini-lyria-realtime.json",
  "api_raw": "lyria-realtime (BidiGenerateMusic WebSocket)"
 },
 {
  "provider": "gemini",
  "api": "lyria-realtime",
  "direction": "client→server",
  "event": "clientContent",
  "description": "Weighted prompts to start or steer the music; may be sent at any time. Weights are normalized; weight must not be 0.",
  "schema": {
   "clientContent": {
    "weightedPrompts": [
     {
      "text": "string",
      "weight": "number != 0"
     }
    ]
   }
  },
  "example": {
   "clientContent": {
    "weightedPrompts": [
     {
      "text": "minimal techno",
      "weight": 1.0
     }
    ]
   }
  },
  "source": "https://ai.google.dev/gemini-api/docs/realtime-music-generation",
  "_fragment": "generated/fragments/streaming-events/gemini-lyria-realtime.json",
  "api_raw": "lyria-realtime (BidiGenerateMusic WebSocket)"
 },
 {
  "provider": "gemini",
  "api": "lyria-realtime",
  "direction": "client→server",
  "event": "musicGenerationConfig",
  "description": "Full generation config (bpm, density, brightness, scale, guidance, muteBass, muteDrums, onlyBassAndDrums, musicGenerationMode, temperature, topK, seed). Always send the whole object; bpm/scale changes need RESET_CONTEXT.",
  "schema": {
   "musicGenerationConfig": {
    "bpm": "int 60-200",
    "density": "0-1",
    "brightness": "0-1",
    "scale": "Scale enum",
    "guidance": "0-6 (4.0)",
    "muteBass": "bool",
    "muteDrums": "bool",
    "onlyBassAndDrums": "bool",
    "musicGenerationMode": "QUALITY|DIVERSITY|VOCALIZATION",
    "temperature": "0-3 (1.1)",
    "topK": "1-1000 (40)",
    "seed": "int"
   }
  },
  "example": {
   "musicGenerationConfig": {
    "bpm": 120,
    "temperature": 1.0
   }
  },
  "source": "https://ai.google.dev/gemini-api/docs/realtime-music-generation",
  "_fragment": "generated/fragments/streaming-events/gemini-lyria-realtime.json",
  "api_raw": "lyria-realtime (BidiGenerateMusic WebSocket)"
 },
 {
  "provider": "gemini",
  "api": "lyria-realtime",
  "direction": "client→server",
  "event": "playbackControl",
  "description": "PLAY | PAUSE | STOP | RESET_CONTEXT.",
  "schema": {
   "playbackControl": "enum"
  },
  "example": {
   "playbackControl": "PLAY"
  },
  "source": "https://ai.google.dev/gemini-api/docs/realtime-music-generation",
  "_fragment": "generated/fragments/streaming-events/gemini-lyria-realtime.json",
  "api_raw": "lyria-realtime (BidiGenerateMusic WebSocket)"
 },
 {
  "provider": "gemini",
  "api": "lyria-realtime",
  "direction": "server→client",
  "event": "serverContent.audioChunks[]",
  "description": "Generated audio, produced faster than real time (client must buffer). Each chunk: data (base64 raw 16-bit PCM, 48 kHz stereo), mimeType, sourceMetadata {clientContent, musicGenerationConfig} used for that chunk. Live: mimeType audio/l16;rate=48000;channels=2, 384000 bytes in first chunk, sourceMetadata {\"clientContent\": {\"weightedPrompts\": [{\"text\": \"minimal techno\", \"weight\": 1}]}, \"musicGenerationConfig\": {\"temperature\": 1, \"seed\": 603898271, \"bpm\": 120}}",
  "schema": {
   "serverContent": {
    "audioChunks": [
     {
      "data": "base64",
      "mimeType": "string",
      "sourceMetadata": {
       "clientContent": "LiveMusicClientContent",
       "musicGenerationConfig": "LiveMusicGenerationConfig"
      }
     }
    ]
   }
  },
  "example": {
   "serverContent": {
    "audioChunks": [
     {
      "data": "<base64 pcm>",
      "mimeType": "audio/l16;rate=48000;channels=2"
     }
    ]
   }
  },
  "source": "https://ai.google.dev/gemini-api/docs/realtime-music-generation",
  "_fragment": "generated/fragments/streaming-events/gemini-lyria-realtime.json",
  "api_raw": "lyria-realtime (BidiGenerateMusic WebSocket)"
 },
 {
  "provider": "gemini",
  "api": "lyria-realtime",
  "direction": "server→client",
  "event": "filteredPrompt",
  "description": "A prompt rejected by safety filters is ignored and reported here with the reason.",
  "schema": {
   "filteredPrompt": {
    "text": "string",
    "filteredReason": "string"
   }
  },
  "example": {
   "filteredPrompt": {
    "text": "…",
    "filteredReason": "…"
   }
  },
  "source": "https://ai.google.dev/gemini-api/docs/realtime-music-generation",
  "_fragment": "generated/fragments/streaming-events/gemini-lyria-realtime.json",
  "api_raw": "lyria-realtime (BidiGenerateMusic WebSocket)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "error",
  "description": "Emitted when a turn or session fails.",
  "schema": {
   "name": "SessionEventError",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `error`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "error": {
     "type": "SessionErrorResource",
     "required": true,
     "description": "The error that occurred."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.environment.ready",
  "description": "Emitted when a hosted session environment is ready to connect.",
  "schema": {
   "name": "SessionEventAgentSessionEnvironmentReady",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.environment.ready`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "environment": {
     "type": "SessionEnvironmentStateResource",
     "required": true,
     "description": "The current environment state."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.environment.reset",
  "description": "Emitted after a hosted sandbox is replaced. Conversation history survives; changes to the previous sandbox's files and processes do not.",
  "schema": {
   "name": "SessionEventAgentSessionEnvironmentReset",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.environment.reset`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The associated turn, when applicable."
    },
    "environment_id": {
     "type": "string",
     "required": true,
     "description": "The stable environment ID, retained across sandbox replacements."
    },
    "reset_count": {
     "type": "integer",
     "required": true,
     "description": "Monotonically increasing reset number. Repeated notifications share this number."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.output.command_execution_output.delta",
  "description": "Emitted when command execution produces an output delta.",
  "schema": {
   "name": "SessionEventAgentOutputCommandExecutionOutputDelta",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.output.command_execution_output.delta`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "item_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the command execution item."
    },
    "output_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the item in the turn output."
    },
    "delta": {
     "type": "string",
     "required": true,
     "description": "The output text that was appended."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.created",
  "description": "Emitted when a session is created.",
  "schema": {
   "name": "SessionEventAgentSessionCreated",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.created`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session": {
     "type": "SessionResource",
     "required": true,
     "description": "The session that was created."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "example": {
   "type": "agent.session.created",
   "event_id": "evt_b9e132c720d145b68edc79662a437d6e3d8a5636026f4d368d",
   "session": {
    "id": "sess_0b52151131840c7d006aade89b61c88195a75804fb31b33990",
    "object": "agent.session",
    "status": "in_progress",
    "required_actions": [],
    "error": null,
    "agent": {
     "id": "agent_f0363c606b6e418287a352178f20c141750d483e3399419c99",
     "model": "gpt-5.6-luna"
    },
    "environment": {
     "type": "none"
    },
    "…": "other SessionResource fields omitted"
   }
  },
  "example_source": "live 2026-09-18 (gpt-5.6-luna, environment none)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.turn.created",
  "description": "Emitted when a turn is created.",
  "schema": {
   "name": "SessionEventAgentSessionTurnCreated",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.turn.created`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the turn associated with the event."
    },
    "turn": {
     "type": "TurnResource",
     "required": true,
     "description": "The turn at the time it was created."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "example": {
   "type": "agent.session.turn.created",
   "event_id": "evt_82d763250d994c0bb3f17f46435e0bb0c8cfaabc192447b59e",
   "session_id": "sess_0b52151131840c7d006aade89b61c88195a75804fb31b33990",
   "turn_id": "turn_0b52151131840c7d006aade8a3114c8195b6286aaca0730297",
   "turn": {
    "id": "turn_0b52151131840c7d006aade8a3114c8195b6286aaca0730297",
    "object": "agent.session.turn",
    "session_id": "sess_0b52151131840c7d006aade89b61c88195a75804fb31b33990",
    "agent_id": "agent_f0363c606b6e418287a352178f20c141750d483e3399419c99",
    "subagent_id": null,
    "status": "queued",
    "created_at": 1789782177,
    "started_at": null,
    "completed_at": null,
    "error": null,
    "usage": null
   }
  },
  "example_source": "live 2026-09-18 (gpt-5.6-luna, environment none)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.turn.in_progress",
  "description": "Emitted when a turn starts running.",
  "schema": {
   "name": "SessionEventAgentSessionTurnInProgress",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.turn.in_progress`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the turn associated with the event."
    },
    "turn": {
     "type": "TurnResource",
     "required": true,
     "description": "The turn at the time it started running."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "example": {
   "type": "agent.session.turn.in_progress",
   "event_id": "evt_8f92f7ef37104b3a80c44c874a7678bb4ff0c23b7f724c91ad",
   "session_id": "sess_0b52151131840c7d006aade89b61c88195a75804fb31b33990",
   "turn_id": "turn_0b52151131840c7d006aade8a3114c8195b6286aaca0730297",
   "turn": {
    "id": "turn_0b52151131840c7d006aade8a3114c8195b6286aaca0730297",
    "object": "agent.session.turn",
    "session_id": "sess_0b52151131840c7d006aade89b61c88195a75804fb31b33990",
    "agent_id": "agent_f0363c606b6e418287a352178f20c141750d483e3399419c99",
    "subagent_id": null,
    "status": "in_progress",
    "created_at": 1789782177,
    "started_at": 1789782177,
    "completed_at": null,
    "error": null,
    "usage": null
   }
  },
  "example_source": "live 2026-09-18 (gpt-5.6-luna, environment none)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.turn.completed",
  "description": "Emitted when a turn completes.",
  "schema": {
   "name": "SessionEventAgentSessionTurnCompleted",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.turn.completed`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the turn associated with the event."
    },
    "turn": {
     "type": "TurnResource",
     "required": true,
     "description": "The completed turn."
    },
    "usage": {
     "type": "TokenUsageResource | null",
     "required": true,
     "description": "Token usage by the root agent during the turn, when available."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "example": {
   "type": "agent.session.turn.completed",
   "event_id": "evt_af979ab222e442618377470642232372f27408053f824bf7a6",
   "session_id": "sess_0b52151131840c7d006aade89b61c88195a75804fb31b33990",
   "turn_id": "turn_0b52151131840c7d006aade8a3114c8195b6286aaca0730297",
   "turn": {
    "id": "turn_0b52151131840c7d006aade8a3114c8195b6286aaca0730297",
    "object": "agent.session.turn",
    "session_id": "sess_0b52151131840c7d006aade89b61c88195a75804fb31b33990",
    "agent_id": "agent_f0363c606b6e418287a352178f20c141750d483e3399419c99",
    "subagent_id": null,
    "status": "completed",
    "created_at": 1789782177,
    "started_at": 1789782177,
    "completed_at": 1789782179,
    "error": null,
    "usage": null
   },
   "usage": null
  },
  "example_source": "live 2026-09-18 (gpt-5.6-luna, environment none)",
  "terminal_for_turn": true,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.turn.failed",
  "description": "Emitted when a turn fails.",
  "schema": {
   "name": "SessionEventAgentSessionTurnFailed",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.turn.failed`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the turn associated with the event."
    },
    "turn": {
     "type": "TurnResource",
     "required": true,
     "description": "The failed turn."
    },
    "usage": {
     "type": "TokenUsageResource | null",
     "required": true,
     "description": "Token usage by the root agent during the turn, when available."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": true,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.turn.cancelled",
  "description": "Emitted when a turn is cancelled.",
  "schema": {
   "name": "SessionEventAgentSessionTurnCancelled",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.turn.cancelled`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the turn associated with the event."
    },
    "turn": {
     "type": "TurnResource",
     "required": true,
     "description": "The cancelled turn."
    },
    "usage": {
     "type": "TokenUsageResource | null",
     "required": true,
     "description": "Token usage by the root agent during the turn, when available."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": true,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.turn.item.added",
  "description": "Emitted when an item is added to a turn.",
  "schema": {
   "name": "SessionEventAgentSessionTurnItemAdded",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.turn.item.added`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "output_index": {
     "type": "integer | null",
     "required": true,
     "description": "The index of the item in the turn output, when the item is agent output."
    },
    "item": {
     "type": "SessionTurnItemResource",
     "required": true,
     "description": "The item that was added."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "example": {
   "type": "agent.session.turn.item.added",
   "event_id": "evt_6205f1854c5f4d82959bdf7f4e1d4ad1fc82d2295b864a33ac",
   "session_id": "sess_0b52151131840c7d006aade89b61c88195a75804fb31b33990",
   "turn_id": "turn_0b52151131840c7d006aade8a3114c8195b6286aaca0730297",
   "output_index": null,
   "item": {
    "type": "message",
    "id": "msg_a168d37c50fe59f871f0243a74cefcab58523253681a5ad41b",
    "turn_id": "turn_0b52151131840c7d006aade8a3114c8195b6286aaca0730297",
    "role": "user",
    "content": [
     {
      "type": "input_text",
      "text": "Reply with OK."
     }
    ],
    "status": "completed",
    "phase": null
   }
  },
  "example_source": "live 2026-09-18 (gpt-5.6-luna, environment none)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.idle",
  "description": "Emitted when a session becomes idle.",
  "schema": {
   "name": "SessionEventAgentSessionIdle",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.idle`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session": {
     "type": "SessionResource",
     "required": true,
     "description": "The session that became idle."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "example": null,
  "example_source": "observed in examples/openai/agents/send_turn_stream.sh (curl kept open 45 s): emitted right after agent.session.turn.completed; payload not captured",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.in_progress",
  "description": "Emitted when a session starts processing a turn.",
  "schema": {
   "name": "SessionEventAgentSessionInProgress",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.in_progress`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session": {
     "type": "SessionResource",
     "required": true,
     "description": "The session that started processing."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "example": {
   "type": "agent.session.in_progress",
   "event_id": "evt_45c8425b013944cfa70f2883fcc42cc0e317570e3817409b86",
   "session": {
    "id": "sess_0b52151131840c7d006aade89b61c88195a75804fb31b33990",
    "object": "agent.session",
    "status": "in_progress",
    "required_actions": [],
    "error": null,
    "agent": {
     "id": "agent_f0363c606b6e418287a352178f20c141750d483e3399419c99",
     "model": "gpt-5.6-luna"
    },
    "environment": {
     "type": "none"
    },
    "…": "other SessionResource fields omitted"
   }
  },
  "example_source": "live 2026-09-18 (gpt-5.6-luna, environment none)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.requires_action",
  "description": "Emitted when a session is waiting for one or more required actions.",
  "schema": {
   "name": "SessionEventAgentSessionRequiresAction",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.requires_action`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session": {
     "type": "SessionResource",
     "required": true,
     "description": "The session and its current required actions."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.failed",
  "description": "Emitted when a session fails.",
  "schema": {
   "name": "SessionEventAgentSessionFailed",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.failed`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session": {
     "type": "SessionResource",
     "required": true,
     "description": "The failed session."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.environment.pending",
  "description": "Emitted while a session environment is being prepared.",
  "schema": {
   "name": "SessionEventAgentSessionEnvironmentPending",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.environment.pending`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "environment": {
     "type": "SessionEnvironmentStateResource",
     "required": true,
     "description": "The current environment state."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.environment.connected",
  "description": "Emitted when a session environment connects.",
  "schema": {
   "name": "SessionEventAgentSessionEnvironmentConnected",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.environment.connected`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "environment": {
     "type": "SessionEnvironmentStateResource",
     "required": true,
     "description": "The current environment state."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.environment.disconnected",
  "description": "Emitted when a session environment disconnects.",
  "schema": {
   "name": "SessionEventAgentSessionEnvironmentDisconnected",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.environment.disconnected`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "environment": {
     "type": "SessionEnvironmentStateResource",
     "required": true,
     "description": "The current environment state."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.environment.failed",
  "description": "Emitted when a session environment fails.",
  "schema": {
   "name": "SessionEventAgentSessionEnvironmentFailed",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.environment.failed`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "environment": {
     "type": "SessionEnvironmentStateResource",
     "required": true,
     "description": "The current environment state."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.subagent.created",
  "description": "Emitted when a subagent is created.",
  "schema": {
   "name": "SessionEventAgentSessionSubagentCreated",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.subagent.created`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "subagent": {
     "type": "SubagentResource",
     "required": true,
     "description": "The subagent that was created."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.subagent.active",
  "description": "Emitted when a closed subagent successfully resumes.",
  "schema": {
   "name": "SessionEventAgentSessionSubagentActive",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.subagent.active`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "subagent": {
     "type": "SubagentResource",
     "required": true,
     "description": "The subagent that resumed."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.subagent.closed",
  "description": "Emitted when a subagent is closed.",
  "schema": {
   "name": "SessionEventAgentSessionSubagentClosed",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.subagent.closed`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "subagent": {
     "type": "SubagentResource",
     "required": true,
     "description": "The subagent that was closed."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.turn.item.done",
  "description": "Emitted when an output item is complete.",
  "schema": {
   "name": "SessionEventAgentSessionTurnItemDone",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.turn.item.done`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "output_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the output item in the turn output."
    },
    "item": {
     "type": "AgentOutputItemResource",
     "required": true,
     "description": "The completed output item."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "example": {
   "type": "agent.session.turn.item.done",
   "event_id": "evt_753dd7cd1f054eeaba7556ae42f893726b5f902fa2a4479287",
   "session_id": "sess_0b52151131840c7d006aade89b61c88195a75804fb31b33990",
   "turn_id": "turn_0b52151131840c7d006aade8a3114c8195b6286aaca0730297",
   "output_index": 0,
   "item": {
    "type": "message",
    "id": "msg_04be7b73944e7645016aade8a1919087d1aa6bf202ab47a6f4",
    "turn_id": "turn_0b52151131840c7d006aade8a3114c8195b6286aaca0730297",
    "role": "assistant",
    "status": "completed",
    "content": [
     {
      "type": "output_text",
      "text": "OK."
     }
    ],
    "phase": "final_answer"
   }
  },
  "example_source": "live 2026-09-18 (gpt-5.6-luna, environment none)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.turn.content_part.added",
  "description": "Emitted when an output text content part is added.",
  "schema": {
   "name": "SessionEventAgentSessionTurnContentPartAdded",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.turn.content_part.added`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "item_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the message item."
    },
    "output_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the item in the turn output."
    },
    "content_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the content part in the message."
    },
    "part": {
     "type": "OutputTextResource",
     "required": true,
     "description": "The initial content part."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "example": {
   "type": "agent.session.turn.content_part.added",
   "event_id": "evt_8bd9b559adb542639728a63e4696552b53ec7c2a8390478fb3",
   "session_id": "sess_0b52151131840c7d006aade89b61c88195a75804fb31b33990",
   "turn_id": "turn_0b52151131840c7d006aade8a3114c8195b6286aaca0730297",
   "item_id": "msg_04be7b73944e7645016aade8a1919087d1aa6bf202ab47a6f4",
   "output_index": 0,
   "content_index": 0,
   "part": {
    "type": "output_text",
    "text": ""
   }
  },
  "example_source": "live 2026-09-18 (gpt-5.6-luna, environment none)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.turn.content_part.done",
  "description": "Emitted when an output content part is complete.",
  "schema": {
   "name": "SessionEventAgentSessionTurnContentPartDone",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.turn.content_part.done`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "item_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the message item."
    },
    "output_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the item in the turn output."
    },
    "content_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the content part in the message."
    },
    "part": {
     "type": "OutputTextResource",
     "required": true,
     "description": "The completed content part."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "example": {
   "type": "agent.session.turn.content_part.done",
   "event_id": "evt_db3c32d99d7a408980f263c4132cad473f4d16831c954bea98",
   "session_id": "sess_0b52151131840c7d006aade89b61c88195a75804fb31b33990",
   "turn_id": "turn_0b52151131840c7d006aade8a3114c8195b6286aaca0730297",
   "item_id": "msg_04be7b73944e7645016aade8a1919087d1aa6bf202ab47a6f4",
   "output_index": 0,
   "content_index": 0,
   "part": {
    "type": "output_text",
    "text": "OK."
   }
  },
  "example_source": "live 2026-09-18 (gpt-5.6-luna, environment none)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.turn.output_text.delta",
  "description": "Emitted when text is appended to an output text content part.",
  "schema": {
   "name": "SessionEventAgentSessionTurnOutputTextDelta",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.turn.output_text.delta`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "item_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the message item."
    },
    "output_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the item in the turn output."
    },
    "content_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the content part in the message."
    },
    "delta": {
     "type": "string",
     "required": true,
     "description": "The text that was appended."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "example": {
   "type": "agent.session.turn.output_text.delta",
   "event_id": "evt_0d3bc3ebb38d4ef5a06740f6c03833e283e9c91ac94b4e9ab8",
   "session_id": "sess_0b52151131840c7d006aade89b61c88195a75804fb31b33990",
   "turn_id": "turn_0b52151131840c7d006aade8a3114c8195b6286aaca0730297",
   "item_id": "msg_04be7b73944e7645016aade8a1919087d1aa6bf202ab47a6f4",
   "output_index": 0,
   "content_index": 0,
   "delta": "OK"
  },
  "example_source": "live 2026-09-18 (gpt-5.6-luna, environment none)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.turn.output_text.done",
  "description": "Emitted when an output text content part is complete.",
  "schema": {
   "name": "SessionEventAgentSessionTurnOutputTextDone",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.turn.output_text.done`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "item_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the message item."
    },
    "output_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the item in the turn output."
    },
    "content_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the content part in the message."
    },
    "text": {
     "type": "string",
     "required": true,
     "description": "The complete output text."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "example": {
   "type": "agent.session.turn.output_text.done",
   "event_id": "evt_aa570526e28d4ca89a7bb51b52f54a3e1e947f6a34fa41108c",
   "session_id": "sess_0b52151131840c7d006aade89b61c88195a75804fb31b33990",
   "turn_id": "turn_0b52151131840c7d006aade8a3114c8195b6286aaca0730297",
   "item_id": "msg_04be7b73944e7645016aade8a1919087d1aa6bf202ab47a6f4",
   "output_index": 0,
   "content_index": 0,
   "text": "OK."
  },
  "example_source": "live 2026-09-18 (gpt-5.6-luna, environment none)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.turn.reasoning_summary_part.added",
  "description": "Emitted when a reasoning summary content part is added.",
  "schema": {
   "name": "SessionEventAgentSessionTurnReasoningSummaryPartAdded",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.turn.reasoning_summary_part.added`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "item_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the reasoning item."
    },
    "output_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the item in the turn output."
    },
    "summary_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the summary content part."
    },
    "part": {
     "type": "SummaryTextResource",
     "required": true,
     "description": "The initial summary part."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.turn.reasoning_summary_part.done",
  "description": "Emitted when a reasoning summary part is complete.",
  "schema": {
   "name": "SessionEventAgentSessionTurnReasoningSummaryPartDone",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.turn.reasoning_summary_part.done`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "item_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the reasoning item."
    },
    "output_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the item in the turn output."
    },
    "summary_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the summary part."
    },
    "part": {
     "type": "SummaryTextResource",
     "required": true,
     "description": "The completed summary part."
    },
    "status": {
     "type": "string | null",
     "required": true,
     "description": "Present as `incomplete` when summary generation was interrupted."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.turn.reasoning_summary_text.delta",
  "description": "Emitted when text is appended to a reasoning summary.",
  "schema": {
   "name": "SessionEventAgentSessionTurnReasoningSummaryTextDelta",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.turn.reasoning_summary_text.delta`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "item_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the reasoning item."
    },
    "output_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the item in the turn output."
    },
    "summary_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the summary content part."
    },
    "delta": {
     "type": "string",
     "required": true,
     "description": "The summary text that was appended."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "server→client",
  "event": "agent.session.turn.reasoning_summary_text.done",
  "description": "Emitted when a reasoning summary content part is complete.",
  "schema": {
   "name": "SessionEventAgentSessionTurnReasoningSummaryTextDone",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.turn.reasoning_summary_text.done`."
    },
    "event_id": {
     "type": "string",
     "required": true,
     "description": "The unique ID of the event."
    },
    "session_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the session associated with the event."
    },
    "turn_id": {
     "type": "string | null",
     "required": true,
     "description": "The ID of the turn associated with the event, when applicable."
    },
    "item_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the reasoning item."
    },
    "output_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the item in the turn output."
    },
    "summary_index": {
     "type": "integer",
     "required": true,
     "description": "The index of the summary content part."
    },
    "text": {
     "type": "string",
     "required": true,
     "description": "The complete reasoning summary text."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": null,
  "example_source": "not observed live (requires tools/environment/subagents/reasoning summary or a failure)",
  "terminal_for_turn": false,
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/agents/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (Agents API sessions; SSE)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "client→server",
  "event": "agent.session.input.message",
  "description": "Adds one or more user messages and starts a turn.",
  "schema": {
   "name": "SessionInputParamAgentSessionInputMessage",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.input.message`."
    },
    "input": {
     "type": "array<InputMessageParam>",
     "required": true,
     "description": "The user messages to add to the session."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "example": {
   "events": [
    {
     "type": "agent.session.input.message",
     "input": [
      {
       "role": "user",
       "content": [
        {
         "type": "input_text",
         "text": "Reply with OK."
        }
       ]
      }
     ]
    }
   ]
  },
  "example_source": "live 2026-09-18 -> HTTP 202 empty body",
  "source": "https://developers.openai.com/api/docs/guides/agents-api/sessions",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (POST /v1/agents/sessions/{session_id}/events)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "client→server",
  "event": "agent.session.input.cancel",
  "description": "Cancels the session's active turn.",
  "schema": {
   "name": "SessionInputParamAgentSessionInputCancel",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.input.cancel`."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA",
   "LIVE_VERIFIED"
  ],
  "example": {
   "events": [
    {
     "type": "agent.session.input.cancel"
    }
   ]
  },
  "example_source": "live 2026-09-18 -> HTTP 202 empty body",
  "source": "https://developers.openai.com/api/docs/guides/agents-api/sessions",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (POST /v1/agents/sessions/{session_id}/events)"
 },
 {
  "provider": "openai",
  "api": "agents",
  "direction": "client→server",
  "event": "agent.session.input.tool_result",
  "description": "Submits the result of a function call.",
  "schema": {
   "name": "SessionInputParamAgentSessionInputToolResult",
   "fields": {
    "type": {
     "type": "string",
     "required": true,
     "description": "The type of the object. Always `agent.session.input.tool_result`."
    },
    "turn_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the turn that requested the function call."
    },
    "call_id": {
     "type": "string",
     "required": true,
     "description": "The ID of the function call."
    },
    "success": {
     "type": "boolean",
     "required": true,
     "description": "Whether the function call succeeded."
    },
    "output": {
     "type": "FunctionCallOutputParam | null",
     "required": false,
     "description": "The function result when the call succeeded."
    },
    "error": {
     "type": "string | null",
     "required": false,
     "description": "The error message when the call failed."
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": {
   "events": [
    {
     "type": "agent.session.input.tool_result",
     "turn_id": "turn_123",
     "call_id": "call_123",
     "success": true,
     "output": "{\"found\":true}"
    }
   ]
  },
  "example_source": "docs (tools/functions guide)",
  "source": "https://developers.openai.com/api/docs/guides/agents-api/sessions",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (POST /v1/agents/sessions/{session_id}/events)"
 },
 {
  "provider": "openai",
  "api": "agents-webhooks",
  "direction": "server→client (webhook)",
  "event": "agent.session.created",
  "description": "A session is created (self-hosted: data.environment_id, data.environment_type, data.connect.remote_url).",
  "schema": {
   "name": "webhook event",
   "fields": {
    "id": {
     "type": "string"
    },
    "object": {
     "type": "\"event\""
    },
    "created_at": {
     "type": "integer"
    },
    "type": {
     "type": "string"
    },
    "data": {
     "type": "object {id, environment_id?, environment_type?, connect?{remote_url}, required_action?{type}}"
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": {
   "id": "evt_123",
   "object": "event",
   "created_at": 1750287018,
   "type": "agent.session.created",
   "data": {
    "id": "sess_abc123"
   }
  },
  "example_source": "docs",
  "source": "https://developers.openai.com/api/docs/guides/agents-api/sessions/webhooks",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (webhooks — signed HTTP POST, verify with SDK webhooks.verify_signature)"
 },
 {
  "provider": "openai",
  "api": "agents-webhooks",
  "direction": "server→client (webhook)",
  "event": "agent.session.action_required",
  "description": "The session needs a function result or an environment connection; data.required_action.type = function_call | environment_connection. Emitted BEFORE the API waits (up to 5 min) for the executor.",
  "schema": {
   "name": "webhook event",
   "fields": {
    "id": {
     "type": "string"
    },
    "object": {
     "type": "\"event\""
    },
    "created_at": {
     "type": "integer"
    },
    "type": {
     "type": "string"
    },
    "data": {
     "type": "object {id, environment_id?, environment_type?, connect?{remote_url}, required_action?{type}}"
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": {
   "id": "evt_123",
   "object": "event",
   "created_at": 1750287018,
   "type": "agent.session.action_required",
   "data": {
    "id": "sess_abc123",
    "required_action": {
     "type": "function_call"
    }
   }
  },
  "example_source": "docs",
  "source": "https://developers.openai.com/api/docs/guides/agents-api/sessions/webhooks",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (webhooks — signed HTTP POST, verify with SDK webhooks.verify_signature)"
 },
 {
  "provider": "openai",
  "api": "agents-webhooks",
  "direction": "server→client (webhook)",
  "event": "agent.session.in_progress",
  "description": "The session starts processing a turn.",
  "schema": {
   "name": "webhook event",
   "fields": {
    "id": {
     "type": "string"
    },
    "object": {
     "type": "\"event\""
    },
    "created_at": {
     "type": "integer"
    },
    "type": {
     "type": "string"
    },
    "data": {
     "type": "object {id, environment_id?, environment_type?, connect?{remote_url}, required_action?{type}}"
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": {
   "id": "evt_123",
   "object": "event",
   "created_at": 1750287018,
   "type": "agent.session.in_progress",
   "data": {
    "id": "sess_abc123"
   }
  },
  "example_source": "docs",
  "source": "https://developers.openai.com/api/docs/guides/agents-api/sessions/webhooks",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (webhooks — signed HTTP POST, verify with SDK webhooks.verify_signature)"
 },
 {
  "provider": "openai",
  "api": "agents-webhooks",
  "direction": "server→client (webhook)",
  "event": "agent.session.idle",
  "description": "Session idle and ready for input (not a success signal).",
  "schema": {
   "name": "webhook event",
   "fields": {
    "id": {
     "type": "string"
    },
    "object": {
     "type": "\"event\""
    },
    "created_at": {
     "type": "integer"
    },
    "type": {
     "type": "string"
    },
    "data": {
     "type": "object {id, environment_id?, environment_type?, connect?{remote_url}, required_action?{type}}"
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": {
   "id": "evt_123",
   "object": "event",
   "created_at": 1750287018,
   "type": "agent.session.idle",
   "data": {
    "id": "sess_abc123"
   }
  },
  "example_source": "docs",
  "source": "https://developers.openai.com/api/docs/guides/agents-api/sessions/webhooks",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (webhooks — signed HTTP POST, verify with SDK webhooks.verify_signature)"
 },
 {
  "provider": "openai",
  "api": "agents-webhooks",
  "direction": "server→client (webhook)",
  "event": "agent.session.failed",
  "description": "Session entered failed state (not every failed turn).",
  "schema": {
   "name": "webhook event",
   "fields": {
    "id": {
     "type": "string"
    },
    "object": {
     "type": "\"event\""
    },
    "created_at": {
     "type": "integer"
    },
    "type": {
     "type": "string"
    },
    "data": {
     "type": "object {id, environment_id?, environment_type?, connect?{remote_url}, required_action?{type}}"
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "example": {
   "id": "evt_123",
   "object": "event",
   "created_at": 1750287018,
   "type": "agent.session.failed",
   "data": {
    "id": "sess_abc123"
   }
  },
  "example_source": "docs",
  "source": "https://developers.openai.com/api/docs/guides/agents-api/sessions/webhooks",
  "_fragment": "generated/fragments/streaming-events/openai-agents.json",
  "api_raw": "agents (webhooks — signed HTTP POST, verify with SDK webhooks.verify_signature)"
 },
 {
  "provider": "openai",
  "api": "audio-transcriptions",
  "endpoint": "POST /v1/audio/transcriptions (stream=true, SSE)",
  "direction": "server→client",
  "event": "transcript.text.segment",
  "description": "Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with `stream` set to `true` and `response_format` set to `diarized_json`.",
  "schema": {
   "schema_name": "TranscriptTextSegmentEvent",
   "fields": [
    {
     "name": "id",
     "type": "string",
     "required": true,
     "description": "Unique identifier for the segment."
    },
    {
     "name": "end",
     "type": "number",
     "required": true,
     "description": "End timestamp of the segment in seconds."
    },
    {
     "name": "speaker",
     "type": "string",
     "required": true,
     "description": "Speaker label for this segment."
    },
    {
     "name": "start",
     "type": "number",
     "required": true,
     "description": "Start timestamp of the segment in seconds."
    },
    {
     "name": "text",
     "type": "string",
     "required": true,
     "description": "Transcript text for this segment."
    },
    {
     "name": "type",
     "type": "\"transcript.text.segment\"",
     "required": true,
     "description": "The type of the event. Always `transcript.text.segment`.",
     "enum": [
      "transcript.text.segment"
     ]
    }
   ]
  },
  "example": {
   "type": "transcript.text.segment",
   "id": "seg_002",
   "start": 5.2,
   "end": 12.8,
   "text": "Hi, I need help with diarization.",
   "speaker": "A"
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/streaming-events#transcript.text.segment",
   "retrieved_at": "2026-09-19T01:31:50Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-audio-transcription.json"
 },
 {
  "provider": "openai",
  "api": "audio-transcriptions",
  "endpoint": "POST /v1/audio/transcriptions (stream=true, SSE)",
  "direction": "server→client",
  "event": "transcript.text.delta",
  "description": "Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`.",
  "schema": {
   "schema_name": "TranscriptTextDeltaEvent",
   "fields": [
    {
     "name": "delta",
     "type": "string",
     "required": true,
     "description": "The text delta that was additionally transcribed."
    },
    {
     "name": "type",
     "type": "\"transcript.text.delta\"",
     "required": true,
     "description": "The type of the event. Always `transcript.text.delta`.",
     "enum": [
      "transcript.text.delta"
     ]
    },
    {
     "name": "logprobs",
     "type": "array of object { token, bytes, logprob }",
     "required": false,
     "description": "The log probabilities of the delta. Only included if you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`.",
     "fields": [
      {
       "name": "token",
       "type": "string",
       "required": false,
       "description": "The token that was used to generate the log probability."
      },
      {
       "name": "bytes",
       "type": "array of number",
       "required": false,
       "description": "The bytes that were used to generate the log probability."
      },
      {
       "name": "logprob",
       "type": "number",
       "required": false,
       "description": "The log probability of the token."
      }
     ]
    },
    {
     "name": "segment_id",
     "type": "string",
     "required": false,
     "description": "Identifier of the diarized segment that this delta belongs to. Only present when using `gpt-4o-transcribe-diarize`."
    }
   ]
  },
  "example": {
   "type": "transcript.text.delta",
   "delta": " wonderful"
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/streaming-events#transcript.text.delta",
   "retrieved_at": "2026-09-19T01:31:50Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-audio-transcription.json"
 },
 {
  "provider": "openai",
  "api": "audio-transcriptions",
  "endpoint": "POST /v1/audio/transcriptions (stream=true, SSE)",
  "direction": "server→client",
  "event": "transcript.text.done",
  "description": "Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`.",
  "schema": {
   "schema_name": "TranscriptTextDoneEvent",
   "fields": [
    {
     "name": "text",
     "type": "string",
     "required": true,
     "description": "The text that was transcribed."
    },
    {
     "name": "type",
     "type": "\"transcript.text.done\"",
     "required": true,
     "description": "The type of the event. Always `transcript.text.done`.",
     "enum": [
      "transcript.text.done"
     ]
    },
    {
     "name": "languages",
     "type": "array of TranscriptionLanguage",
     "required": false,
     "description": "The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.",
     "fields": [
      {
       "name": "code",
       "type": "string",
       "required": true,
       "description": "The code of a language detected in the audio."
      }
     ]
    },
    {
     "name": "logprobs",
     "type": "array of object { token, bytes, logprob }",
     "required": false,
     "description": "The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`.",
     "fields": [
      {
       "name": "token",
       "type": "string",
       "required": false,
       "description": "The token that was used to generate the log probability."
      },
      {
       "name": "bytes",
       "type": "array of number",
       "required": false,
       "description": "The bytes that were used to generate the log probability."
      },
      {
       "name": "logprob",
       "type": "number",
       "required": false,
       "description": "The log probability of the token."
      }
     ]
    },
    {
     "name": "usage",
     "type": "object { input_tokens, output_tokens, total_tokens, 2 more }",
     "required": false,
     "description": "Usage statistics for models billed by token usage.",
     "fields": [
      {
       "name": "input_tokens",
       "type": "number",
       "required": true,
       "description": "Number of input tokens billed for this request."
      },
      {
       "name": "output_tokens",
       "type": "number",
       "required": true,
       "description": "Number of output tokens generated."
      },
      {
       "name": "total_tokens",
       "type": "number",
       "required": true,
       "description": "Total number of tokens used (input + output)."
      },
      {
       "name": "type",
       "type": "\"tokens\"",
       "required": true,
       "description": "The type of the usage object. Always `tokens` for this variant.",
       "enum": [
        "tokens"
       ]
      },
      {
       "name": "input_token_details",
       "type": "object { audio_tokens, text_tokens }",
       "required": false,
       "description": "Details about the input tokens billed for this request.",
       "fields": "… 2 nested fields (see source)"
      }
     ]
    }
   ]
  },
  "example": {
   "type": "transcript.text.done",
   "text": "I see skies of blue and clouds of white, the bright blessed days, the dark sacred nights, and I think to myself, what a wonderful world.",
   "usage": {
    "type": "tokens",
    "input_tokens": 14,
    "input_token_details": {
     "text_tokens": 10,
     "audio_tokens": 4
    },
    "output_tokens": 31,
    "total_tokens": 45
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/streaming-events#transcript.text.done",
   "retrieved_at": "2026-09-19T01:31:50Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-audio-transcription.json"
 },
 {
  "provider": "openai",
  "api": "audio-speech",
  "endpoint": "POST /v1/audio/speech (stream_format=sse, SSE)",
  "direction": "server→client",
  "event": "speech.audio.delta",
  "description": "Emitted for each chunk of audio data generated during speech synthesis (stream_format=sse).",
  "schema": {
   "schema_name": "CreateSpeechResponseStreamEvent",
   "fields": [
    {
     "name": "type",
     "type": "\"speech.audio.delta\"",
     "required": true,
     "description": "Always `speech.audio.delta`."
    },
    {
     "name": "audio",
     "type": "string",
     "required": true,
     "description": "A chunk of Base64-encoded audio data."
    }
   ]
  },
  "example": {
   "type": "speech.audio.delta",
   "audio": "<base64>"
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "notes": "Observed 2026-09-18: 4× speech.audio.delta then speech.audio.done then `data: [DONE]` for input 'OK' (gpt-4o-mini-tts, response_format=pcm). Not supported for tts-1/tts-1-hd.",
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/audio/subresources/speech/methods/create",
   "retrieved_at": "2026-09-19T01:31:50Z"
  },
  "openapi_schema": "CreateSpeechResponseStreamEvent",
  "_fragment": "generated/fragments/streaming-events/openai-audio-transcription.json"
 },
 {
  "provider": "openai",
  "api": "audio-speech",
  "endpoint": "POST /v1/audio/speech (stream_format=sse, SSE)",
  "direction": "server→client",
  "event": "speech.audio.done",
  "description": "Emitted when the speech synthesis is complete and all audio has been streamed.",
  "schema": {
   "schema_name": "CreateSpeechResponseStreamEvent",
   "fields": [
    {
     "name": "type",
     "type": "\"speech.audio.done\"",
     "required": true,
     "description": "Always `speech.audio.done`."
    },
    {
     "name": "usage",
     "type": "object { input_tokens, output_tokens, total_tokens }",
     "required": true,
     "description": "Token usage statistics for the request."
    }
   ]
  },
  "example": {
   "type": "speech.audio.done",
   "usage": {
    "input_tokens": 14,
    "output_tokens": 101,
    "total_tokens": 115
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "notes": "Observed 2026-09-18: 4× speech.audio.delta then speech.audio.done then `data: [DONE]` for input 'OK' (gpt-4o-mini-tts, response_format=pcm). Not supported for tts-1/tts-1-hd.",
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/audio/subresources/speech/methods/create",
   "retrieved_at": "2026-09-19T01:31:50Z"
  },
  "openapi_schema": "CreateSpeechResponseStreamEvent",
  "_fragment": "generated/fragments/streaming-events/openai-audio-transcription.json"
 },
 {
  "provider": "openai",
  "api": "chat_completions",
  "direction": "server→client",
  "event": "chat.completion.chunk",
  "description": "Streamed chunk of a chat completion (SSE data-only lines `data: {...}`; no `event:` names). Each chunk shares id/created/model; choices[].delta accumulates role/content/refusal/tool_calls/function_call; finish_reason set on the last content chunk; with stream_options.include_usage a final chunk has choices=[] and usage; stream ends with `data: [DONE]`.",
  "schema": {
   "properties": {
    "id": {
     "type": "string",
     "description": "A unique identifier for the chat completion. Each chunk has the same ID."
    },
    "choices": {
     "type": "array<object>",
     "description": "A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the last chunk if you set `stream_options: {\"include_usage\": true}`."
    },
    "choices[]": {
     "type": "object",
     "description": ""
    },
    "choices[].delta": {
     "type": "object",
     "description": "A chat completion delta generated by streamed model responses."
    },
    "choices[].logprobs": {
     "type": "object | null",
     "description": "Log probability information for the choice."
    },
    "choices[].finish_reason": {
     "type": "string | null",
     "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, `tool_"
    },
    "choices[].index": {
     "type": "integer",
     "description": "The index of the choice in the list of choices."
    },
    "created": {
     "type": "integer",
     "description": "The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp."
    },
    "model": {
     "type": "string",
     "description": "The model to generate the completion."
    },
    "obfuscation": {
     "type": "string",
     "description": "An obfuscation string added to normalize the size of streamed chunks as a mitigation to certain side-channel attacks. The field is included by default and omitted when `stream_options.include_obfuscation` is `false`."
    },
    "service_tier": {
     "type": "string | null",
     "description": "Specifies the processing type used for serving the request. - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the"
    },
    "system_fingerprint": {
     "type": "string",
     "description": "This fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism."
    },
    "object": {
     "type": "string",
     "description": "The object type, which is always `chat.completion.chunk`."
    },
    "usage": {
     "type": "object | null",
     "description": "An optional field that will only be present when you set `stream_options: {\"include_usage\": true}` in your request. When present, it contains a null value **except for the last chunk** which contains the token usage statistics for the entire request. **NOTE:** If the stream is interrupted or cancell"
    },
    "usage.completion_tokens": {
     "type": "integer",
     "description": "Number of tokens in the generated completion."
    },
    "usage.prompt_tokens": {
     "type": "integer",
     "description": "Number of tokens in the prompt."
    },
    "usage.total_tokens": {
     "type": "integer",
     "description": "Total number of tokens used in the request (prompt + completion)."
    },
    "usage.completion_tokens_details": {
     "type": "object",
     "description": "Breakdown of tokens used in a completion."
    },
    "usage.prompt_tokens_details": {
     "type": "object",
     "description": "Breakdown of tokens used in the prompt."
    },
    "moderation": {
     "type": "object | null",
     "description": "Moderation results for the request input and generated output. Present on the moderation chunk when moderated completions are requested."
    },
    "moderation.input": {
     "type": "object<moderation_results> | object<error>",
     "description": "Moderation for the request input."
    },
    "moderation.output": {
     "type": "object<moderation_results> | object<error>",
     "description": "Moderation for the generated output."
    }
   },
   "delta_properties": {
    "content": {
     "type": "string | null",
     "description": "The contents of the chunk message."
    },
    "function_call": {
     "type": "object",
     "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model."
    },
    "function_call.arguments": {
     "type": "string",
     "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."
    },
    "function_call.name": {
     "type": "string",
     "description": "The name of the function to call."
    },
    "tool_calls": {
     "type": "array<object>",
     "description": ""
    },
    "tool_calls[]": {
     "type": "object",
     "description": ""
    },
    "tool_calls[].index": {
     "type": "integer",
     "description": ""
    },
    "tool_calls[].id": {
     "type": "string",
     "description": "The ID of the tool call."
    },
    "tool_calls[].type": {
     "type": "string",
     "description": "The type of the tool. Currently, only `function` is supported."
    },
    "tool_calls[].function": {
     "type": "object",
     "description": ""
    },
    "role": {
     "type": "string",
     "description": "The role of the author of this message."
    },
    "refusal": {
     "type": "string | null",
     "description": "The refusal message generated by the model."
    }
   },
   "required": [
    "id",
    "object",
    "created",
    "model",
    "choices"
   ]
  },
  "example": [
   {
    "id": "chatcmpl-EPeQH3I6nB3R9W69QuYpqJp9beSW7",
    "object": "chat.completion.chunk",
    "created": 1789782293,
    "model": "gpt-4.1-nano-2025-04-14",
    "service_tier": "default",
    "system_fingerprint": "fp_6afed20c8d",
    "choices": [
     {
      "index": 0,
      "delta": {
       "role": "assistant",
       "content": "",
       "refusal": null
      },
      "logprobs": null,
      "finish_reason": null
     }
    ],
    "usage": null,
    "obfuscation": "GO7oM1GH"
   },
   {
    "id": "chatcmpl-EPeQH3I6nB3R9W69QuYpqJp9beSW7",
    "object": "chat.completion.chunk",
    "created": 1789782293,
    "model": "gpt-4.1-nano-2025-04-14",
    "service_tier": "default",
    "system_fingerprint": "fp_6afed20c8d",
    "choices": [
     {
      "index": 0,
      "delta": {
       "content": "OK"
      },
      "logprobs": null,
      "finish_reason": null
     }
    ],
    "usage": null,
    "obfuscation": "4EFX0fab"
   },
   {
    "id": "chatcmpl-EPeQH3I6nB3R9W69QuYpqJp9beSW7",
    "object": "chat.completion.chunk",
    "created": 1789782293,
    "model": "gpt-4.1-nano-2025-04-14",
    "service_tier": "default",
    "system_fingerprint": "fp_6afed20c8d",
    "choices": [
     {
      "index": 0,
      "delta": {},
      "logprobs": null,
      "finish_reason": "stop"
     }
    ],
    "usage": null,
    "obfuscation": "9Pwv"
   }
  ],
  "live_sequence": [
   "finish:None",
   "finish:None",
   "finish:stop",
   "usage",
   "[DONE]"
  ],
  "source": "https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "_fragment": "generated/fragments/streaming-events/openai-chat-completions.json"
 },
 {
  "provider": "openai",
  "api": "chat_completions",
  "direction": "server→client",
  "event": "[DONE]",
  "description": "Terminal sentinel line `data: [DONE]` closing a Chat Completions or legacy Completions stream. Not JSON.",
  "schema": null,
  "example": "data: [DONE]",
  "source": "https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "_fragment": "generated/fragments/streaming-events/openai-chat-completions.json"
 },
 {
  "provider": "openai",
  "api": "completions",
  "direction": "server→client",
  "event": "text_completion (streamed)",
  "description": "Legacy /v1/completions stream: same `text_completion` object as the non-streamed response, one chunk per token group (choices[].text), usage chunk with choices=[] when stream_options.include_usage, then `data: [DONE]`.",
  "schema": {
   "properties": {
    "id": {
     "type": "string"
    },
    "object": {
     "type": "string",
     "enum": [
      "text_completion"
     ]
    },
    "created": {
     "type": "integer"
    },
    "model": {
     "type": "string"
    },
    "choices": {
     "type": "array<{text, index, logprobs, finish_reason}>"
    },
    "usage": {
     "type": "CompletionUsage | null"
    }
   },
   "required": [
    "id",
    "object",
    "created",
    "model",
    "choices"
   ]
  },
  "example": [
   {
    "id": "cmpl-EPeSeLzbtijvkoJPKFq4IhXFMrRuK",
    "object": "text_completion",
    "created": 1789782440,
    "choices": [
     {
      "text": "\n\n",
      "index": 0,
      "logprobs": null,
      "finish_reason": null
     }
    ],
    "model": "gpt-3.5-turbo-instruct:20230824-v2",
    "usage": null
   },
   {
    "id": "cmpl-EPeSeLzbtijvkoJPKFq4IhXFMrRuK",
    "object": "text_completion",
    "created": 1789782440,
    "choices": [
     {
      "text": "OK",
      "index": 0,
      "logprobs": null,
      "finish_reason": null
     }
    ],
    "model": "gpt-3.5-turbo-instruct:20230824-v2",
    "usage": null
   }
  ],
  "source": "https://developers.openai.com/api/reference/resources/completions/methods/create",
  "status": [
   "DOCUMENTED",
   "LEGACY",
   "LIVE_VERIFIED"
  ],
  "_fragment": "generated/fragments/streaming-events/openai-chat-completions.json"
 },
 {
  "provider": "openai",
  "api": "images",
  "direction": "server→client",
  "event": "image_generation.partial_image",
  "description": "A partial (progressively refined) image is available. Emitted up to `partial_images` times (0-3); may be fewer if the final image is ready sooner. Each partial image bills +100 image output tokens.",
  "schema": {
   "b64_json": "string (base64 image bytes)",
   "background": "transparent|opaque|auto",
   "created_at": "integer (unix s)",
   "output_format": "png|webp|jpeg",
   "quality": "low|medium|high|xhigh|max|auto",
   "size": "WIDTHxHEIGHT string | 1024x1024 | 1024x1536 | 1536x1024 | auto",
   "partial_image_index": "integer (0-based)",
   "type": "image_generation.partial_image"
  },
  "example": {
   "type": "image_generation.partial_image",
   "b64_json": "...",
   "partial_image_index": 0
  },
  "source": "https://developers.openai.com/api/reference/resources/images/generation-streaming-events",
  "status": [
   "DOCUMENTED",
   "UNVERIFIED"
  ],
  "transport": "SSE: `event: <name>` line followed by `data: <json>`; only with stream=true on GPT image models",
  "_fragment": "generated/fragments/streaming-events/openai-images.json",
  "api_raw": "POST /v1/images/generations"
 },
 {
  "provider": "openai",
  "api": "images",
  "direction": "server→client",
  "event": "image_generation.completed",
  "description": "Final image is available; carries the full usage block.",
  "schema": {
   "b64_json": "string (base64 image bytes)",
   "background": "transparent|opaque|auto",
   "created_at": "integer (unix s)",
   "output_format": "png|webp|jpeg",
   "quality": "low|medium|high|xhigh|max|auto",
   "size": "WIDTHxHEIGHT string | 1024x1024 | 1024x1536 | 1536x1024 | auto",
   "type": "image_generation.completed",
   "usage": {
    "input_tokens": "integer",
    "input_tokens_details": {
     "image_tokens": "integer",
     "text_tokens": "integer"
    },
    "output_tokens": "integer (image output tokens)",
    "total_tokens": "integer"
   }
  },
  "example": {
   "type": "image_generation.completed",
   "b64_json": "...",
   "usage": {
    "total_tokens": 100,
    "input_tokens": 50,
    "output_tokens": 50,
    "input_tokens_details": {
     "text_tokens": 10,
     "image_tokens": 40
    }
   }
  },
  "source": "https://developers.openai.com/api/reference/resources/images/generation-streaming-events",
  "status": [
   "DOCUMENTED",
   "UNVERIFIED"
  ],
  "transport": "SSE: `event: <name>` line followed by `data: <json>`; only with stream=true on GPT image models",
  "_fragment": "generated/fragments/streaming-events/openai-images.json",
  "api_raw": "POST /v1/images/generations"
 },
 {
  "provider": "openai",
  "api": "images",
  "direction": "server→client",
  "event": "image_edit.partial_image",
  "description": "Partial edited image during streaming edits.",
  "schema": {
   "b64_json": "string (base64 image bytes)",
   "background": "transparent|opaque|auto",
   "created_at": "integer (unix s)",
   "output_format": "png|webp|jpeg",
   "quality": "low|medium|high|xhigh|max|auto",
   "size": "WIDTHxHEIGHT string | 1024x1024 | 1024x1536 | 1536x1024 | auto",
   "partial_image_index": "integer (0-based)",
   "type": "image_edit.partial_image"
  },
  "example": {
   "type": "image_edit.partial_image",
   "b64_json": "...",
   "partial_image_index": 0
  },
  "source": "https://developers.openai.com/api/reference/resources/images/edit-streaming-events",
  "status": [
   "DOCUMENTED",
   "UNVERIFIED"
  ],
  "transport": "SSE: `event: <name>` line followed by `data: <json>`; only with stream=true on GPT image models",
  "_fragment": "generated/fragments/streaming-events/openai-images.json",
  "api_raw": "POST /v1/images/edits"
 },
 {
  "provider": "openai",
  "api": "images",
  "direction": "server→client",
  "event": "image_edit.completed",
  "description": "Final edited image with usage.",
  "schema": {
   "b64_json": "string (base64 image bytes)",
   "background": "transparent|opaque|auto",
   "created_at": "integer (unix s)",
   "output_format": "png|webp|jpeg",
   "quality": "low|medium|high|xhigh|max|auto",
   "size": "WIDTHxHEIGHT string | 1024x1024 | 1024x1536 | 1536x1024 | auto",
   "type": "image_edit.completed",
   "usage": {
    "input_tokens": "integer",
    "input_tokens_details": {
     "image_tokens": "integer",
     "text_tokens": "integer"
    },
    "output_tokens": "integer (image output tokens)",
    "total_tokens": "integer"
   }
  },
  "example": {
   "type": "image_edit.completed",
   "b64_json": "...",
   "usage": {
    "total_tokens": 100,
    "input_tokens": 50,
    "output_tokens": 50,
    "input_tokens_details": {
     "text_tokens": 10,
     "image_tokens": 40
    }
   }
  },
  "source": "https://developers.openai.com/api/reference/resources/images/edit-streaming-events",
  "status": [
   "DOCUMENTED",
   "UNVERIFIED"
  ],
  "transport": "SSE: `event: <name>` line followed by `data: <json>`; only with stream=true on GPT image models",
  "_fragment": "generated/fragments/streaming-events/openai-images.json",
  "api_raw": "POST /v1/images/edits"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "client→server",
  "event": "session.start",
  "description": "Start a Live session on a primary WebSocket. Send this event before other commands and wait for `session.started`.",
  "schema": {
   "schema_name": "LiveSessionStartEvent",
   "fields": [
    {
     "name": "session",
     "type": "SessionConfig",
     "required": true,
     "description": "Initial configuration for a primary WebSocket. Send session.start first and wait for session.started before application commands. WebRTC creation already starts the session; do not send this event again on its data channel.",
     "fields": [
      {
       "name": "model",
       "type": "string or \"gpt-live-1\"",
       "required": true,
       "description": "The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.",
       "enum": [
        "gpt-live-1"
       ]
      },
      {
       "name": "audio",
       "type": "object { format, output }",
       "required": false,
       "description": "Startup audio configuration. Only primary WebSockets accept audio.format; WebRTC and SIP negotiate their media format. Voice and format are immutable after startup.",
       "fields": "… 2 nested fields (see source)"
      },
      {
       "name": "client",
       "type": "ClientConfig",
       "required": false,
       "description": "Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session. Trusted sideband connections are unaffected.",
       "fields": "… 1 nested fields (see source)"
      },
      {
       "name": "delegation",
       "type": "ClientDelegation or object { responses, type }  or null",
       "required": false,
       "description": "Who handles tasks delegated by the Live model. Omitted or null selects your application; use `responses` to let the API manage a Responses backend.",
       "variants": [
        {
         "variant": "ClientDelegation object { type }",
         "description": "Delegate tasks to your application. The Live session emits delegation events that your backend handles.",
         "fields": "…"
        },
        {
         "variant": "Responses object { responses, type }",
         "description": "Delegate tasks to a Responses model managed by the Live session.",
         "fields": "…"
        }
       ]
      },
      {
       "name": "input",
       "type": "array of InitialItem",
       "required": false,
       "description": "Ordered text-only history supplied before startup. Supports developer, user, and assistant messages with one text part each; at most 128 messages and 8,192 rendered tokens in total.",
       "variants": [
        {
         "variant": "Developer object { content, role, id, 2 more }",
         "description": "A developer message included in the initial text history of a Live session.",
         "fields": "…"
        },
        {
         "variant": "User object { content, role, id, 2 more }",
         "description": "A user message included in the initial text history of a Live session.",
         "fields": "…"
        },
        {
         "variant": "Assistant object { content, role, id, 2 more }",
         "description": "An assistant message included in the initial text history of a Live session.",
         "fields": "…"
        }
       ]
      },
      {
       "name": "instructions",
       "type": "string or null",
       "required": false,
       "description": "Frontend instructions for voice, conversation, interruptions, and when to delegate. Start with the [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting); put business rules and tool workflows in a separate [backend prompt](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt). Limited to 16,384 client-supplied tokens. Omitted or blank instructions use server defaults. Immutable after startup."
      },
      {
       "name": "store",
       "type": "boolean",
       "required": false,
       "description": "Whether to store the session for later forking and recording download. Defaults to false for new sessions."
      }
     ]
    },
    {
     "name": "type",
     "type": "\"session.start\"",
     "required": true,
     "description": "The Live client event type. Always `session.start`.",
     "enum": [
      "session.start"
     ]
    },
    {
     "name": "event_id",
     "type": "string or null",
     "required": false,
     "description": "Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id."
    }
   ]
  },
  "example": {
   "type": "session.start",
   "event_id": "evt_start_001",
   "session": {
    "model": "gpt-live-1",
    "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",
    "audio": {
     "format": {
      "type": "audio/pcm",
      "rate": 24000
     },
     "output": {
      "voice": "marin"
     }
    },
    "delegation": {
     "type": "client"
    }
   }
  },
  "connections": [
   "primary",
   "fork"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.start",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.start",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.start",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "client→server",
  "event": "session.update",
  "description": "Update the delegation settings of an active Live session. The server acknowledges accepted changes with `session.updated`.",
  "schema": {
   "schema_name": "LiveSessionUpdateParam",
   "fields": [
    {
     "name": "session",
     "type": "SessionUpdateConfig",
     "required": true,
     "description": "Sparse delegation updates. Omitted settings retain their values. The delegation type cannot change, including resetting Responses delegation to null or client. Model, frontend instructions, audio, and startup input are immutable.",
     "fields": [
      {
       "name": "delegation",
       "type": "ClientDelegation or object { type, responses }  or null",
       "required": false,
       "description": "Delegation settings to update. The delegation type must match the current session; omitted settings retain their values.",
       "variants": [
        {
         "variant": "ClientDelegation object { type }",
         "description": "Delegate tasks to your application. The Live session emits delegation events that your backend handles.",
         "fields": "…"
        },
        {
         "variant": "Responses object { type, responses }",
         "description": "Update the Responses backend for an existing Live session without changing delegation ownership.",
         "fields": "…"
        }
       ]
      }
     ]
    },
    {
     "name": "type",
     "type": "\"session.update\"",
     "required": true,
     "description": "The Live client event type. Always `session.update`.",
     "enum": [
      "session.update"
     ]
    },
    {
     "name": "event_id",
     "type": "string or null",
     "required": false,
     "description": "Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id."
    }
   ]
  },
  "example": {
   "type": "session.update",
   "event_id": "evt_update_001",
   "session": {
    "delegation": {
     "type": "responses",
     "responses": {
      "instructions": "Check restaurant availability. Ask before confirming a booking.",
      "max_output_tokens": 1024
     }
    }
   }
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.update",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.update",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.update",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.update",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "client→server",
  "event": "session.input_audio.append",
  "description": "Send audio to a Live session over its primary WebSocket. WebRTC and SIP sessions send audio over their media transport.",
  "schema": {
   "schema_name": "LiveInputAudioAppendEvent",
   "fields": [
    {
     "name": "audio",
     "type": "string",
     "required": true,
     "description": "Base64-encoded raw audio in the startup-selected format, without a WAV or other container header. Primary WebSocket only; media transports use their audio track. Audio appends have no acknowledgment. Reflected sideband server events reuse this event type and audio key, with no timestamps or event_id; their audio is always mono PCM16LE at 24 kHz."
    },
    {
     "name": "type",
     "type": "\"session.input_audio.append\"",
     "required": true,
     "description": "The Live client event type. Always `session.input_audio.append`.",
     "enum": [
      "session.input_audio.append"
     ]
    },
    {
     "name": "event_id",
     "type": "string or null",
     "required": false,
     "description": "Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id."
    }
   ]
  },
  "example": {
   "type": "session.input_audio.append",
   "audio": "AACAAIAAAIAAAP9/AIAAgA=="
  },
  "connections": [
   "primary",
   "fork"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.input_audio.append",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.input_audio.append",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.input_audio.append",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "client→server",
  "event": "session.input_audio.mute",
  "description": "Mute audio input to the Live model without closing the session. The server acknowledges with `session.input_audio.muted`.",
  "schema": {
   "schema_name": "LiveInputAudioMuteParam",
   "fields": [
    {
     "name": "type",
     "type": "\"session.input_audio.mute\"",
     "required": true,
     "description": "The Live client event type. Always `session.input_audio.mute`.",
     "enum": [
      "session.input_audio.mute"
     ]
    },
    {
     "name": "event_id",
     "type": "string or null",
     "required": false,
     "description": "Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id."
    }
   ]
  },
  "example": {
   "type": "session.input_audio.mute",
   "event_id": "evt_mute_001"
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.input_audio.mute",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.input_audio.mute",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.input_audio.mute",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.input_audio.mute",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "client→server",
  "event": "session.input_audio.unmute",
  "description": "Resume audio input to a Live model after muting it. The server acknowledges with `session.input_audio.unmuted`.",
  "schema": {
   "schema_name": "LiveInputAudioUnmuteParam",
   "fields": [
    {
     "name": "type",
     "type": "\"session.input_audio.unmute\"",
     "required": true,
     "description": "The Live client event type. Always `session.input_audio.unmute`.",
     "enum": [
      "session.input_audio.unmute"
     ]
    },
    {
     "name": "event_id",
     "type": "string or null",
     "required": false,
     "description": "Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id."
    }
   ]
  },
  "example": {
   "type": "session.input_audio.unmute",
   "event_id": "evt_unmute_001"
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.input_audio.unmute",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.input_audio.unmute",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.input_audio.unmute",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.input_audio.unmute",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "client→server",
  "event": "session.instructions.append",
  "description": "Append instructions to the Live conversation while it is running, optionally associating them with an existing client delegation.",
  "schema": {
   "schema_name": "LiveInstructionsAppendParam",
   "fields": [
    {
     "name": "content",
     "type": "string",
     "required": true,
     "description": "Instruction text to append, limited to 500 tokens. This is a plain string, not an array of content parts."
    },
    {
     "name": "delegation_id",
     "type": "string or null",
     "required": true,
     "description": "Required, nullable. Set null for general session context, or use the ID from session.delegation.created for an existing client delegation. Non-null IDs are not accepted with Responses delegation."
    },
    {
     "name": "type",
     "type": "\"session.instructions.append\"",
     "required": true,
     "description": "The Live client event type. Always `session.instructions.append`.",
     "enum": [
      "session.instructions.append"
     ]
    },
    {
     "name": "event_id",
     "type": "string or null",
     "required": false,
     "description": "Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id."
    }
   ]
  },
  "example": {
   "type": "session.instructions.append",
   "event_id": "evt_instructions_001",
   "delegation_id": null,
   "content": "The caller prefers outdoor seating."
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.instructions.append",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.instructions.append",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.instructions.append",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.instructions.append",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "client→server",
  "event": "session.thinking.append",
  "description": "Provide silent reasoning or progress context to the Live model, optionally for an existing client delegation.",
  "schema": {
   "schema_name": "LiveThinkingAppendParam",
   "fields": [
    {
     "name": "content",
     "type": "string",
     "required": true,
     "description": "Silent reasoning or progress context, limited to 500 tokens. It does not directly request speech, but can influence later speech and is not a secrecy boundary."
    },
    {
     "name": "delegation_id",
     "type": "string or null",
     "required": true,
     "description": "Required, nullable. Set null for general session context, or use the ID from session.delegation.created for an existing client delegation. Non-null IDs are not accepted with Responses delegation."
    },
    {
     "name": "type",
     "type": "\"session.thinking.append\"",
     "required": true,
     "description": "The Live client event type. Always `session.thinking.append`.",
     "enum": [
      "session.thinking.append"
     ]
    },
    {
     "name": "event_id",
     "type": "string or null",
     "required": false,
     "description": "Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id."
    }
   ]
  },
  "example": {
   "type": "session.thinking.append",
   "event_id": "evt_thinking_001",
   "delegation_id": "del_abc123",
   "content": "Checking availability for two guests at 7 PM."
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.thinking.append",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.thinking.append",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.thinking.append",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.thinking.append",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "client→server",
  "event": "session.commentary.append",
  "description": "Provide context the Live model can communicate to the user, optionally for an existing client delegation.",
  "schema": {
   "schema_name": "LiveCommentaryAppendParam",
   "fields": [
    {
     "name": "content",
     "type": "string",
     "required": true,
     "description": "Speakable context for the Live model, limited to 500 tokens. Use this for a result the model should communicate; use session.thinking.append for silent context."
    },
    {
     "name": "delegation_id",
     "type": "string or null",
     "required": true,
     "description": "Required, nullable. Set null for general session context, or use the ID from session.delegation.created for an existing client delegation. Non-null IDs are not accepted with Responses delegation."
    },
    {
     "name": "type",
     "type": "\"session.commentary.append\"",
     "required": true,
     "description": "The Live client event type. Always `session.commentary.append`.",
     "enum": [
      "session.commentary.append"
     ]
    },
    {
     "name": "event_id",
     "type": "string or null",
     "required": false,
     "description": "Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id."
    }
   ]
  },
  "example": {
   "type": "session.commentary.append",
   "event_id": "evt_commentary_001",
   "delegation_id": "del_abc123",
   "content": "There is an outdoor table for two at 7 PM. Ask whether to reserve it."
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.commentary.append",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.commentary.append",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.commentary.append",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.commentary.append",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "client→server",
  "event": "response.item.create",
  "description": "Add an input item to the Live session’s Responses backend. Requires Responses delegation; use `response.create` to request a response.",
  "schema": {
   "schema_name": "LiveResponseItemCreateParam",
   "fields": [
    {
     "name": "item",
     "type": "EasyInputMessage or object { content, role, status, type }  or ResponseOutputMessage or 30 more",
     "required": true,
     "description": "An input item to append to the Responses backend conversation, such as a user message or a function tool result.",
     "variants": [
      {
       "variant": "EasyInputMessage object { content, role, phase, type }",
       "description": "A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.",
       "fields": [
        {
         "name": "content",
         "type": "string or ResponseInputMessageContentList",
         "required": true,
         "description": "Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.",
         "variants": [
          {
           "variant": "ResponseInputMessageContentList = array of ResponseInputContent",
           "description": "A list of one or many input items to the model, containing different content types.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "role",
         "type": "\"user\" or \"assistant\" or \"system\" or \"developer\"",
         "required": true,
         "description": "The role of the message input. One of `user`, `assistant`, `system`, or `developer`.",
         "enum": [
          "user",
          "assistant",
          "system",
          "developer"
         ]
        },
        {
         "name": "phase",
         "type": "\"commentary\" or \"final_answer\" or null",
         "required": false,
         "description": "Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.",
         "enum": [
          "commentary",
          "final_answer"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": false,
         "description": "The type of the message input. Always `message`.",
         "enum": [
          "message"
         ]
        }
       ]
      },
      {
       "variant": "Message object { content, role, status, type }",
       "description": "A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role.",
       "fields": [
        {
         "name": "content",
         "type": "ResponseInputMessageContentList",
         "required": true,
         "description": "A list of one or many input items to the model, containing different content types."
        },
        {
         "name": "role",
         "type": "\"user\" or \"system\" or \"developer\"",
         "required": true,
         "description": "The role of the message input. One of `user`, `system`, or `developer`.",
         "enum": [
          "user",
          "system",
          "developer"
         ]
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"incomplete\"",
         "required": false,
         "description": "The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.",
         "enum": [
          "in_progress",
          "completed",
          "incomplete"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": false,
         "description": "The type of the message input. Always set to `message`.",
         "enum": [
          "message"
         ]
        }
       ]
      },
      {
       "variant": "ResponseOutputMessage object { id, content, role, 3 more }",
       "description": "An output message from the model.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the output message."
        },
        {
         "name": "content",
         "type": "array of ResponseOutputText or ResponseOutputRefusal",
         "required": true,
         "description": "The content of the output message.",
         "variants": [
          {
           "variant": "ResponseOutputText object { annotations, logprobs, text, type }",
           "description": "A text output from the model.",
           "fields": "…"
          },
          {
           "variant": "ResponseOutputRefusal object { refusal, type }",
           "description": "A refusal from the model.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "role",
         "type": "\"assistant\"",
         "required": true,
         "description": "The role of the output message. Always `assistant`.",
         "enum": [
          "assistant"
         ]
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"incomplete\"",
         "required": true,
         "description": "The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.",
         "enum": [
          "in_progress",
          "completed",
          "incomplete"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the output message. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "phase",
         "type": "\"commentary\" or \"final_answer\" or null",
         "required": false,
         "description": "Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.",
         "enum": [
          "commentary",
          "final_answer"
         ]
        }
       ]
      },
      {
       "variant": "FileSearchCall object { id, queries, status, 2 more }",
       "description": "The results of a file search tool call. See the [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the file search tool call."
        },
        {
         "name": "queries",
         "type": "array of string",
         "required": true,
         "description": "The queries used to search for files."
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"searching\" or \"completed\" or 2 more",
         "required": true,
         "description": "The status of the file search tool call. One of `in_progress`, `searching`, `incomplete` or `failed`,",
         "enum": [
          "in_progress",
          "searching",
          "completed",
          "incomplete",
          "failed"
         ]
        },
        {
         "name": "type",
         "type": "\"file_search_call\"",
         "required": true,
         "description": "The type of the file search tool call. Always `file_search_call`.",
         "enum": [
          "file_search_call"
         ]
        },
        {
         "name": "results",
         "type": "array of object { attributes, file_id, filename, 2 more }  or null",
         "required": false,
         "description": "The results of the file search tool call.",
         "fields": "… 5 nested fields (see source)"
        }
       ]
      },
      {
       "variant": "ComputerCall object { id, call_id, pending_safety_checks, 4 more }",
       "description": "A tool call to a computer use tool. See the [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the computer call."
        },
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "An identifier used when responding to the tool call with output."
        },
        {
         "name": "pending_safety_checks",
         "type": "array of object { id, code, message }",
         "required": true,
         "description": "The pending safety checks for the computer call.",
         "fields": "… 3 nested fields (see source)"
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"incomplete\"",
         "required": true,
         "description": "The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.",
         "enum": [
          "in_progress",
          "completed",
          "incomplete"
         ]
        },
        {
         "name": "type",
         "type": "\"computer_call\"",
         "required": true,
         "description": "The type of the computer call. Always `computer_call`.",
         "enum": [
          "computer_call"
         ]
        },
        {
         "name": "action",
         "type": "ComputerAction",
         "required": false,
         "description": "A click action.",
         "variants": [
          {
           "variant": "Click object { button, type, x, 2 more }",
           "description": "A click action.",
           "fields": "…"
          },
          {
           "variant": "DoubleClick object { keys, type, x, y }",
           "description": "A double click action.",
           "fields": "…"
          },
          {
           "variant": "Drag object { path, type, keys }",
           "description": "A drag action.",
           "fields": "…"
          },
          {
           "variant": "Keypress object { keys, type }",
           "description": "A collection of keypresses the model would like to perform.",
           "fields": "…"
          },
          {
           "variant": "Move object { type, x, y, keys }",
           "description": "A mouse move action.",
           "fields": "…"
          },
          {
           "variant": "Screenshot object { type }",
           "description": "A screenshot action.",
           "fields": "…"
          },
          {
           "variant": "Scroll object { scroll_x, scroll_y, type, 3 more }",
           "description": "A scroll action.",
           "fields": "…"
          },
          {
           "variant": "Type object { text, type }",
           "description": "An action to type in text.",
           "fields": "…"
          },
          {
           "variant": "Wait object { type }",
           "description": "A wait action.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "actions",
         "type": "ComputerActionList",
         "required": false,
         "description": "Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields."
        }
       ]
      },
      {
       "variant": "ComputerCallOutput object { call_id, output, type, 3 more }",
       "description": "The output of a computer tool call.",
       "fields": [
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The ID of the computer tool call that produced the output."
        },
        {
         "name": "output",
         "type": "ResponseComputerToolCallOutputScreenshot",
         "required": true,
         "description": "A computer screenshot image used with the computer use tool.",
         "fields": "… 3 nested fields (see source)"
        },
        {
         "name": "type",
         "type": "\"computer_call_output\"",
         "required": true,
         "description": "The type of the computer tool call output. Always `computer_call_output`.",
         "enum": [
          "computer_call_output"
         ]
        },
        {
         "name": "id",
         "type": "string or null",
         "required": false,
         "description": "The ID of the computer tool call output."
        },
        {
         "name": "acknowledged_safety_checks",
         "type": "array of object { id, code, message }  or null",
         "required": false,
         "description": "The safety checks reported by the API that have been acknowledged by the developer.",
         "fields": "… 3 nested fields (see source)"
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"incomplete\" or null",
         "required": false,
         "description": "The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.",
         "enum": [
          "in_progress",
          "completed",
          "incomplete"
         ]
        }
       ]
      },
      {
       "variant": "WebSearchCall object { id, action, status, type }",
       "description": "The results of a web search tool call. See the [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the web search tool call."
        },
        {
         "name": "action",
         "type": "object { type, queries, query, sources }  or object { type, url }  or object { pattern, type, url }",
         "required": true,
         "description": "An object describing the specific action taken in this web search call. Includes details on how the model used the web (search, open_page, find_in_page).",
         "variants": [
          {
           "variant": "Search object { type, queries, query, sources }",
           "description": "Action type \"search\" - Performs a web search query.",
           "fields": "…"
          },
          {
           "variant": "OpenPage object { type, url }",
           "description": "Action type \"open_page\" - Opens a specific URL from search results.",
           "fields": "…"
          },
          {
           "variant": "FindInPage object { pattern, type, url }",
           "description": "Action type \"find_in_page\": Searches for a pattern within a loaded page.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"searching\" or \"completed\" or 2 more",
         "required": true,
         "description": "The status of the web search tool call.",
         "enum": [
          "in_progress",
          "searching",
          "completed",
          "failed",
          "incomplete"
         ]
        },
        {
         "name": "type",
         "type": "\"web_search_call\"",
         "required": true,
         "description": "The type of the web search tool call. Always `web_search_call`.",
         "enum": [
          "web_search_call"
         ]
        }
       ]
      },
      {
       "variant": "FunctionCall object { arguments, call_id, name, 6 more }",
       "description": "A tool call to run a function. See the [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information.",
       "fields": [
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of the arguments to pass to the function."
        },
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the function tool call generated by the model."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the function to run."
        },
        {
         "name": "type",
         "type": "\"function_call\"",
         "required": true,
         "description": "The type of the function tool call. Always `function_call`.",
         "enum": [
          "function_call"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the function tool call."
        },
        {
         "name": "async",
         "type": "boolean",
         "required": false,
         "description": "Whether the function tool call runs asynchronously."
        },
        {
         "name": "caller",
         "type": "object { type }  or object { caller_id, type }  or null",
         "required": false,
         "description": "The execution context that produced this tool call.",
         "variants": [
          {
           "variant": "Direct object { type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "Program object { caller_id, type }",
           "description": "",
           "fields": "…"
          }
         ]
        },
        {
         "name": "namespace",
         "type": "string",
         "required": false,
         "description": "The namespace of the function to run."
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"incomplete\"",
         "required": false,
         "description": "The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.",
         "enum": [
          "in_progress",
          "completed",
          "incomplete"
         ]
        }
       ]
      },
      {
       "variant": "FunctionCallOutput object { output, type, id, 5 more }",
       "description": "The output of a function tool call.",
       "fields": [
        {
         "name": "output",
         "type": "string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent",
         "required": true,
         "description": "Text, image, or file output of the function tool call.",
         "variants": [
          {
           "variant": "array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent",
           "description": "An array of content outputs (text, image, file) for the function tool call.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "type",
         "type": "\"function_call_output\"",
         "required": true,
         "description": "The type of the function tool call output. Always `function_call_output`.",
         "enum": [
          "function_call_output"
         ]
        },
        {
         "name": "id",
         "type": "string or null",
         "required": false,
         "description": "The unique ID of the function tool call output. Populated when this item is returned via API."
        },
        {
         "name": "call_id",
         "type": "string or null",
         "required": false,
         "description": "The unique ID of the function tool call generated by the model."
        },
        {
         "name": "caller",
         "type": "object { type }  or object { caller_id, type }  or null",
         "required": false,
         "description": "The execution context that produced this tool call.",
         "variants": [
          {
           "variant": "Direct object { type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "Program object { caller_id, type }",
           "description": "",
           "fields": "…"
          }
         ]
        },
        {
         "name": "name",
         "type": "string or null",
         "required": false,
         "description": "The name of the tool that produced the output."
        },
        {
         "name": "namespace",
         "type": "string or null",
         "required": false,
         "description": "The namespace of the tool that produced the output."
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"incomplete\" or null",
         "required": false,
         "description": "The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.",
         "enum": [
          "in_progress",
          "completed",
          "incomplete"
         ]
        }
       ]
      },
      {
       "variant": "ToolSearchCall object { arguments, type, id, 3 more }",
       "description": "",
       "fields": [
        {
         "name": "arguments",
         "type": "unknown",
         "required": true,
         "description": "The arguments supplied to the tool search call."
        },
        {
         "name": "type",
         "type": "\"tool_search_call\"",
         "required": true,
         "description": "The item type. Always `tool_search_call`.",
         "enum": [
          "tool_search_call"
         ]
        },
        {
         "name": "id",
         "type": "string or null",
         "required": false,
         "description": "The unique ID of this tool search call."
        },
        {
         "name": "call_id",
         "type": "string or null",
         "required": false,
         "description": "The unique ID of the tool search call generated by the model."
        },
        {
         "name": "execution",
         "type": "\"server\" or \"client\"",
         "required": false,
         "description": "Whether tool search was executed by the server or by the client.",
         "enum": [
          "server",
          "client"
         ]
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"incomplete\" or null",
         "required": false,
         "description": "The status of the tool search call.",
         "enum": [
          "in_progress",
          "completed",
          "incomplete"
         ]
        }
       ]
      },
      {
       "variant": "ToolSearchOutput object { tools, type, id, 3 more }",
       "description": "",
       "fields": [
        {
         "name": "tools",
         "type": "array of object { name, parameters, strict, 6 more }  or object { type, vector_store_ids, filters, 2 more }  or object { type }  or 13 more",
         "required": true,
         "description": "The loaded tool definitions returned by the tool search output.",
         "variants": [
          {
           "variant": "Function object { name, parameters, strict, 6 more }",
           "description": "Defines a function in your own code the model can choose to call. Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling).",
           "fields": "…"
          },
          {
           "variant": "FileSearch object { type, vector_store_ids, filters, 2 more }",
           "description": "A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search).",
           "fields": "…"
          },
          {
           "variant": "Computer object { type }",
           "description": "A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use).",
           "fields": "…"
          },
          {
           "variant": "ComputerUsePreview object { display_height, display_width, environment, type }",
           "description": "A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use).",
           "fields": "…"
          },
          {
           "variant": "WebSearch object { type, external_web_access, filters, 2 more }",
           "description": "Search the Internet for sources related to the prompt. Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).",
           "fields": "…"
          },
          {
           "variant": "Mcp object { server_label, type, allowed_callers, 9 more }",
           "description": "Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).",
           "fields": "…"
          },
          {
           "variant": "CodeInterpreter object { container, type, allowed_callers }",
           "description": "A tool that runs Python code to help generate a response to a prompt.",
           "fields": "…"
          },
          {
           "variant": "ProgrammaticToolCalling object { type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "ImageGeneration object { type, action, background, 9 more }",
           "description": "A tool that generates images using the GPT image models.",
           "fields": "…"
          },
          {
           "variant": "LocalShell object { type }",
           "description": "A tool that allows the model to execute shell commands in a local environment.",
           "fields": "…"
          },
          {
           "variant": "Shell object { type, allowed_callers, environment }",
           "description": "A tool that allows the model to execute shell commands.",
           "fields": "…"
          },
          {
           "variant": "Custom object { name, type, allowed_callers, 4 more }",
           "description": "A custom tool that processes input using a specified format. Learn more about   [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools)",
           "fields": "…"
          },
          {
           "variant": "Namespace object { description, name, tools, type }",
           "description": "Groups function/custom tools under a shared namespace.",
           "fields": "…"
          },
          {
           "variant": "ToolSearch object { type, description, execution, parameters }",
           "description": "Hosted or BYOT tool search configuration for deferred tools.",
           "fields": "…"
          },
          {
           "variant": "WebSearchPreview object { type, search_content_types, search_context_size, user_location }",
           "description": "This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).",
           "fields": "…"
          },
          {
           "variant": "ApplyPatch object { type, allowed_callers }",
           "description": "Allows the assistant to create, delete, or update files using unified diffs.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "type",
         "type": "\"tool_search_output\"",
         "required": true,
         "description": "The item type. Always `tool_search_output`.",
         "enum": [
          "tool_search_output"
         ]
        },
        {
         "name": "id",
         "type": "string or null",
         "required": false,
         "description": "The unique ID of this tool search output."
        },
        {
         "name": "call_id",
         "type": "string or null",
         "required": false,
         "description": "The unique ID of the tool search call generated by the model."
        },
        {
         "name": "execution",
         "type": "\"server\" or \"client\"",
         "required": false,
         "description": "Whether tool search was executed by the server or by the client.",
         "enum": [
          "server",
          "client"
         ]
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"incomplete\" or null",
         "required": false,
         "description": "The status of the tool search output.",
         "enum": [
          "in_progress",
          "completed",
          "incomplete"
         ]
        }
       ]
      },
      {
       "variant": "AdditionalTools object { role, tools, type, id }",
       "description": "",
       "fields": [
        {
         "name": "role",
         "type": "\"developer\"",
         "required": true,
         "description": "The role that provided the additional tools. Only `developer` is supported.",
         "enum": [
          "developer"
         ]
        },
        {
         "name": "tools",
         "type": "array of object { name, parameters, strict, 6 more }  or object { type, vector_store_ids, filters, 2 more }  or object { type }  or 13 more",
         "required": true,
         "description": "A list of additional tools made available at this item.",
         "variants": [
          {
           "variant": "Function object { name, parameters, strict, 6 more }",
           "description": "Defines a function in your own code the model can choose to call. Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling).",
           "fields": "…"
          },
          {
           "variant": "FileSearch object { type, vector_store_ids, filters, 2 more }",
           "description": "A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search).",
           "fields": "…"
          },
          {
           "variant": "Computer object { type }",
           "description": "A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use).",
           "fields": "…"
          },
          {
           "variant": "ComputerUsePreview object { display_height, display_width, environment, type }",
           "description": "A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use).",
           "fields": "…"
          },
          {
           "variant": "WebSearch object { type, external_web_access, filters, 2 more }",
           "description": "Search the Internet for sources related to the prompt. Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).",
           "fields": "…"
          },
          {
           "variant": "Mcp object { server_label, type, allowed_callers, 9 more }",
           "description": "Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).",
           "fields": "…"
          },
          {
           "variant": "CodeInterpreter object { container, type, allowed_callers }",
           "description": "A tool that runs Python code to help generate a response to a prompt.",
           "fields": "…"
          },
          {
           "variant": "ProgrammaticToolCalling object { type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "ImageGeneration object { type, action, background, 9 more }",
           "description": "A tool that generates images using the GPT image models.",
           "fields": "…"
          },
          {
           "variant": "LocalShell object { type }",
           "description": "A tool that allows the model to execute shell commands in a local environment.",
           "fields": "…"
          },
          {
           "variant": "Shell object { type, allowed_callers, environment }",
           "description": "A tool that allows the model to execute shell commands.",
           "fields": "…"
          },
          {
           "variant": "Custom object { name, type, allowed_callers, 4 more }",
           "description": "A custom tool that processes input using a specified format. Learn more about   [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools)",
           "fields": "…"
          },
          {
           "variant": "Namespace object { description, name, tools, type }",
           "description": "Groups function/custom tools under a shared namespace.",
           "fields": "…"
          },
          {
           "variant": "ToolSearch object { type, description, execution, parameters }",
           "description": "Hosted or BYOT tool search configuration for deferred tools.",
           "fields": "…"
          },
          {
           "variant": "WebSearchPreview object { type, search_content_types, search_context_size, user_location }",
           "description": "This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).",
           "fields": "…"
          },
          {
           "variant": "ApplyPatch object { type, allowed_callers }",
           "description": "Allows the assistant to create, delete, or update files using unified diffs.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "type",
         "type": "\"additional_tools\"",
         "required": true,
         "description": "The item type. Always `additional_tools`.",
         "enum": [
          "additional_tools"
         ]
        },
        {
         "name": "id",
         "type": "string or null",
         "required": false,
         "description": "The unique ID of this additional tools item."
        }
       ]
      },
      {
       "variant": "ConfigurationUpdate object { type, id, reasoning }",
       "description": "An update to the conversation's response configuration. The configuration remains in effect for subsequent responses until it is replaced by another configuration update.",
       "fields": [
        {
         "name": "type",
         "type": "\"configuration_update\"",
         "required": true,
         "description": "The item type. Always `configuration_update`.",
         "enum": [
          "configuration_update"
         ]
        },
        {
         "name": "id",
         "type": "string or null",
         "required": false,
         "description": "The unique ID of the configuration update item."
        },
        {
         "name": "reasoning",
         "type": "object { effort }",
         "required": false,
         "description": "Updates to reasoning configuration. Only effort is supported.",
         "fields": "… 1 nested fields (see source)"
        }
       ]
      },
      {
       "variant": "Reasoning object { id, summary, type, 3 more }",
       "description": "A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your `input` to the Responses API for subsequent turns of a conversation if you are manually [managing context](https://developers.openai.com/api/docs/guides/conversation-state).",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique identifier of the reasoning content."
        },
        {
         "name": "summary",
         "type": "array of SummaryTextContent",
         "required": true,
         "description": "Reasoning summary content.",
         "fields": "… 2 nested fields (see source)"
        },
        {
         "name": "type",
         "type": "\"reasoning\"",
         "required": true,
         "description": "The type of the object. Always `reasoning`.",
         "enum": [
          "reasoning"
         ]
        },
        {
         "name": "content",
         "type": "array of object { text, type }",
         "required": false,
         "description": "Reasoning text content.",
         "fields": "… 2 nested fields (see source)"
        },
        {
         "name": "encrypted_content",
         "type": "string or null",
         "required": false,
         "description": "The encrypted content of the reasoning item. This is populated by default for reasoning items returned by `POST /v1/responses` and WebSocket `response.create` requests. When streaming, use the completed reasoning item and its `encrypted_content` from the `response.output_item.done` event in subsequent requests. The `encrypted_content` in `response.output_item.added` may be incomplete. This is especially important when `store` is `false` or when using Zero Data Retention."
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"incomplete\"",
         "required": false,
         "description": "The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.",
         "enum": [
          "in_progress",
          "completed",
          "incomplete"
         ]
        }
       ]
      },
      {
       "variant": "Compaction object { encrypted_content, type, id }",
       "description": "A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact).",
       "fields": [
        {
         "name": "encrypted_content",
         "type": "string",
         "required": true,
         "description": "The encrypted content of the compaction summary."
        },
        {
         "name": "type",
         "type": "\"compaction\"",
         "required": true,
         "description": "The type of the item. Always `compaction`.",
         "enum": [
          "compaction"
         ]
        },
        {
         "name": "id",
         "type": "string or null",
         "required": false,
         "description": "The ID of the compaction item."
        }
       ]
      },
      {
       "variant": "ImageGenerationCall object { id, result, status, 7 more }",
       "description": "An image generation request made by the model.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the image generation call."
        },
        {
         "name": "result",
         "type": "string or null",
         "required": true,
         "description": "The generated image encoded in base64."
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"generating\" or \"failed\"",
         "required": true,
         "description": "The status of the image generation call.",
         "enum": [
          "in_progress",
          "completed",
          "generating",
          "failed"
         ]
        },
        {
         "name": "type",
         "type": "\"image_generation_call\"",
         "required": true,
         "description": "The type of the image generation call. Always `image_generation_call`.",
         "enum": [
          "image_generation_call"
         ]
        },
        {
         "name": "action",
         "type": "\"generate\" or \"edit\" or \"auto\" or null",
         "required": false,
         "description": "The action used for image generation.",
         "enum": [
          "generate",
          "edit",
          "auto"
         ]
        },
        {
         "name": "background",
         "type": "\"transparent\" or \"opaque\" or \"auto\" or null",
         "required": false,
         "description": "The background setting used for generation.",
         "enum": [
          "transparent",
          "opaque",
          "auto"
         ]
        },
        {
         "name": "output_format",
         "type": "\"png\" or \"webp\" or \"jpeg\" or null",
         "required": false,
         "description": "The output format used for generation.",
         "enum": [
          "png",
          "webp",
          "jpeg"
         ]
        },
        {
         "name": "quality",
         "type": "\"low\" or \"medium\" or \"high\" or 3 more or null",
         "required": false,
         "description": "The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.",
         "enum": [
          "low",
          "medium",
          "high",
          "xhigh",
          "max",
          "auto"
         ]
        },
        {
         "name": "revised_prompt",
         "type": "string or null",
         "required": false,
         "description": "The prompt that was used after any model prompt rewriting."
        },
        {
         "name": "size",
         "type": "string or \"1024x1024\" or \"1024x1536\" or \"1536x1024\" or null",
         "required": false,
         "description": "The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.",
         "variants": [
          {
           "variant": "\"1024x1024\" or \"1024x1536\" or \"1536x1024\"",
           "description": "The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.",
           "fields": "…"
          }
         ]
        }
       ]
      },
      {
       "variant": "CodeInterpreterCall object { id, code, container_id, 3 more }",
       "description": "A tool call to run code.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the code interpreter tool call."
        },
        {
         "name": "code",
         "type": "string or null",
         "required": true,
         "description": "The code to run, or null if not available."
        },
        {
         "name": "container_id",
         "type": "string",
         "required": true,
         "description": "The ID of the container used to run the code."
        },
        {
         "name": "outputs",
         "type": "array of object { logs, type }  or object { type, url }  or null",
         "required": true,
         "description": "The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.",
         "variants": [
          {
           "variant": "Logs object { logs, type }",
           "description": "The logs output from the code interpreter.",
           "fields": "…"
          },
          {
           "variant": "Image object { type, url }",
           "description": "The image output from the code interpreter.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"incomplete\" or 2 more",
         "required": true,
         "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.",
         "enum": [
          "in_progress",
          "completed",
          "incomplete",
          "interpreting",
          "failed"
         ]
        },
        {
         "name": "type",
         "type": "\"code_interpreter_call\"",
         "required": true,
         "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.",
         "enum": [
          "code_interpreter_call"
         ]
        }
       ]
      },
      {
       "variant": "LocalShellCall object { id, action, call_id, 2 more }",
       "description": "A tool call to run a command on the local shell.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the local shell call."
        },
        {
         "name": "action",
         "type": "object { command, env, type, 3 more }",
         "required": true,
         "description": "Execute a shell command on the server.",
         "fields": "… 6 nested fields (see source)"
        },
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the local shell tool call generated by the model."
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"incomplete\"",
         "required": true,
         "description": "The status of the local shell call.",
         "enum": [
          "in_progress",
          "completed",
          "incomplete"
         ]
        },
        {
         "name": "type",
         "type": "\"local_shell_call\"",
         "required": true,
         "description": "The type of the local shell call. Always `local_shell_call`.",
         "enum": [
          "local_shell_call"
         ]
        }
       ]
      },
      {
       "variant": "LocalShellCallOutput object { id, output, type, status }",
       "description": "The output of a local shell tool call.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the local shell tool call generated by the model."
        },
        {
         "name": "output",
         "type": "string",
         "required": true,
         "description": "A JSON string of the output of the local shell tool call."
        },
        {
         "name": "type",
         "type": "\"local_shell_call_output\"",
         "required": true,
         "description": "The type of the local shell tool call output. Always `local_shell_call_output`.",
         "enum": [
          "local_shell_call_output"
         ]
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"incomplete\" or null",
         "required": false,
         "description": "The status of the item. One of `in_progress`, `completed`, or `incomplete`.",
         "enum": [
          "in_progress",
          "completed",
          "incomplete"
         ]
        }
       ]
      },
      {
       "variant": "ShellCall object { action, call_id, type, 4 more }",
       "description": "A tool representing a request to execute one or more shell commands.",
       "fields": [
        {
         "name": "action",
         "type": "object { commands, max_output_length, timeout_ms }",
         "required": true,
         "description": "The shell commands and limits that describe how to run the tool call.",
         "fields": "… 3 nested fields (see source)"
        },
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the shell tool call generated by the model."
        },
        {
         "name": "type",
         "type": "\"shell_call\"",
         "required": true,
         "description": "The type of the item. Always `shell_call`.",
         "enum": [
          "shell_call"
         ]
        },
        {
         "name": "id",
         "type": "string or null",
         "required": false,
         "description": "The unique ID of the shell tool call. Populated when this item is returned via API."
        },
        {
         "name": "caller",
         "type": "object { type }  or object { caller_id, type }  or null",
         "required": false,
         "description": "The execution context that produced this tool call.",
         "variants": [
          {
           "variant": "Direct object { type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "Program object { caller_id, type }",
           "description": "",
           "fields": "…"
          }
         ]
        },
        {
         "name": "environment",
         "type": "LocalEnvironment or ContainerReference or null",
         "required": false,
         "description": "The environment to execute the shell commands in."
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"incomplete\" or null",
         "required": false,
         "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.",
         "enum": [
          "in_progress",
          "completed",
          "incomplete"
         ]
        }
       ]
      },
      {
       "variant": "ShellCallOutput object { call_id, output, type, 4 more }",
       "description": "The streamed output items emitted by a shell tool call.",
       "fields": [
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the shell tool call generated by the model."
        },
        {
         "name": "output",
         "type": "array of ResponseFunctionShellCallOutputContent",
         "required": true,
         "description": "Captured chunks of stdout and stderr output, along with their associated outcomes.",
         "fields": "… 3 nested fields (see source)"
        },
        {
         "name": "type",
         "type": "\"shell_call_output\"",
         "required": true,
         "description": "The type of the item. Always `shell_call_output`.",
         "enum": [
          "shell_call_output"
         ]
        },
        {
         "name": "id",
         "type": "string or null",
         "required": false,
         "description": "The unique ID of the shell tool call output. Populated when this item is returned via API."
        },
        {
         "name": "caller",
         "type": "object { type }  or object { caller_id, type }  or null",
         "required": false,
         "description": "The execution context that produced this tool call.",
         "variants": [
          {
           "variant": "Direct object { type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "Program object { caller_id, type }",
           "description": "",
           "fields": "…"
          }
         ]
        },
        {
         "name": "max_output_length",
         "type": "number or null",
         "required": false,
         "description": "The maximum number of UTF-8 characters captured for this shell call's combined output."
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"incomplete\" or null",
         "required": false,
         "description": "The status of the shell call output.",
         "enum": [
          "in_progress",
          "completed",
          "incomplete"
         ]
        }
       ]
      },
      {
       "variant": "ApplyPatchCall object { call_id, operation, status, 3 more }",
       "description": "A tool call representing a request to create, delete, or update files using diff patches.",
       "fields": [
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the apply patch tool call generated by the model."
        },
        {
         "name": "operation",
         "type": "object { diff, path, type }  or object { path, type }  or object { diff, path, type }",
         "required": true,
         "description": "The specific create, delete, or update instruction for the apply_patch tool call.",
         "variants": [
          {
           "variant": "CreateFile object { diff, path, type }",
           "description": "Instruction for creating a new file via the apply_patch tool.",
           "fields": "…"
          },
          {
           "variant": "DeleteFile object { path, type }",
           "description": "Instruction for deleting an existing file via the apply_patch tool.",
           "fields": "…"
          },
          {
           "variant": "UpdateFile object { diff, path, type }",
           "description": "Instruction for updating an existing file via the apply_patch tool.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\"",
         "required": true,
         "description": "The status of the apply patch tool call. One of `in_progress` or `completed`.",
         "enum": [
          "in_progress",
          "completed"
         ]
        },
        {
         "name": "type",
         "type": "\"apply_patch_call\"",
         "required": true,
         "description": "The type of the item. Always `apply_patch_call`.",
         "enum": [
          "apply_patch_call"
         ]
        },
        {
         "name": "id",
         "type": "string or null",
         "required": false,
         "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API."
        },
        {
         "name": "caller",
         "type": "object { type }  or object { caller_id, type }  or null",
         "required": false,
         "description": "The execution context that produced this tool call.",
         "variants": [
          {
           "variant": "Direct object { type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "Program object { caller_id, type }",
           "description": "",
           "fields": "…"
          }
         ]
        }
       ]
      },
      {
       "variant": "ApplyPatchCallOutput object { call_id, status, type, 3 more }",
       "description": "The streamed output emitted by an apply patch tool call.",
       "fields": [
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the apply patch tool call generated by the model."
        },
        {
         "name": "status",
         "type": "\"completed\" or \"failed\"",
         "required": true,
         "description": "The status of the apply patch tool call output. One of `completed` or `failed`.",
         "enum": [
          "completed",
          "failed"
         ]
        },
        {
         "name": "type",
         "type": "\"apply_patch_call_output\"",
         "required": true,
         "description": "The type of the item. Always `apply_patch_call_output`.",
         "enum": [
          "apply_patch_call_output"
         ]
        },
        {
         "name": "id",
         "type": "string or null",
         "required": false,
         "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API."
        },
        {
         "name": "caller",
         "type": "object { type }  or object { caller_id, type }  or null",
         "required": false,
         "description": "The execution context that produced this tool call.",
         "variants": [
          {
           "variant": "Direct object { type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "Program object { caller_id, type }",
           "description": "",
           "fields": "…"
          }
         ]
        },
        {
         "name": "output",
         "type": "string or null",
         "required": false,
         "description": "Optional human-readable log text from the apply patch tool (e.g., patch results or errors)."
        }
       ]
      },
      {
       "variant": "McpListTools object { id, server_label, tools, 2 more }",
       "description": "A list of tools available on an MCP server.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the list."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server."
        },
        {
         "name": "tools",
         "type": "array of object { input_schema, name, annotations, description }",
         "required": true,
         "description": "The tools available on the server.",
         "fields": "… 4 nested fields (see source)"
        },
        {
         "name": "type",
         "type": "\"mcp_list_tools\"",
         "required": true,
         "description": "The type of the item. Always `mcp_list_tools`.",
         "enum": [
          "mcp_list_tools"
         ]
        },
        {
         "name": "error",
         "type": "string or null",
         "required": false,
         "description": "Error message if the server could not list tools."
        }
       ]
      },
      {
       "variant": "McpApprovalRequest object { id, arguments, name, 2 more }",
       "description": "A request for human approval of a tool invocation.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the approval request."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of arguments for the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool to run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server making the request."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_request\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_request`.",
         "enum": [
          "mcp_approval_request"
         ]
        }
       ]
      },
      {
       "variant": "McpApprovalResponse object { approval_request_id, approve, type, 2 more }",
       "description": "A response to an MCP approval request.",
       "fields": [
        {
         "name": "approval_request_id",
         "type": "string",
         "required": true,
         "description": "The ID of the approval request being answered."
        },
        {
         "name": "approve",
         "type": "boolean",
         "required": true,
         "description": "Whether the request was approved."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_response\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_response`.",
         "enum": [
          "mcp_approval_response"
         ]
        },
        {
         "name": "id",
         "type": "string or null",
         "required": false,
         "description": "The unique ID of the approval response"
        },
        {
         "name": "reason",
         "type": "string or null",
         "required": false,
         "description": "Optional reason for the decision."
        }
       ]
      },
      {
       "variant": "McpCall object { id, arguments, name, 6 more }",
       "description": "An invocation of a tool on an MCP server.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the tool call."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of the arguments passed to the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool that was run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server running the tool."
        },
        {
         "name": "type",
         "type": "\"mcp_call\"",
         "required": true,
         "description": "The type of the item. Always `mcp_call`.",
         "enum": [
          "mcp_call"
         ]
        },
        {
         "name": "approval_request_id",
         "type": "string or null",
         "required": false,
         "description": "Unique identifier for the MCP tool call approval request. Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call."
        },
        {
         "name": "error",
         "type": "McpToolCallError or null",
         "required": false,
         "description": "The error from the tool call, if any.",
         "variants": [
          {
           "variant": "McpProtocolError object { code, message, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "McpToolExecutionError object { content, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "HTTPError object { code, message, type }",
           "description": "",
           "fields": "…"
          }
         ]
        },
        {
         "name": "output",
         "type": "string or null",
         "required": false,
         "description": "The output from the tool call."
        },
        {
         "name": "status",
         "type": "\"in_progress\" or \"completed\" or \"incomplete\" or 2 more",
         "required": false,
         "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.",
         "enum": [
          "in_progress",
          "completed",
          "incomplete",
          "calling",
          "failed"
         ]
        }
       ]
      },
      {
       "variant": "CustomToolCallOutput object { call_id, output, type, 2 more }",
       "description": "The output of a custom tool call from your code, being sent back to the model.",
       "fields": [
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The call ID, used to map this custom tool call output to a custom tool call."
        },
        {
         "name": "output",
         "type": "string or array of ResponseInputText or ResponseInputImage or ResponseInputFile",
         "required": true,
         "description": "The output from the custom tool call generated by your code. Can be a string or an list of output content.",
         "variants": [
          {
           "variant": "OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile",
           "description": "Text, image, or file output of the custom tool call.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "type",
         "type": "\"custom_tool_call_output\"",
         "required": true,
         "description": "The type of the custom tool call output. Always `custom_tool_call_output`.",
         "enum": [
          "custom_tool_call_output"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the custom tool call output in the OpenAI platform."
        },
        {
         "name": "caller",
         "type": "object { type }  or object { caller_id, type }  or null",
         "required": false,
         "description": "The execution context that produced this tool call.",
         "variants": [
          {
           "variant": "Direct object { type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "Program object { caller_id, type }",
           "description": "",
           "fields": "…"
          }
         ]
        }
       ]
      },
      {
       "variant": "CustomToolCall object { call_id, input, name, 5 more }",
       "description": "A call to a custom tool created by the model.",
       "fields": [
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "An identifier used to map this custom tool call to a tool call output."
        },
        {
         "name": "input",
         "type": "string",
         "required": true,
         "description": "The input for the custom tool call generated by the model."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the custom tool being called."
        },
        {
         "name": "type",
         "type": "\"custom_tool_call\"",
         "required": true,
         "description": "The type of the custom tool call. Always `custom_tool_call`.",
         "enum": [
          "custom_tool_call"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the custom tool call in the OpenAI platform."
        },
        {
         "name": "async",
         "type": "boolean",
         "required": false,
         "description": "Whether the custom tool call runs asynchronously."
        },
        {
         "name": "caller",
         "type": "object { type }  or object { caller_id, type }  or null",
         "required": false,
         "description": "The execution context that produced this tool call.",
         "variants": [
          {
           "variant": "Direct object { type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "Program object { caller_id, type }",
           "description": "",
           "fields": "…"
          }
         ]
        },
        {
         "name": "namespace",
         "type": "string",
         "required": false,
         "description": "The namespace of the custom tool being called."
        }
       ]
      },
      {
       "variant": "CompactionTrigger object { type, id }",
       "description": "Compacts the current context. Must be the final input item.",
       "fields": [
        {
         "name": "type",
         "type": "\"compaction_trigger\"",
         "required": true,
         "description": "The type of the item. Always `compaction_trigger`.",
         "enum": [
          "compaction_trigger"
         ]
        },
        {
         "name": "id",
         "type": "string or null",
         "required": false,
         "description": "The unique ID of this compaction trigger."
        }
       ]
      },
      {
       "variant": "ItemReference object { id, type }",
       "description": "An internal identifier for an item to reference.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The ID of the item to reference."
        },
        {
         "name": "type",
         "type": "\"item_reference\" or null",
         "required": false,
         "description": "The type of item to reference. Always `item_reference`.",
         "enum": [
          "item_reference"
         ]
        }
       ]
      },
      {
       "variant": "Program object { id, call_id, code, 2 more }",
       "description": "",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of this program item."
        },
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The stable call ID of the program item."
        },
        {
         "name": "code",
         "type": "string",
         "required": true,
         "description": "The JavaScript source executed by programmatic tool calling."
        },
        {
         "name": "fingerprint",
         "type": "string",
         "required": true,
         "description": "Opaque program replay fingerprint that must be round-tripped."
        },
        {
         "name": "type",
         "type": "\"program\"",
         "required": true,
         "description": "The item type. Always `program`.",
         "enum": [
          "program"
         ]
        }
       ]
      },
      {
       "variant": "ProgramOutput object { id, call_id, result, 2 more }",
       "description": "",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of this program output item."
        },
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The call ID of the program item."
        },
        {
         "name": "result",
         "type": "string",
         "required": true,
         "description": "The result produced by the program item."
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\"",
         "required": true,
         "description": "The terminal status of the program output.",
         "enum": [
          "completed",
          "incomplete"
         ]
        },
        {
         "name": "type",
         "type": "\"program_output\"",
         "required": true,
         "description": "The item type. Always `program_output`.",
         "enum": [
          "program_output"
         ]
        }
       ]
      }
     ]
    },
    {
     "name": "type",
     "type": "\"response.item.create\"",
     "required": true,
     "description": "The Live client event type. Always `response.item.create`.",
     "enum": [
      "response.item.create"
     ]
    },
    {
     "name": "event_id",
     "type": "string or null",
     "required": false,
     "description": "Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id."
    }
   ]
  },
  "example": {
   "type": "response.item.create",
   "event_id": "evt_item_001",
   "item": {
    "type": "message",
    "role": "user",
    "content": [
     {
      "type": "input_text",
      "text": "Please check for a table for two at 7 PM."
     }
    ]
   }
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#response.item.create",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#response.item.create",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#response.item.create",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#response.item.create",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "client→server",
  "event": "response.create",
  "description": "Request a response from the Live session’s Responses backend, or continue a delegated response waiting for tool results. Requires Responses delegation.",
  "schema": {
   "schema_name": "LiveResponseCreateParam",
   "fields": [
    {
     "name": "type",
     "type": "\"response.create\"",
     "required": true,
     "description": "The Live client event type. Always `response.create`.",
     "enum": [
      "response.create"
     ]
    },
    {
     "name": "event_id",
     "type": "string or null",
     "required": false,
     "description": "Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id."
    }
   ]
  },
  "example": {
   "type": "response.create",
   "event_id": "evt_response_001"
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#response.create",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#response.create",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#response.create",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#response.create",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "client→server",
  "event": "session.close",
  "description": "Request that the Live session close. The terminal `session.closed` event contains the close reason and final usage.",
  "schema": {
   "schema_name": "LiveSessionCloseParam",
   "fields": [
    {
     "name": "type",
     "type": "\"session.close\"",
     "required": true,
     "description": "The Live client event type. Always `session.close`.",
     "enum": [
      "session.close"
     ]
    },
    {
     "name": "event_id",
     "type": "string or null",
     "required": false,
     "description": "Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id."
    }
   ]
  },
  "example": {
   "type": "session.close",
   "event_id": "evt_close_001"
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.close",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.close",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.close",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.close",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "session.started",
  "description": "Returned when a Live session has started. Contains the resolved session configuration, including server defaults.",
  "schema": {
   "schema_name": "LiveSessionStarted",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the Live server event."
    },
    {
     "name": "session",
     "type": "SessionResource",
     "required": true,
     "description": "The resolved Live session configuration and server-assigned session metadata.",
     "fields": [
      {
       "name": "id",
       "type": "string",
       "required": true,
       "description": "The unique ID of the Live session. Use this ID for sideband connections, forking, and recording download."
      },
      {
       "name": "expires_at",
       "type": "number",
       "required": true,
       "description": "The Unix timestamp, in seconds, at which the Live session expires."
      },
      {
       "name": "model",
       "type": "string or \"gpt-live-1\"",
       "required": true,
       "description": "The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.",
       "enum": [
        "gpt-live-1"
       ]
      },
      {
       "name": "status",
       "type": "\"active\"",
       "required": true,
       "description": "The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.",
       "enum": [
        "active"
       ]
      },
      {
       "name": "audio",
       "type": "object { format, output }",
       "required": false,
       "description": "Startup audio configuration. Only primary WebSockets accept audio.format; WebRTC and SIP negotiate their media format. Voice and format are immutable after startup.",
       "fields": "… 2 nested fields (see source)"
      },
      {
       "name": "client",
       "type": "ClientConfig",
       "required": false,
       "description": "Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session. Trusted sideband connections are unaffected.",
       "fields": "… 1 nested fields (see source)"
      },
      {
       "name": "delegation",
       "type": "ClientDelegation or object { responses, type }  or null",
       "required": false,
       "description": "Who handles tasks delegated by the Live model. Omitted or null selects your application; use `responses` to let the API manage a Responses backend.",
       "variants": [
        {
         "variant": "ClientDelegation object { type }",
         "description": "Delegate tasks to your application. The Live session emits delegation events that your backend handles.",
         "fields": "…"
        },
        {
         "variant": "Responses object { responses, type }",
         "description": "Delegate tasks to a Responses model managed by the Live session.",
         "fields": "…"
        }
       ]
      },
      {
       "name": "input",
       "type": "array of InitialItem",
       "required": false,
       "description": "Ordered text-only history supplied before startup. Supports developer, user, and assistant messages with one text part each; at most 128 messages and 8,192 rendered tokens in total.",
       "variants": [
        {
         "variant": "Developer object { content, role, id, 2 more }",
         "description": "A developer message included in the initial text history of a Live session.",
         "fields": "…"
        },
        {
         "variant": "User object { content, role, id, 2 more }",
         "description": "A user message included in the initial text history of a Live session.",
         "fields": "…"
        },
        {
         "variant": "Assistant object { content, role, id, 2 more }",
         "description": "An assistant message included in the initial text history of a Live session.",
         "fields": "…"
        }
       ]
      },
      {
       "name": "instructions",
       "type": "string or null",
       "required": false,
       "description": "Frontend instructions for voice, conversation, interruptions, and when to delegate. Start with the [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting); put business rules and tool workflows in a separate [backend prompt](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt). Limited to 16,384 client-supplied tokens. Omitted or blank instructions use server defaults. Immutable after startup."
      },
      {
       "name": "store",
       "type": "boolean",
       "required": false,
       "description": "Whether to store the session for later forking and recording download. Defaults to false for new sessions."
      }
     ]
    },
    {
     "name": "type",
     "type": "\"session.started\"",
     "required": true,
     "description": "The event type, always `session.started`.",
     "enum": [
      "session.started"
     ]
    },
    {
     "name": "client_event_id",
     "type": "string",
     "required": false,
     "description": "The event_id of the client command associated with this server event, when supplied."
    }
   ]
  },
  "example": {
   "type": "session.started",
   "event_id": "evt_started_001",
   "client_event_id": "evt_start_001",
   "session": {
    "id": "live_abc123",
    "model": "gpt-live-1",
    "status": "active",
    "expires_at": 1788555600,
    "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",
    "input": [],
    "audio": {
     "format": {
      "type": "audio/pcm",
      "rate": 24000
     },
     "output": {
      "voice": "marin"
     }
    },
    "delegation": {
     "type": "client"
    }
   }
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.started",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.started",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.started",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.started",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "session.updated",
  "description": "Returned when a Live session update is accepted. Contains the resolved session configuration after the update.",
  "schema": {
   "schema_name": "LiveSessionUpdated",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the Live server event."
    },
    {
     "name": "session",
     "type": "SessionResource",
     "required": true,
     "description": "The resolved Live session configuration and server-assigned session metadata.",
     "fields": [
      {
       "name": "id",
       "type": "string",
       "required": true,
       "description": "The unique ID of the Live session. Use this ID for sideband connections, forking, and recording download."
      },
      {
       "name": "expires_at",
       "type": "number",
       "required": true,
       "description": "The Unix timestamp, in seconds, at which the Live session expires."
      },
      {
       "name": "model",
       "type": "string or \"gpt-live-1\"",
       "required": true,
       "description": "The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.",
       "enum": [
        "gpt-live-1"
       ]
      },
      {
       "name": "status",
       "type": "\"active\"",
       "required": true,
       "description": "The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.",
       "enum": [
        "active"
       ]
      },
      {
       "name": "audio",
       "type": "object { format, output }",
       "required": false,
       "description": "Startup audio configuration. Only primary WebSockets accept audio.format; WebRTC and SIP negotiate their media format. Voice and format are immutable after startup.",
       "fields": "… 2 nested fields (see source)"
      },
      {
       "name": "client",
       "type": "ClientConfig",
       "required": false,
       "description": "Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session. Trusted sideband connections are unaffected.",
       "fields": "… 1 nested fields (see source)"
      },
      {
       "name": "delegation",
       "type": "ClientDelegation or object { responses, type }  or null",
       "required": false,
       "description": "Who handles tasks delegated by the Live model. Omitted or null selects your application; use `responses` to let the API manage a Responses backend.",
       "variants": [
        {
         "variant": "ClientDelegation object { type }",
         "description": "Delegate tasks to your application. The Live session emits delegation events that your backend handles.",
         "fields": "…"
        },
        {
         "variant": "Responses object { responses, type }",
         "description": "Delegate tasks to a Responses model managed by the Live session.",
         "fields": "…"
        }
       ]
      },
      {
       "name": "input",
       "type": "array of InitialItem",
       "required": false,
       "description": "Ordered text-only history supplied before startup. Supports developer, user, and assistant messages with one text part each; at most 128 messages and 8,192 rendered tokens in total.",
       "variants": [
        {
         "variant": "Developer object { content, role, id, 2 more }",
         "description": "A developer message included in the initial text history of a Live session.",
         "fields": "…"
        },
        {
         "variant": "User object { content, role, id, 2 more }",
         "description": "A user message included in the initial text history of a Live session.",
         "fields": "…"
        },
        {
         "variant": "Assistant object { content, role, id, 2 more }",
         "description": "An assistant message included in the initial text history of a Live session.",
         "fields": "…"
        }
       ]
      },
      {
       "name": "instructions",
       "type": "string or null",
       "required": false,
       "description": "Frontend instructions for voice, conversation, interruptions, and when to delegate. Start with the [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting); put business rules and tool workflows in a separate [backend prompt](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt). Limited to 16,384 client-supplied tokens. Omitted or blank instructions use server defaults. Immutable after startup."
      },
      {
       "name": "store",
       "type": "boolean",
       "required": false,
       "description": "Whether to store the session for later forking and recording download. Defaults to false for new sessions."
      }
     ]
    },
    {
     "name": "type",
     "type": "\"session.updated\"",
     "required": true,
     "description": "The event type, always `session.updated`.",
     "enum": [
      "session.updated"
     ]
    },
    {
     "name": "client_event_id",
     "type": "string",
     "required": false,
     "description": "The event_id of the client command associated with this server event, when supplied."
    }
   ]
  },
  "example": {
   "type": "session.updated",
   "event_id": "evt_updated_001",
   "client_event_id": "evt_update_001",
   "session": {
    "id": "live_def456",
    "model": "gpt-live-1",
    "status": "active",
    "expires_at": 1788555600,
    "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",
    "input": [],
    "audio": {
     "format": {
      "type": "audio/pcm",
      "rate": 24000
     },
     "output": {
      "voice": "marin"
     }
    },
    "delegation": {
     "type": "responses",
     "responses": {
      "model": "gpt-6-astra",
      "instructions": "Check restaurant availability. Ask before confirming a booking.",
      "max_output_tokens": 1024,
      "tools": []
     }
    }
   }
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.updated",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.updated",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.updated",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.updated",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "session.input_audio.muted",
  "description": "Returned when a session.input_audio.mute command is accepted. Input audio is no longer sent to the model; sideband audio reflection continues.",
  "schema": {
   "schema_name": "LiveInputAudioMuted",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the Live server event."
    },
    {
     "name": "type",
     "type": "\"session.input_audio.muted\"",
     "required": true,
     "description": "The event type, always `session.input_audio.muted`.",
     "enum": [
      "session.input_audio.muted"
     ]
    },
    {
     "name": "client_event_id",
     "type": "string",
     "required": false,
     "description": "The event_id of the client command associated with this server event, when supplied."
    }
   ]
  },
  "example": {
   "type": "session.input_audio.muted",
   "event_id": "evt_muted_001",
   "client_event_id": "evt_mute_001"
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.input_audio.muted",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.input_audio.muted",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.input_audio.muted",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.input_audio.muted",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "session.input_audio.unmuted",
  "description": "Returned when a session.input_audio.unmute command is accepted. Input audio is sent to the model again.",
  "schema": {
   "schema_name": "LiveInputAudioUnmuted",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the Live server event."
    },
    {
     "name": "type",
     "type": "\"session.input_audio.unmuted\"",
     "required": true,
     "description": "The event type, always `session.input_audio.unmuted`.",
     "enum": [
      "session.input_audio.unmuted"
     ]
    },
    {
     "name": "client_event_id",
     "type": "string",
     "required": false,
     "description": "The event_id of the client command associated with this server event, when supplied."
    }
   ]
  },
  "example": {
   "type": "session.input_audio.unmuted",
   "event_id": "evt_unmuted_001",
   "client_event_id": "evt_unmute_001"
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.input_audio.unmuted",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.input_audio.unmuted",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.input_audio.unmuted",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.input_audio.unmuted",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "session.instructions.appended",
  "description": "Returned when a session.instructions.append command is accepted into the Live session timeline. Acknowledges the appended instructions without guaranteeing that the model has acted on them.",
  "schema": {
   "schema_name": "LiveInstructionsAppended",
   "fields": [
    {
     "name": "end_ms",
     "type": "number",
     "required": true,
     "description": "The end of this event on the Live session timeline, in milliseconds from the beginning of the session. For appended context, this can equal start_ms."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the Live server event."
    },
    {
     "name": "start_ms",
     "type": "number",
     "required": true,
     "description": "The start of this event on the Live session timeline, in milliseconds from the beginning of the session."
    },
    {
     "name": "type",
     "type": "\"session.instructions.appended\"",
     "required": true,
     "description": "The event type, always `session.instructions.appended`.",
     "enum": [
      "session.instructions.appended"
     ]
    },
    {
     "name": "client_event_id",
     "type": "string",
     "required": false,
     "description": "The event_id of the client command associated with this server event, when supplied."
    }
   ]
  },
  "example": {
   "type": "session.instructions.appended",
   "event_id": "evt_instructions_002",
   "client_event_id": "evt_instructions_001",
   "start_ms": 1200,
   "end_ms": 1400
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.instructions.appended",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.instructions.appended",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.instructions.appended",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.instructions.appended",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "session.thinking.appended",
  "description": "Returned when a session.thinking.append command is accepted into the Live session timeline. Acknowledges the added reasoning context without guaranteeing any spoken output.",
  "schema": {
   "schema_name": "LiveThinkingAppended",
   "fields": [
    {
     "name": "end_ms",
     "type": "number",
     "required": true,
     "description": "The end of this event on the Live session timeline, in milliseconds from the beginning of the session. For appended context, this can equal start_ms."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the Live server event."
    },
    {
     "name": "start_ms",
     "type": "number",
     "required": true,
     "description": "The start of this event on the Live session timeline, in milliseconds from the beginning of the session."
    },
    {
     "name": "type",
     "type": "\"session.thinking.appended\"",
     "required": true,
     "description": "The event type, always `session.thinking.appended`.",
     "enum": [
      "session.thinking.appended"
     ]
    },
    {
     "name": "client_event_id",
     "type": "string",
     "required": false,
     "description": "The event_id of the client command associated with this server event, when supplied."
    }
   ]
  },
  "example": {
   "type": "session.thinking.appended",
   "event_id": "evt_thinking_002",
   "client_event_id": "evt_thinking_001",
   "start_ms": 4600,
   "end_ms": 4800
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.thinking.appended",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.thinking.appended",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.thinking.appended",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.thinking.appended",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "session.commentary.appended",
  "description": "Returned when a session.commentary.append command is accepted into the Live session timeline. Acknowledges the added commentary without guaranteeing exact wording or completed audio playback.",
  "schema": {
   "schema_name": "LiveCommentaryAppended",
   "fields": [
    {
     "name": "end_ms",
     "type": "number",
     "required": true,
     "description": "The end of this event on the Live session timeline, in milliseconds from the beginning of the session. For appended context, this can equal start_ms."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the Live server event."
    },
    {
     "name": "start_ms",
     "type": "number",
     "required": true,
     "description": "The start of this event on the Live session timeline, in milliseconds from the beginning of the session."
    },
    {
     "name": "type",
     "type": "\"session.commentary.appended\"",
     "required": true,
     "description": "The event type, always `session.commentary.appended`.",
     "enum": [
      "session.commentary.appended"
     ]
    },
    {
     "name": "client_event_id",
     "type": "string",
     "required": false,
     "description": "The event_id of the client command associated with this server event, when supplied."
    }
   ]
  },
  "example": {
   "type": "session.commentary.appended",
   "event_id": "evt_commentary_002",
   "client_event_id": "evt_commentary_001",
   "start_ms": 5200,
   "end_ms": 5400
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.commentary.appended",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.commentary.appended",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.commentary.appended",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.commentary.appended",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "session.output_audio.delta",
  "description": "An audio chunk generated by the Live model. Decode and play primary WebSocket chunks in delivery order using the configured session audio format. Sideband connections receive reflected output audio with timestamps.",
  "schema": {
   "schema_name": "LiveOutputAudioDelta",
   "fields": [
    {
     "name": "delta",
     "type": "string",
     "required": true,
     "description": "Base64-encoded raw audio. Primary WebSocket events use the session's configured format; reflected sideband events use mono PCM16LE at 24 kHz."
    },
    {
     "name": "type",
     "type": "\"session.output_audio.delta\"",
     "required": true,
     "description": "The event type, always `session.output_audio.delta`.",
     "enum": [
      "session.output_audio.delta"
     ]
    },
    {
     "name": "end_ms",
     "type": "number",
     "required": false,
     "description": "Exclusive session-relative end in milliseconds. Required on reflected sideband events; omitted on the primary WebSocket. Dropped output frames leave gaps between reflected ranges."
    },
    {
     "name": "start_ms",
     "type": "number",
     "required": false,
     "description": "Inclusive session-relative start in milliseconds. Required on reflected sideband events; omitted on the primary WebSocket."
    }
   ]
  },
  "example": {
   "type": "session.output_audio.delta",
   "delta": "AACAAIAAAIAAAP9/AIAAgA==",
   "start_ms": 1000,
   "end_ms": 1200
  },
  "connections": [
   "primary",
   "fork"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.output_audio.delta",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.output_audio.delta",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.output_audio.delta",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "session.input_transcript.delta",
  "description": "A transcript fragment for user input audio in the Live session. Accumulate fragments in delivery order; these events do not define complete turns or include a transcript-done event.",
  "schema": {
   "schema_name": "LiveInputTranscriptDelta",
   "fields": [
    {
     "name": "delta",
     "type": "string",
     "required": true,
     "description": "The transcript text fragment for the audio in this time range. Append fragments in delivery order to build the transcript."
    },
    {
     "name": "end_ms",
     "type": "number",
     "required": true,
     "description": "The end of this event on the Live session timeline, in milliseconds from the beginning of the session. For appended context, this can equal start_ms."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the Live server event."
    },
    {
     "name": "start_ms",
     "type": "number",
     "required": true,
     "description": "The start of this event on the Live session timeline, in milliseconds from the beginning of the session."
    },
    {
     "name": "type",
     "type": "\"session.input_transcript.delta\"",
     "required": true,
     "description": "The event type, always `session.input_transcript.delta`.",
     "enum": [
      "session.input_transcript.delta"
     ]
    },
    {
     "name": "client_event_id",
     "type": "string",
     "required": false,
     "description": "The event_id of the client command associated with this server event, when supplied."
    }
   ]
  },
  "example": {
   "type": "session.input_transcript.delta",
   "event_id": "evt_input_transcript_001",
   "delta": "A table for two at seven, please.",
   "start_ms": 1600,
   "end_ms": 3400
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.input_transcript.delta",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.input_transcript.delta",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.input_transcript.delta",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.input_transcript.delta",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "session.output_transcript.delta",
  "description": "A transcript fragment for assistant output audio in the Live session. Accumulate fragments in delivery order; these events do not define complete turns or include a transcript-done event.",
  "schema": {
   "schema_name": "LiveOutputTranscriptDelta",
   "fields": [
    {
     "name": "delta",
     "type": "string",
     "required": true,
     "description": "The transcript text fragment for the audio in this time range. Append fragments in delivery order to build the transcript."
    },
    {
     "name": "end_ms",
     "type": "number",
     "required": true,
     "description": "The end of this event on the Live session timeline, in milliseconds from the beginning of the session. For appended context, this can equal start_ms."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the Live server event."
    },
    {
     "name": "start_ms",
     "type": "number",
     "required": true,
     "description": "The start of this event on the Live session timeline, in milliseconds from the beginning of the session."
    },
    {
     "name": "type",
     "type": "\"session.output_transcript.delta\"",
     "required": true,
     "description": "The event type, always `session.output_transcript.delta`.",
     "enum": [
      "session.output_transcript.delta"
     ]
    },
    {
     "name": "client_event_id",
     "type": "string",
     "required": false,
     "description": "The event_id of the client command associated with this server event, when supplied."
    }
   ]
  },
  "example": {
   "type": "session.output_transcript.delta",
   "event_id": "evt_output_transcript_001",
   "delta": "Would you like me to reserve that table?",
   "start_ms": 5400,
   "end_ms": 7200
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.output_transcript.delta",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.output_transcript.delta",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.output_transcript.delta",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.output_transcript.delta",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "session.delegation.created",
  "description": "Returned when the Live model delegates work to your application or a Responses backend. Contains delegation metadata and the position on the session timeline where the work was delegated.",
  "schema": {
   "schema_name": "LiveDelegationCreated",
   "fields": [
    {
     "name": "delegation",
     "type": "object { id, target, type, response_id }",
     "required": true,
     "description": "The delegated work identifier and destination. This object contains metadata, not the task text.",
     "fields": [
      {
       "name": "id",
       "type": "string",
       "required": true,
       "description": "The unique ID of the delegation. Use this as delegation_id when replying to client-owned work or correlating Responses events."
      },
      {
       "name": "target",
       "type": "\"client\" or \"responses\"",
       "required": true,
       "description": "Where the Live model delegated the work: `client` for your application, or `responses` for the configured Responses backend.",
       "variants": [
        {
         "variant": "\"client\" or \"responses\"",
         "description": "Where the Live model delegated the work: `client` for your application, or `responses` for the configured Responses backend.",
         "fields": "…"
        }
       ]
      },
      {
       "name": "type",
       "type": "\"delegation\"",
       "required": true,
       "description": "The object type, always `delegation`.",
       "enum": [
        "delegation"
       ]
      },
      {
       "name": "response_id",
       "type": "string",
       "required": false,
       "description": "The ID of the Responses API response associated with a Responses delegation. Omitted for client delegations."
      }
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the Live server event."
    },
    {
     "name": "offset_ms",
     "type": "number",
     "required": true,
     "description": "The position on the Live session timeline where the delegation was created, in milliseconds from the beginning of the session."
    },
    {
     "name": "type",
     "type": "\"session.delegation.created\"",
     "required": true,
     "description": "The event type, always `session.delegation.created`.",
     "enum": [
      "session.delegation.created"
     ]
    },
    {
     "name": "client_event_id",
     "type": "string",
     "required": false,
     "description": "The event_id of the client command associated with this server event, when supplied."
    }
   ]
  },
  "example": {
   "type": "session.delegation.created",
   "event_id": "evt_delegation_001",
   "offset_ms": 3600,
   "delegation": {
    "id": "del_abc123",
    "type": "delegation",
    "target": "client"
   }
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.delegation.created",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.delegation.created",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.delegation.created",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.delegation.created",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "response.event",
  "description": "A streaming Responses API event from a backend delegated to by the Live session. Use the outer delegation_id to associate the nested stream with its Live delegation.",
  "schema": {
   "schema_name": "LiveResponseEvent",
   "fields": [
    {
     "name": "event",
     "type": "map[unknown]",
     "required": true,
     "description": "The nested Responses streaming event. Dispatch on its type field. Response lifecycle snapshots omit input and clear instructions, tools, and output to keep messages small; consume granular output events for the generated content."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the Live server event."
    },
    {
     "name": "type",
     "type": "\"response.event\"",
     "required": true,
     "description": "The event type, always `response.event`.",
     "enum": [
      "response.event"
     ]
    },
    {
     "name": "client_event_id",
     "type": "string",
     "required": false,
     "description": "The event_id of the client command associated with this server event, when supplied."
    },
    {
     "name": "delegation_id",
     "type": "string or null",
     "required": false,
     "description": "The Live delegation associated with the nested Responses event. May be null or omitted when the event cannot be correlated with a delegation."
    }
   ]
  },
  "example": {
   "type": "response.event",
   "event_id": "evt_response_002",
   "delegation_id": "del_responses123",
   "event": {
    "type": "response.output_text.delta",
    "item_id": "msg_abc123",
    "output_index": 0,
    "content_index": 0,
    "delta": "An outdoor table is available at 7 PM.",
    "sequence_number": 3,
    "logprobs": []
   }
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#response.event",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#response.event",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#response.event",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#response.event",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "session.usage.updated",
  "description": "Reports cumulative Live audio usage and, when available, the most recent context-window usage. Delegated Responses token usage is reported separately in response.event events.",
  "schema": {
   "schema_name": "LiveSessionUsageUpdated",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the Live server event."
    },
    {
     "name": "type",
     "type": "\"session.usage.updated\"",
     "required": true,
     "description": "The event type, always `session.usage.updated`.",
     "enum": [
      "session.usage.updated"
     ]
    },
    {
     "name": "usage",
     "type": "SessionUsage",
     "required": true,
     "description": "The cumulative Live audio usage so far.",
     "fields": [
      {
       "name": "seconds",
       "type": "number",
       "required": true,
       "description": "The cumulative Live audio duration in seconds. Do not sum this value across usage events."
      }
     ]
    },
    {
     "name": "client_event_id",
     "type": "string",
     "required": false,
     "description": "The event_id of the client command associated with this server event, when supplied."
    },
    {
     "name": "context_window",
     "type": "object { usage_ratio }",
     "required": false,
     "description": "The latest measured Live context-window usage. Omitted when the context limit is unknown.",
     "fields": [
      {
       "name": "usage_ratio",
       "type": "number",
       "required": true,
       "description": "The latest active context token count divided by the Live model context limit. Can decrease after compaction and may lag between measured audio frames."
      }
     ]
    }
   ]
  },
  "example": {
   "type": "session.usage.updated",
   "event_id": "evt_usage_001",
   "usage": {
    "seconds": 32.5
   },
   "context_window": {
    "usage_ratio": 0.12
   }
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.usage.updated",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.usage.updated",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.usage.updated",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.usage.updated",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "session.closed",
  "description": "Returned after the Live session finishes finalizing, with the close reason, final session snapshot, and cumulative audio usage. A connection closing without this event does not confirm successful finalization.",
  "schema": {
   "schema_name": "LiveSessionClosed",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the Live server event."
    },
    {
     "name": "reason",
     "type": "\"close_requested\" or \"expired\" or \"content\" or 2 more",
     "required": true,
     "description": "Why the Live session ended: `close_requested` for an application close or hangup request, `expired` for the session duration limit, `content` for a safety filter, `remote_hangup` for a graceful remote disconnect, or `connection_lost` for an unexpected primary or upstream disconnection.",
     "variants": [
      {
       "variant": "\"close_requested\" or \"expired\" or \"content\" or 2 more",
       "description": "Why the Live session ended: `close_requested` for an application close or hangup request, `expired` for the session duration limit, `content` for a safety filter, `remote_hangup` for a graceful remote disconnect, or `connection_lost` for an unexpected primary or upstream disconnection.",
       "fields": []
      }
     ]
    },
    {
     "name": "session",
     "type": "SessionResource",
     "required": true,
     "description": "The resolved Live session configuration and server-assigned session metadata.",
     "fields": [
      {
       "name": "id",
       "type": "string",
       "required": true,
       "description": "The unique ID of the Live session. Use this ID for sideband connections, forking, and recording download."
      },
      {
       "name": "expires_at",
       "type": "number",
       "required": true,
       "description": "The Unix timestamp, in seconds, at which the Live session expires."
      },
      {
       "name": "model",
       "type": "string or \"gpt-live-1\"",
       "required": true,
       "description": "The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.",
       "enum": [
        "gpt-live-1"
       ]
      },
      {
       "name": "status",
       "type": "\"active\"",
       "required": true,
       "description": "The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.",
       "enum": [
        "active"
       ]
      },
      {
       "name": "audio",
       "type": "object { format, output }",
       "required": false,
       "description": "Startup audio configuration. Only primary WebSockets accept audio.format; WebRTC and SIP negotiate their media format. Voice and format are immutable after startup.",
       "fields": "… 2 nested fields (see source)"
      },
      {
       "name": "client",
       "type": "ClientConfig",
       "required": false,
       "description": "Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session. Trusted sideband connections are unaffected.",
       "fields": "… 1 nested fields (see source)"
      },
      {
       "name": "delegation",
       "type": "ClientDelegation or object { responses, type }  or null",
       "required": false,
       "description": "Who handles tasks delegated by the Live model. Omitted or null selects your application; use `responses` to let the API manage a Responses backend.",
       "variants": [
        {
         "variant": "ClientDelegation object { type }",
         "description": "Delegate tasks to your application. The Live session emits delegation events that your backend handles.",
         "fields": "…"
        },
        {
         "variant": "Responses object { responses, type }",
         "description": "Delegate tasks to a Responses model managed by the Live session.",
         "fields": "…"
        }
       ]
      },
      {
       "name": "input",
       "type": "array of InitialItem",
       "required": false,
       "description": "Ordered text-only history supplied before startup. Supports developer, user, and assistant messages with one text part each; at most 128 messages and 8,192 rendered tokens in total.",
       "variants": [
        {
         "variant": "Developer object { content, role, id, 2 more }",
         "description": "A developer message included in the initial text history of a Live session.",
         "fields": "…"
        },
        {
         "variant": "User object { content, role, id, 2 more }",
         "description": "A user message included in the initial text history of a Live session.",
         "fields": "…"
        },
        {
         "variant": "Assistant object { content, role, id, 2 more }",
         "description": "An assistant message included in the initial text history of a Live session.",
         "fields": "…"
        }
       ]
      },
      {
       "name": "instructions",
       "type": "string or null",
       "required": false,
       "description": "Frontend instructions for voice, conversation, interruptions, and when to delegate. Start with the [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting); put business rules and tool workflows in a separate [backend prompt](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt). Limited to 16,384 client-supplied tokens. Omitted or blank instructions use server defaults. Immutable after startup."
      },
      {
       "name": "store",
       "type": "boolean",
       "required": false,
       "description": "Whether to store the session for later forking and recording download. Defaults to false for new sessions."
      }
     ]
    },
    {
     "name": "type",
     "type": "\"session.closed\"",
     "required": true,
     "description": "The event type, always `session.closed`.",
     "enum": [
      "session.closed"
     ]
    },
    {
     "name": "usage",
     "type": "SessionUsage",
     "required": true,
     "description": "The final cumulative Live audio usage after session finalization.",
     "fields": [
      {
       "name": "seconds",
       "type": "number",
       "required": true,
       "description": "The cumulative Live audio duration in seconds. Do not sum this value across usage events."
      }
     ]
    },
    {
     "name": "client_event_id",
     "type": "string",
     "required": false,
     "description": "The event_id of the client command associated with this server event, when supplied."
    }
   ]
  },
  "example": {
   "type": "session.closed",
   "event_id": "evt_closed_001",
   "client_event_id": "evt_close_001",
   "reason": "close_requested",
   "session": {
    "id": "live_abc123",
    "model": "gpt-live-1",
    "status": "active",
    "expires_at": 1788555600,
    "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",
    "input": [],
    "audio": {
     "format": {
      "type": "audio/pcm",
      "rate": 24000
     },
     "output": {
      "voice": "marin"
     }
    },
    "delegation": {
     "type": "client"
    }
   },
   "usage": {
    "seconds": 45.8
   }
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.closed",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.closed",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.closed",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.closed",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "session.input_audio.append",
  "description": "Input audio received from the primary transport and reflected to a Live sideband connection before model-input muting.",
  "schema": {
   "schema_name": "LiveInputAudioAppend",
   "fields": [
    {
     "name": "audio",
     "type": "string",
     "required": true,
     "description": "Base64-encoded raw mono PCM16LE at 24 kHz received from the primary transport, reflected to the sideband before model-input muting. This server event uses the same audio key as the client command, but is not an acknowledgment of it."
    },
    {
     "name": "type",
     "type": "\"session.input_audio.append\"",
     "required": true,
     "description": "The event type, always `session.input_audio.append`.",
     "enum": [
      "session.input_audio.append"
     ]
    }
   ]
  },
  "example": {
   "type": "session.input_audio.append",
   "audio": "AACAAIAAAIAAAP9/AIAAgA=="
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.input_audio.append",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#session.input_audio.append",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#session.input_audio.append",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#session.input_audio.append",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "transport.dtmf.received",
  "description": "A SIP DTMF keypress received from the caller. Delivered only to sideband observers.",
  "schema": {
   "schema_name": "LiveTransportDTMFReceived",
   "fields": [
    {
     "name": "event",
     "type": "string",
     "required": true,
     "description": ""
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": ""
    },
    {
     "name": "type",
     "type": "\"transport.dtmf.received\"",
     "required": true,
     "description": "",
     "enum": [
      "transport.dtmf.received"
     ]
    }
   ]
  },
  "example": {
   "type": "transport.dtmf.received",
   "event_id": "event_dtmf_1",
   "event": "5"
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#transport.dtmf.received",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#transport.dtmf.received",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#transport.dtmf.received",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#transport.dtmf.received",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "transport.dtmf.send",
  "description": "A SIP DTMF keypress successfully sent by the hosted tool. Delivered only to sideband observers; this is not a client command.",
  "schema": {
   "schema_name": "LiveTransportDTMFSend",
   "fields": [
    {
     "name": "event",
     "type": "string",
     "required": true,
     "description": ""
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": ""
    },
    {
     "name": "type",
     "type": "\"transport.dtmf.send\"",
     "required": true,
     "description": "",
     "enum": [
      "transport.dtmf.send"
     ]
    }
   ]
  },
  "example": {
   "type": "transport.dtmf.send",
   "event_id": "event_dtmf_2",
   "event": "#"
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#transport.dtmf.send",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#transport.dtmf.send",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#transport.dtmf.send",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#transport.dtmf.send",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "transport.ringing",
  "description": "The outbound SIP provider leg is ringing or providing early media. Delivered only to sideband observers.",
  "schema": {
   "schema_name": "LiveTransportRinging",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": ""
    },
    {
     "name": "session_id",
     "type": "string",
     "required": true,
     "description": "The canonical Live session ID."
    },
    {
     "name": "type",
     "type": "\"transport.ringing\"",
     "required": true,
     "description": "",
     "enum": [
      "transport.ringing"
     ]
    }
   ]
  },
  "example": {
   "type": "transport.ringing",
   "event_id": "event_call_1",
   "session_id": "live_u0_123"
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#transport.ringing",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#transport.ringing",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#transport.ringing",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#transport.ringing",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "transport.answered",
  "description": "The outbound SIP provider leg answered and media is established. Delivered only to sideband observers.",
  "schema": {
   "schema_name": "LiveTransportAnswered",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": ""
    },
    {
     "name": "session_id",
     "type": "string",
     "required": true,
     "description": "The canonical Live session ID."
    },
    {
     "name": "type",
     "type": "\"transport.answered\"",
     "required": true,
     "description": "",
     "enum": [
      "transport.answered"
     ]
    }
   ]
  },
  "example": {
   "type": "transport.answered",
   "event_id": "event_call_2",
   "session_id": "live_u0_123"
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#transport.answered",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#transport.answered",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#transport.answered",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#transport.answered",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "live",
  "direction": "server→client",
  "event": "transport.failed",
  "description": "An asynchronous outbound SIP setup failure. Delivered only to sideband observers.",
  "schema": {
   "schema_name": "LiveTransportFailed",
   "fields": [
    {
     "name": "error",
     "type": "object { code, message, type, param }",
     "required": true,
     "description": "",
     "fields": [
      {
       "name": "code",
       "type": "string",
       "required": true,
       "description": "The call setup failure code."
      },
      {
       "name": "message",
       "type": "string",
       "required": true,
       "description": ""
      },
      {
       "name": "type",
       "type": "\"call_error\"",
       "required": true,
       "description": "",
       "enum": [
        "call_error"
       ]
      },
      {
       "name": "param",
       "type": "string",
       "required": false,
       "description": "The parameter related to the error, if any. Empty when no parameter applies."
      }
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": ""
    },
    {
     "name": "session_id",
     "type": "string",
     "required": true,
     "description": "The canonical Live session ID."
    },
    {
     "name": "type",
     "type": "\"transport.failed\"",
     "required": true,
     "description": "",
     "enum": [
      "transport.failed"
     ]
    }
   ]
  },
  "example": {
   "type": "transport.failed",
   "event_id": "event_call_4",
   "session_id": "live_u0_123",
   "error": {
    "type": "call_error",
    "code": "provider_invite_failed",
    "message": "provider rejected the call",
    "param": ""
   }
  },
  "connections": [
   "primary",
   "fork",
   "sideband"
  ],
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel (primary events except audio)",
   "sideband websocket"
  ],
  "sources": [
   {
    "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#transport.failed",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/fork-websocket#transport.failed",
    "retrieved_at": "2026-09-19T01:31:51Z"
   },
   {
    "url": "https://developers.openai.com/api/reference/resources/live/sideband-websocket#transport.failed",
    "retrieved_at": "2026-09-19T01:31:51Z"
   }
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/live/primary-websocket#transport.failed",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "connection_urls": {
   "primary": "wss://api.openai.com/v1/live/sessions",
   "fork": "wss://api.openai.com/v1/live/sessions/{session_id}/fork",
   "sideband": "wss://api.openai.com/v1/live/sessions/{session_id}/attach"
  },
  "_fragment": "generated/fragments/streaming-events/openai-live.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "client→server",
  "event": "session.update",
  "description": "Send this event to update the session’s configuration. The client may send this event at any time to update any field except for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet. When the server receives a `session.update`, it will respond with a `session.updated` event showing the full, effective configuration. Only the fields that are present in the `session.update` are updated. To clear a field like `instructions`, pass an empty string. To clear a field like `tools`, pass an empty array. To clear a field like `turn_detection`, pass `null`.",
  "schema": {
   "schema_name": "RealtimeClientEventSessionUpdate",
   "fields": [
    {
     "name": "session",
     "type": "RealtimeSessionCreateRequest or RealtimeTranscriptionSessionCreateRequest",
     "required": true,
     "description": "Update the Realtime session. Choose either a realtime session or a transcription session.",
     "variants": [
      {
       "variant": "RealtimeSessionCreateRequest object { type, audio, include, 11 more }",
       "description": "Realtime session object configuration.",
       "fields": [
        {
         "name": "type",
         "type": "\"realtime\"",
         "required": true,
         "description": "The type of session to create. Always `realtime` for the Realtime API.",
         "enum": [
          "realtime"
         ]
        },
        {
         "name": "audio",
         "type": "RealtimeAudioConfig",
         "required": false,
         "description": "Configuration for input and output audio.",
         "fields": "… 2 nested fields (see source)"
        },
        {
         "name": "include",
         "type": "array of \"item.input_audio_transcription.logprobs\"",
         "required": false,
         "description": "Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.",
         "enum": [
          "item.input_audio_transcription.logprobs"
         ]
        },
        {
         "name": "instructions",
         "type": "string",
         "required": false,
         "description": "The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion into your voice\", \"laugh frequently\"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session."
        },
        {
         "name": "max_output_tokens",
         "type": "number or \"inf\"",
         "required": false,
         "description": "Maximum number of output tokens for a single assistant response, inclusive of tool calls. Provide an integer between 1 and 4096 to limit output tokens, or `inf` for the maximum available tokens for a given model. Defaults to `inf`.",
         "enum": [
          "inf"
         ]
        },
        {
         "name": "model",
         "type": "string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 more",
         "required": false,
         "description": "The Realtime model used for this session.",
         "variants": [
          {
           "variant": "\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 more",
           "description": "The Realtime model used for this session.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "output_modalities",
         "type": "array of \"text\" or \"audio\"",
         "required": false,
         "description": "The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating that the model will respond with audio plus a transcript. `[\"text\"]` can be used to make the model respond with text only. It is not possible to request both `text` and `audio` at the same time.",
         "enum": [
          "text",
          "audio"
         ]
        },
        {
         "name": "parallel_tool_calls",
         "type": "boolean",
         "required": false,
         "description": "Whether the model may call multiple tools in parallel. Only supported by reasoning Realtime models such as `gpt-realtime-2`."
        },
        {
         "name": "prompt",
         "type": "ResponsePrompt or null",
         "required": false,
         "description": "Reference to a prompt template and its variables. [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).",
         "fields": "… 3 nested fields (see source)"
        },
        {
         "name": "reasoning",
         "type": "RealtimeReasoning",
         "required": false,
         "description": "Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.",
         "fields": "… 1 nested fields (see source)"
        },
        {
         "name": "tool_choice",
         "type": "RealtimeToolChoiceConfig",
         "required": false,
         "description": "How the model chooses tools. Provide one of the string modes or force a specific function/MCP tool.",
         "variants": [
          {
           "variant": "ToolChoiceOptions = \"none\" or \"auto\" or \"required\"",
           "description": "Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools.",
           "fields": "…"
          },
          {
           "variant": "ToolChoiceFunction object { name, type }",
           "description": "Use this option to force the model to call a specific function.",
           "fields": "…"
          },
          {
           "variant": "ToolChoiceMcp object { server_label, type, name }",
           "description": "Use this option to force the model to call a specific tool on a remote MCP server.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "tools",
         "type": "RealtimeToolsConfig",
         "required": false,
         "description": "Tools available to the model.",
         "variants": [
          {
           "variant": "RealtimeFunctionTool object { description, name, parameters, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "McpTool object { server_label, type, allowed_callers, 9 more }",
           "description": "Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).",
           "fields": "…"
          }
         ]
        },
        {
         "name": "tracing",
         "type": "RealtimeTracingConfig or null",
         "required": false,
         "description": "Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once tracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the workflow name, group id, and metadata.",
         "variants": [
          {
           "variant": "Auto = \"auto\"",
           "description": "Enables tracing and sets default values for tracing configuration options. Always `auto`.",
           "fields": "…"
          },
          {
           "variant": "TracingConfiguration object { group_id, metadata, workflow_name }",
           "description": "Granular configuration for tracing.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "truncation",
         "type": "RealtimeTruncation",
         "required": false,
         "description": "When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.",
         "variants": [
          {
           "variant": "\"auto\" or \"disabled\"",
           "description": "The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.",
           "fields": "…"
          },
          {
           "variant": "RetentionRatioTruncation object { retention_ratio, type, token_limits }",
           "description": "Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.",
           "fields": "…"
          }
         ]
        }
       ]
      },
      {
       "variant": "RealtimeTranscriptionSessionCreateRequest object { type, audio, include }",
       "description": "Realtime transcription session object configuration.",
       "fields": [
        {
         "name": "type",
         "type": "\"transcription\"",
         "required": true,
         "description": "The type of session to create. Always `transcription` for transcription sessions.",
         "enum": [
          "transcription"
         ]
        },
        {
         "name": "audio",
         "type": "RealtimeTranscriptionSessionAudio",
         "required": false,
         "description": "Configuration for input and output audio.",
         "fields": "… 1 nested fields (see source)"
        },
        {
         "name": "include",
         "type": "array of \"item.input_audio_transcription.logprobs\"",
         "required": false,
         "description": "Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.",
         "enum": [
          "item.input_audio_transcription.logprobs"
         ]
        }
       ]
      }
     ]
    },
    {
     "name": "type",
     "type": "\"session.update\"",
     "required": true,
     "description": "The event type, must be `session.update`.",
     "enum": [
      "session.update"
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": false,
     "description": "Optional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it."
    }
   ]
  },
  "example": {
   "type": "session.update",
   "session": {
    "type": "realtime",
    "instructions": "You are a creative assistant that helps with design tasks.",
    "tools": [
     {
      "type": "function",
      "name": "display_color_palette",
      "description": "Call this function when a user asks for a color palette.",
      "parameters": {
       "type": "object",
       "properties": {
        "theme": {
         "type": "string",
         "description": "Description of the theme for the color scheme."
        },
        "colors": {
         "type": "array",
         "description": "Array of five hex color codes based on the theme.",
         "items": {
          "type": "string",
          "description": "Hex color code"
         }
        }
       },
       "required": [
        "theme",
        "colors"
       ]
      }
     }
    ],
    "tool_choice": "auto"
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/client-events#session.update",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "notes": "Payload `session` accepts either a realtime session object (type=realtime) or a transcription session object (type=transcription); same object as POST /v1/realtime/client_secrets `session`.",
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "client→server",
  "event": "input_audio_buffer.append",
  "description": "Send this event to append audio bytes to the input audio buffer. The audio buffer is temporary storage you can write to and later commit. A \"commit\" will create a new user message item in the conversation history from the buffer content and clear the buffer. Input audio transcription (if enabled) will be generated when the buffer is committed. If VAD is enabled the audio buffer is used to detect speech and the server will decide when to commit. When Server VAD is disabled, you must commit the audio buffer manually. Input audio noise reduction operates on writes to the audio buffer. The client may choose how much audio to place in each event up to a maximum of 15 MiB, for example streaming smaller chunks from the client may allow the VAD to be more responsive. Unlike most other client events, the server will not send a confirmation response to this event.",
  "schema": {
   "schema_name": "RealtimeClientEventInputAudioBufferAppend",
   "fields": [
    {
     "name": "audio",
     "type": "string",
     "required": true,
     "description": "Base64-encoded audio bytes. This must be in the format specified by the `input_audio_format` field in the session configuration."
    },
    {
     "name": "type",
     "type": "\"input_audio_buffer.append\"",
     "required": true,
     "description": "The event type, must be `input_audio_buffer.append`.",
     "enum": [
      "input_audio_buffer.append"
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": false,
     "description": "Optional client-generated ID used to identify this event."
    }
   ]
  },
  "example": {
   "event_id": "event_456",
   "type": "input_audio_buffer.append",
   "audio": "Base64EncodedAudioData"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/client-events#input_audio_buffer.append",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "client→server",
  "event": "input_audio_buffer.commit",
  "description": "Send this event to commit the user input audio buffer, which will create a  new user message item in the conversation. This event will produce an error  if the input audio buffer is empty. When in Server VAD mode, the client does  not need to send this event, the server will commit the audio buffer  automatically. Committing the input audio buffer will trigger input audio transcription  (if enabled in session configuration), but it will not create a response  from the model. The server will respond with an `input_audio_buffer.committed` event.",
  "schema": {
   "schema_name": "RealtimeClientEventInputAudioBufferCommit",
   "fields": [
    {
     "name": "type",
     "type": "\"input_audio_buffer.commit\"",
     "required": true,
     "description": "The event type, must be `input_audio_buffer.commit`.",
     "enum": [
      "input_audio_buffer.commit"
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": false,
     "description": "Optional client-generated ID used to identify this event."
    }
   ]
  },
  "example": {
   "event_id": "event_789",
   "type": "input_audio_buffer.commit"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/client-events#input_audio_buffer.commit",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "client→server",
  "event": "input_audio_buffer.clear",
  "description": "Send this event to clear the audio bytes in the buffer. The server will respond with an `input_audio_buffer.cleared` event.",
  "schema": {
   "schema_name": "RealtimeClientEventInputAudioBufferClear",
   "fields": [
    {
     "name": "type",
     "type": "\"input_audio_buffer.clear\"",
     "required": true,
     "description": "The event type, must be `input_audio_buffer.clear`.",
     "enum": [
      "input_audio_buffer.clear"
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": false,
     "description": "Optional client-generated ID used to identify this event."
    }
   ]
  },
  "example": {
   "event_id": "event_012",
   "type": "input_audio_buffer.clear"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/client-events#input_audio_buffer.clear",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "client→server",
  "event": "conversation.item.create",
  "description": "Add a new Item to the Conversation's context, including messages, function calls, and function call responses. This event can be used both to populate a \"history\" of the conversation and to add new items mid-stream, but has the current limitation that it cannot populate assistant audio messages. If successful, the server will emit a `conversation.item.added` event and, when the item is finalized, a `conversation.item.done` event. Otherwise, an `error` event will be sent.",
  "schema": {
   "schema_name": "RealtimeClientEventConversationItemCreate",
   "fields": [
    {
     "name": "item",
     "type": "ConversationItem",
     "required": true,
     "description": "A single item within a Realtime conversation.",
     "variants": [
      {
       "variant": "RealtimeConversationItemSystemMessage object { content, role, type, 3 more }",
       "description": "A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. \"the user is now asking about a different topic\"), use system messages.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { text, type }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 2 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"system\"",
         "required": true,
         "description": "The role of the message sender. Always `system`.",
         "enum": [
          "system"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemUserMessage object { content, role, type, 3 more }",
       "description": "A user message item in a Realtime conversation.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { audio, detail, image_url, 3 more }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 6 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"user\"",
         "required": true,
         "description": "The role of the message sender. Always `user`.",
         "enum": [
          "user"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }",
       "description": "An assistant message item in a Realtime conversation.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { audio, text, transcript, type }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 4 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"assistant\"",
         "required": true,
         "description": "The role of the message sender. Always `assistant`.",
         "enum": [
          "assistant"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }",
       "description": "A function call item in a Realtime conversation.",
       "fields": [
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the function being called."
        },
        {
         "name": "type",
         "type": "\"function_call\"",
         "required": true,
         "description": "The type of the item. Always `function_call`.",
         "enum": [
          "function_call"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "call_id",
         "type": "string",
         "required": false,
         "description": "The ID of the function call."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }",
       "description": "A function call output item in a Realtime conversation.",
       "fields": [
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The ID of the function call this output is for."
        },
        {
         "name": "output",
         "type": "string",
         "required": true,
         "description": "The output of the function call, this is free text and can contain any information or simply be empty."
        },
        {
         "name": "type",
         "type": "\"function_call_output\"",
         "required": true,
         "description": "The type of the item. Always `function_call_output`.",
         "enum": [
          "function_call_output"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }",
       "description": "A Realtime item responding to an MCP approval request.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the approval response."
        },
        {
         "name": "approval_request_id",
         "type": "string",
         "required": true,
         "description": "The ID of the approval request being answered."
        },
        {
         "name": "approve",
         "type": "boolean",
         "required": true,
         "description": "Whether the request was approved."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_response\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_response`.",
         "enum": [
          "mcp_approval_response"
         ]
        },
        {
         "name": "reason",
         "type": "string or null",
         "required": false,
         "description": "Optional reason for the decision."
        }
       ]
      },
      {
       "variant": "RealtimeMcpListTools object { server_label, tools, type, id }",
       "description": "A Realtime item listing tools available on an MCP server.",
       "fields": [
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server."
        },
        {
         "name": "tools",
         "type": "array of object { input_schema, name, annotations, description }",
         "required": true,
         "description": "The tools available on the server.",
         "fields": "… 4 nested fields (see source)"
        },
        {
         "name": "type",
         "type": "\"mcp_list_tools\"",
         "required": true,
         "description": "The type of the item. Always `mcp_list_tools`.",
         "enum": [
          "mcp_list_tools"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the list."
        }
       ]
      },
      {
       "variant": "RealtimeMcpToolCall object { id, arguments, name, 5 more }",
       "description": "A Realtime item representing an invocation of a tool on an MCP server.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the tool call."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of the arguments passed to the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool that was run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server running the tool."
        },
        {
         "name": "type",
         "type": "\"mcp_call\"",
         "required": true,
         "description": "The type of the item. Always `mcp_call`.",
         "enum": [
          "mcp_call"
         ]
        },
        {
         "name": "approval_request_id",
         "type": "string or null",
         "required": false,
         "description": "The ID of an associated approval request, if any."
        },
        {
         "name": "error",
         "type": "RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null",
         "required": false,
         "description": "The error from the tool call, if any.",
         "variants": [
          {
           "variant": "RealtimeMcpProtocolError object { code, message, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "RealtimeMcpToolExecutionError object { message, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "RealtimeMcphttpError object { code, message, type }",
           "description": "",
           "fields": "…"
          }
         ]
        },
        {
         "name": "output",
         "type": "string or null",
         "required": false,
         "description": "The output from the tool call."
        }
       ]
      },
      {
       "variant": "RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }",
       "description": "A Realtime item requesting human approval of a tool invocation.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the approval request."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of arguments for the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool to run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server making the request."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_request\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_request`.",
         "enum": [
          "mcp_approval_request"
         ]
        }
       ]
      }
     ]
    },
    {
     "name": "type",
     "type": "\"conversation.item.create\"",
     "required": true,
     "description": "The event type, must be `conversation.item.create`.",
     "enum": [
      "conversation.item.create"
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": false,
     "description": "Optional client-generated ID used to identify this event."
    },
    {
     "name": "previous_item_id",
     "type": "string",
     "required": false,
     "description": "The ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to `root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added."
    }
   ]
  },
  "example": {
   "type": "conversation.item.create",
   "item": {
    "type": "message",
    "role": "user",
    "content": [
     {
      "type": "input_text",
      "text": "hi"
     }
    ]
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/client-events#conversation.item.create",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "client→server",
  "event": "conversation.item.retrieve",
  "description": "Send this event when you want to retrieve the server's representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD. The server will respond with a `conversation.item.retrieved` event, unless the item does not exist in the conversation history, in which case the server will respond with an error.",
  "schema": {
   "schema_name": "RealtimeClientEventConversationItemRetrieve",
   "fields": [
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the item to retrieve."
    },
    {
     "name": "type",
     "type": "\"conversation.item.retrieve\"",
     "required": true,
     "description": "The event type, must be `conversation.item.retrieve`.",
     "enum": [
      "conversation.item.retrieve"
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": false,
     "description": "Optional client-generated ID used to identify this event."
    }
   ]
  },
  "example": {
   "event_id": "event_901",
   "type": "conversation.item.retrieve",
   "item_id": "item_003"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/client-events#conversation.item.retrieve",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "client→server",
  "event": "conversation.item.truncate",
  "description": "Send this event to truncate a previous assistant message’s audio. The server will produce audio faster than realtime, so this event is useful when the user interrupts to truncate audio that has already been sent to the client but not yet played. This will synchronize the server's understanding of the audio with the client's playback. Truncating audio will delete the server-side text transcript to ensure there is not text in the context that hasn't been heard by the user. If successful, the server will respond with a `conversation.item.truncated` event.",
  "schema": {
   "schema_name": "RealtimeClientEventConversationItemTruncate",
   "fields": [
    {
     "name": "audio_end_ms",
     "type": "number",
     "required": true,
     "description": "Inclusive duration up to which audio is truncated, in milliseconds. If the audio_end_ms is greater than the actual audio duration, the server will respond with an error."
    },
    {
     "name": "content_index",
     "type": "number",
     "required": true,
     "description": "The index of the content part to truncate. Set this to `0`."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the assistant message item to truncate. Only assistant message items can be truncated."
    },
    {
     "name": "type",
     "type": "\"conversation.item.truncate\"",
     "required": true,
     "description": "The event type, must be `conversation.item.truncate`.",
     "enum": [
      "conversation.item.truncate"
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": false,
     "description": "Optional client-generated ID used to identify this event."
    }
   ]
  },
  "example": {
   "event_id": "event_678",
   "type": "conversation.item.truncate",
   "item_id": "item_002",
   "content_index": 0,
   "audio_end_ms": 1500
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/client-events#conversation.item.truncate",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "client→server",
  "event": "conversation.item.delete",
  "description": "Send this event when you want to remove any item from the conversation history. The server will respond with a `conversation.item.deleted` event, unless the item does not exist in the conversation history, in which case the server will respond with an error.",
  "schema": {
   "schema_name": "RealtimeClientEventConversationItemDelete",
   "fields": [
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the item to delete."
    },
    {
     "name": "type",
     "type": "\"conversation.item.delete\"",
     "required": true,
     "description": "The event type, must be `conversation.item.delete`.",
     "enum": [
      "conversation.item.delete"
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": false,
     "description": "Optional client-generated ID used to identify this event."
    }
   ]
  },
  "example": {
   "event_id": "event_901",
   "type": "conversation.item.delete",
   "item_id": "item_003"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/client-events#conversation.item.delete",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "client→server",
  "event": "response.create",
  "description": "This event instructs the server to create a Response, which means triggering model inference. When in Server VAD mode, the server will create Responses automatically. A Response will include at least one Item, and may have two, in which case the second will be a function call. These Items will be appended to the conversation history by default. The server will respond with a `response.created` event, events for Items and content created, and finally a `response.done` event to indicate the Response is complete. The `response.create` event includes inference configuration like `instructions` and `tools`. If these are set, they will override the Session's configuration for this Response only. Responses can be created out-of-band of the default Conversation, meaning that they can have arbitrary input, and it's possible to disable writing the output to the Conversation. Only one Response can write to the default Conversation at a time, but otherwise multiple Responses can be created in parallel. The `metadata` field is a good way to disambiguate multiple simultaneous Responses. Clients can set `conversation` to `none` to create a Response that does not write to the default Conversation. Arbitrary input can be provided with the `input` field, which is an array accepting raw Items and references to existing Items.",
  "schema": {
   "schema_name": "RealtimeClientEventResponseCreate",
   "fields": [
    {
     "name": "type",
     "type": "\"response.create\"",
     "required": true,
     "description": "The event type, must be `response.create`.",
     "enum": [
      "response.create"
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": false,
     "description": "Optional client-generated ID used to identify this event."
    },
    {
     "name": "response",
     "type": "RealtimeResponseCreateParams",
     "required": false,
     "description": "Create a new Realtime response with these parameters",
     "fields": [
      {
       "name": "audio",
       "type": "RealtimeResponseCreateAudioOutput",
       "required": false,
       "description": "Configuration for audio input and output.",
       "fields": "… 1 nested fields (see source)"
      },
      {
       "name": "conversation",
       "type": "string or \"auto\" or \"none\"",
       "required": false,
       "description": "Controls which conversation the response is added to. Currently supports `auto` and `none`, with `auto` as the default value. The `auto` value means that the contents of the response will be added to the default conversation. Set this to `none` to create an out-of-band response which will not add items to default conversation.",
       "variants": [
        {
         "variant": "\"auto\" or \"none\"",
         "description": "Controls which conversation the response is added to. Currently supports `auto` and `none`, with `auto` as the default value. The `auto` value means that the contents of the response will be added to the default conversation. Set this to `none` to create an out-of-band response which will not add items to default conversation.",
         "fields": "…"
        }
       ]
      },
      {
       "name": "input",
       "type": "array of ConversationItem",
       "required": false,
       "description": "Input items to include in the prompt for the model. Using this field creates a new context for this Response instead of using the default conversation. An empty array `[]` will clear the context for this Response. Note that this can include references to items that previously appeared in the session using their id.",
       "variants": [
        {
         "variant": "RealtimeConversationItemSystemMessage object { content, role, type, 3 more }",
         "description": "A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. \"the user is now asking about a different topic\"), use system messages.",
         "fields": "…"
        },
        {
         "variant": "RealtimeConversationItemUserMessage object { content, role, type, 3 more }",
         "description": "A user message item in a Realtime conversation.",
         "fields": "…"
        },
        {
         "variant": "RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }",
         "description": "An assistant message item in a Realtime conversation.",
         "fields": "…"
        },
        {
         "variant": "RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }",
         "description": "A function call item in a Realtime conversation.",
         "fields": "…"
        },
        {
         "variant": "RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }",
         "description": "A function call output item in a Realtime conversation.",
         "fields": "…"
        },
        {
         "variant": "RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }",
         "description": "A Realtime item responding to an MCP approval request.",
         "fields": "…"
        },
        {
         "variant": "RealtimeMcpListTools object { server_label, tools, type, id }",
         "description": "A Realtime item listing tools available on an MCP server.",
         "fields": "…"
        },
        {
         "variant": "RealtimeMcpToolCall object { id, arguments, name, 5 more }",
         "description": "A Realtime item representing an invocation of a tool on an MCP server.",
         "fields": "…"
        },
        {
         "variant": "RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }",
         "description": "A Realtime item requesting human approval of a tool invocation.",
         "fields": "…"
        }
       ]
      },
      {
       "name": "instructions",
       "type": "string",
       "required": false,
       "description": "The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion into your voice\", \"laugh frequently\"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session."
      },
      {
       "name": "max_output_tokens",
       "type": "number or \"inf\"",
       "required": false,
       "description": "Maximum number of output tokens for a single assistant response, inclusive of tool calls. Provide an integer between 1 and 4096 to limit output tokens, or `inf` for the maximum available tokens for a given model. Defaults to `inf`.",
       "enum": [
        "inf"
       ]
      },
      {
       "name": "metadata",
       "type": "Metadata or null",
       "required": false,
       "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters."
      },
      {
       "name": "output_modalities",
       "type": "array of \"text\" or \"audio\"",
       "required": false,
       "description": "The set of modalities the model used to respond, currently the only possible values are `[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the output to mode `text` will disable audio output from the model.",
       "enum": [
        "text",
        "audio"
       ]
      },
      {
       "name": "parallel_tool_calls",
       "type": "boolean",
       "required": false,
       "description": "Whether the model may call multiple tools in parallel. Only supported by reasoning Realtime models such as `gpt-realtime-2`."
      },
      {
       "name": "prompt",
       "type": "ResponsePrompt or null",
       "required": false,
       "description": "Reference to a prompt template and its variables. [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).",
       "fields": "… 3 nested fields (see source)"
      },
      {
       "name": "reasoning",
       "type": "RealtimeReasoning",
       "required": false,
       "description": "Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.",
       "fields": "… 1 nested fields (see source)"
      },
      {
       "name": "tool_choice",
       "type": "ToolChoiceOptions or ToolChoiceFunction or ToolChoiceMcp",
       "required": false,
       "description": "How the model chooses tools. Provide one of the string modes or force a specific function/MCP tool.",
       "variants": [
        {
         "variant": "ToolChoiceOptions = \"none\" or \"auto\" or \"required\"",
         "description": "Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools.",
         "fields": "…"
        },
        {
         "variant": "ToolChoiceFunction object { name, type }",
         "description": "Use this option to force the model to call a specific function.",
         "fields": "…"
        },
        {
         "variant": "ToolChoiceMcp object { server_label, type, name }",
         "description": "Use this option to force the model to call a specific tool on a remote MCP server.",
         "fields": "…"
        }
       ]
      },
      {
       "name": "tools",
       "type": "array of RealtimeFunctionTool or object { server_label, type, allowed_callers, 9 more }",
       "required": false,
       "description": "Tools available to the model.",
       "variants": [
        {
         "variant": "RealtimeFunctionTool object { description, name, parameters, type }",
         "description": "",
         "fields": "…"
        },
        {
         "variant": "McpTool object { server_label, type, allowed_callers, 9 more }",
         "description": "Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).",
         "fields": "…"
        }
       ]
      }
     ]
    }
   ]
  },
  "example": "// Trigger a response with the default Conversation and no special parameters\n{\n  \"type\": \"response.create\",\n}\n\n// Trigger an out-of-band response that does not write to the default Conversation\n{\n  \"type\": \"response.create\",\n  \"response\": {\n    \"instructions\": \"Provide a concise answer.\",\n    \"tools\": [], // clear any session tools\n    \"conversation\": \"none\",\n    \"output_modalities\": [\"text\"],\n    \"metadata\": {\n      \"response_purpose\": \"summarization\"\n    },\n    \"input\": [\n      {\n        \"type\": \"item_reference\",\n        \"id\": \"item_12345\"\n      },\n      {\n        \"type\": \"message\",\n        \"role\": \"user\",\n        \"content\": [\n          {\n            \"type\": \"input_text\",\n            \"text\": \"Summarize the above message in one sentence.\"\n          }\n        ]\n      }\n    ]\n  }\n}",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/client-events#response.create",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "client→server",
  "event": "response.cancel",
  "description": "Send this event to cancel an in-progress response. The server will respond with a `response.done` event with a status of `response.status=cancelled`. If there is no response to cancel, the server will respond with an error. It's safe to call `response.cancel` even if no response is in progress, an error will be returned the session will remain unaffected.",
  "schema": {
   "schema_name": "RealtimeClientEventResponseCancel",
   "fields": [
    {
     "name": "type",
     "type": "\"response.cancel\"",
     "required": true,
     "description": "The event type, must be `response.cancel`.",
     "enum": [
      "response.cancel"
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": false,
     "description": "Optional client-generated ID used to identify this event."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": false,
     "description": "A specific response ID to cancel - if not provided, will cancel an in-progress response in the default conversation."
    }
   ]
  },
  "example": {
   "type": "response.cancel",
   "response_id": "resp_12345"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/client-events#response.cancel",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "client→server",
  "event": "output_audio_buffer.clear",
  "description": "**WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to stop generating audio and emit a `output_audio_buffer.cleared` event. This event should be preceded by a `response.cancel` client event to stop the generation of the current response. [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).",
  "schema": {
   "schema_name": "RealtimeClientEventOutputAudioBufferClear",
   "fields": [
    {
     "name": "type",
     "type": "\"output_audio_buffer.clear\"",
     "required": true,
     "description": "The event type, must be `output_audio_buffer.clear`.",
     "enum": [
      "output_audio_buffer.clear"
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": false,
     "description": "The unique ID of the client event used for error handling."
    }
   ]
  },
  "example": {
   "event_id": "optional_client_event_id",
   "type": "output_audio_buffer.clear"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/client-events#output_audio_buffer.clear",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "session.created",
  "description": "Returned when a Session is created. Emitted automatically when a new connection is established as the first server event. This event will contain the default Session configuration.",
  "schema": {
   "schema_name": "RealtimeServerEventSessionCreated",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "session",
     "type": "RealtimeSessionCreateResponse or RealtimeTranscriptionSessionCreateResponse",
     "required": true,
     "description": "The session configuration.",
     "variants": [
      {
       "variant": "RealtimeSessionCreateResponse object { id, object, type, 13 more }",
       "description": "A Realtime session configuration object.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "Unique identifier for the session that looks like `sess_1234567890abcdef`."
        },
        {
         "name": "object",
         "type": "\"realtime.session\"",
         "required": true,
         "description": "The object type. Always `realtime.session`.",
         "enum": [
          "realtime.session"
         ]
        },
        {
         "name": "type",
         "type": "\"realtime\"",
         "required": true,
         "description": "The type of session to create. Always `realtime` for the Realtime API.",
         "enum": [
          "realtime"
         ]
        },
        {
         "name": "audio",
         "type": "object { input, output }",
         "required": false,
         "description": "Configuration for input and output audio.",
         "fields": "… 2 nested fields (see source)"
        },
        {
         "name": "expires_at",
         "type": "number",
         "required": false,
         "description": "Expiration timestamp for the session, in seconds since epoch."
        },
        {
         "name": "include",
         "type": "array of \"item.input_audio_transcription.logprobs\"",
         "required": false,
         "description": "Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.",
         "enum": [
          "item.input_audio_transcription.logprobs"
         ]
        },
        {
         "name": "instructions",
         "type": "string",
         "required": false,
         "description": "The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion into your voice\", \"laugh frequently\"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session."
        },
        {
         "name": "max_output_tokens",
         "type": "number or \"inf\"",
         "required": false,
         "description": "Maximum number of output tokens for a single assistant response, inclusive of tool calls. Provide an integer between 1 and 4096 to limit output tokens, or `inf` for the maximum available tokens for a given model. Defaults to `inf`.",
         "enum": [
          "inf"
         ]
        },
        {
         "name": "model",
         "type": "string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 more",
         "required": false,
         "description": "The Realtime model used for this session.",
         "variants": [
          {
           "variant": "\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 more",
           "description": "The Realtime model used for this session.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "output_modalities",
         "type": "array of \"text\" or \"audio\"",
         "required": false,
         "description": "The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating that the model will respond with audio plus a transcript. `[\"text\"]` can be used to make the model respond with text only. It is not possible to request both `text` and `audio` at the same time.",
         "enum": [
          "text",
          "audio"
         ]
        },
        {
         "name": "prompt",
         "type": "ResponsePrompt or null",
         "required": false,
         "description": "Reference to a prompt template and its variables. [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).",
         "fields": "… 3 nested fields (see source)"
        },
        {
         "name": "reasoning",
         "type": "RealtimeReasoning",
         "required": false,
         "description": "Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.",
         "fields": "… 1 nested fields (see source)"
        },
        {
         "name": "tool_choice",
         "type": "ToolChoiceOptions or ToolChoiceFunction or ToolChoiceMcp",
         "required": false,
         "description": "How the model chooses tools. Provide one of the string modes or force a specific function/MCP tool.",
         "variants": [
          {
           "variant": "ToolChoiceOptions = \"none\" or \"auto\" or \"required\"",
           "description": "Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools.",
           "fields": "…"
          },
          {
           "variant": "ToolChoiceFunction object { name, type }",
           "description": "Use this option to force the model to call a specific function.",
           "fields": "…"
          },
          {
           "variant": "ToolChoiceMcp object { server_label, type, name }",
           "description": "Use this option to force the model to call a specific tool on a remote MCP server.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "tools",
         "type": "array of RealtimeFunctionTool or object { server_label, type, allowed_callers, 9 more }",
         "required": false,
         "description": "Tools available to the model.",
         "variants": [
          {
           "variant": "RealtimeFunctionTool object { description, name, parameters, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "McpTool object { server_label, type, allowed_callers, 9 more }",
           "description": "Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).",
           "fields": "…"
          }
         ]
        },
        {
         "name": "tracing",
         "type": "\"auto\" or object { group_id, metadata, workflow_name }  or null",
         "required": false,
         "description": "Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once tracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the workflow name, group id, and metadata.",
         "variants": [
          {
           "variant": "Auto = \"auto\"",
           "description": "Enables tracing and sets default values for tracing configuration options. Always `auto`.",
           "fields": "…"
          },
          {
           "variant": "TracingConfiguration object { group_id, metadata, workflow_name }",
           "description": "Granular configuration for tracing.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "truncation",
         "type": "RealtimeTruncation",
         "required": false,
         "description": "When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.",
         "variants": [
          {
           "variant": "\"auto\" or \"disabled\"",
           "description": "The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.",
           "fields": "…"
          },
          {
           "variant": "RetentionRatioTruncation object { retention_ratio, type, token_limits }",
           "description": "Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.",
           "fields": "…"
          }
         ]
        }
       ]
      },
      {
       "variant": "RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more }",
       "description": "A Realtime transcription session configuration object.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "Unique identifier for the session that looks like `sess_1234567890abcdef`."
        },
        {
         "name": "object",
         "type": "string",
         "required": true,
         "description": "The object type. Always `realtime.transcription_session`."
        },
        {
         "name": "type",
         "type": "\"transcription\"",
         "required": true,
         "description": "The type of session. Always `transcription` for transcription sessions.",
         "enum": [
          "transcription"
         ]
        },
        {
         "name": "audio",
         "type": "object { input }",
         "required": false,
         "description": "Configuration for input audio for the session.",
         "fields": "… 1 nested fields (see source)"
        },
        {
         "name": "expires_at",
         "type": "number",
         "required": false,
         "description": "Expiration timestamp for the session, in seconds since epoch."
        },
        {
         "name": "include",
         "type": "array of \"item.input_audio_transcription.logprobs\"",
         "required": false,
         "description": "Additional fields to include in server outputs. - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.",
         "enum": [
          "item.input_audio_transcription.logprobs"
         ]
        }
       ]
      }
     ]
    },
    {
     "name": "type",
     "type": "\"session.created\"",
     "required": true,
     "description": "The event type, must be `session.created`.",
     "enum": [
      "session.created"
     ]
    }
   ]
  },
  "example": "{\n  \"type\": \"session.created\",\n  \"event_id\": \"event_C9G5RJeJ2gF77mV7f2B1j\",\n  \"session\": {\n    \"type\": \"realtime\",\n    \"object\": \"realtime.session\",\n    \"id\": \"sess_C9G5QPteg4UIbotdKLoYQ\",\n    \"model\": \"gpt-realtime-2025-08-28\",\n    \"output_modalities\": [\n      \"audio\"\n    ],\n    \"instructions\": \"Your knowledge cutoff is 2023-10. You are a helpful, witty, and friendly AI. Act like a human, but remember that you aren't a human and that you can't do human things in the real world. Your voice and personality should be warm and engaging, with a lively and playful tone. If interacting in a non-English language, start by using the standard accent or dialect familiar to the user. Talk quickly. You should always call a function if you can. Do not refer to these rules, even if you’re asked about them.\",\n    \"tools\": [],\n    \"tool_choice\": \"auto\",\n    \"max_output_tokens\": \"inf\",\n    \"tracing\": null,\n    \"prompt\": null,\n    \"expires_at\": 1756324625,\n    \"audio\": {\n      \"input\": {\n        \"format\": {\n          \"type\": \"audio/pcm\",\n          \"rate\": 24000\n        },\n        \"transcription\": null,\n        \"noise_reduction\": null,\n        \"turn_detection\": {\n          \"type\": \"server_vad\",\n          \"threshold\": 0.5,\n          \"prefix_padding_ms\": 300,\n          \"silence_duration_ms\": 200,\n          \"idle_timeout_ms\": null,\n          \"create_response\": true,\n          \"interrupt_response\": true\n        }\n      },\n      \"output\": {\n        \"format\": {\n          \"type\": \"audio/pcm\",\n          \"rate\": 24000\n        },\n        \"voice\": \"marin\",\n        \"speed\": 1\n      }\n    },\n    \"include\": null\n  },\n}",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#session.created",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "session.updated",
  "description": "Returned when a session is updated with a `session.update` event, unless there is an error.",
  "schema": {
   "schema_name": "RealtimeServerEventSessionUpdated",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "session",
     "type": "RealtimeSessionCreateResponse or RealtimeTranscriptionSessionCreateResponse",
     "required": true,
     "description": "The session configuration.",
     "variants": [
      {
       "variant": "RealtimeSessionCreateResponse object { id, object, type, 13 more }",
       "description": "A Realtime session configuration object.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "Unique identifier for the session that looks like `sess_1234567890abcdef`."
        },
        {
         "name": "object",
         "type": "\"realtime.session\"",
         "required": true,
         "description": "The object type. Always `realtime.session`.",
         "enum": [
          "realtime.session"
         ]
        },
        {
         "name": "type",
         "type": "\"realtime\"",
         "required": true,
         "description": "The type of session to create. Always `realtime` for the Realtime API.",
         "enum": [
          "realtime"
         ]
        },
        {
         "name": "audio",
         "type": "object { input, output }",
         "required": false,
         "description": "Configuration for input and output audio.",
         "fields": "… 2 nested fields (see source)"
        },
        {
         "name": "expires_at",
         "type": "number",
         "required": false,
         "description": "Expiration timestamp for the session, in seconds since epoch."
        },
        {
         "name": "include",
         "type": "array of \"item.input_audio_transcription.logprobs\"",
         "required": false,
         "description": "Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.",
         "enum": [
          "item.input_audio_transcription.logprobs"
         ]
        },
        {
         "name": "instructions",
         "type": "string",
         "required": false,
         "description": "The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion into your voice\", \"laugh frequently\"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session."
        },
        {
         "name": "max_output_tokens",
         "type": "number or \"inf\"",
         "required": false,
         "description": "Maximum number of output tokens for a single assistant response, inclusive of tool calls. Provide an integer between 1 and 4096 to limit output tokens, or `inf` for the maximum available tokens for a given model. Defaults to `inf`.",
         "enum": [
          "inf"
         ]
        },
        {
         "name": "model",
         "type": "string or \"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 more",
         "required": false,
         "description": "The Realtime model used for this session.",
         "variants": [
          {
           "variant": "\"gpt-realtime\" or \"gpt-realtime-1.5\" or \"gpt-realtime-2\" or 16 more",
           "description": "The Realtime model used for this session.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "output_modalities",
         "type": "array of \"text\" or \"audio\"",
         "required": false,
         "description": "The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating that the model will respond with audio plus a transcript. `[\"text\"]` can be used to make the model respond with text only. It is not possible to request both `text` and `audio` at the same time.",
         "enum": [
          "text",
          "audio"
         ]
        },
        {
         "name": "prompt",
         "type": "ResponsePrompt or null",
         "required": false,
         "description": "Reference to a prompt template and its variables. [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).",
         "fields": "… 3 nested fields (see source)"
        },
        {
         "name": "reasoning",
         "type": "RealtimeReasoning",
         "required": false,
         "description": "Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.",
         "fields": "… 1 nested fields (see source)"
        },
        {
         "name": "tool_choice",
         "type": "ToolChoiceOptions or ToolChoiceFunction or ToolChoiceMcp",
         "required": false,
         "description": "How the model chooses tools. Provide one of the string modes or force a specific function/MCP tool.",
         "variants": [
          {
           "variant": "ToolChoiceOptions = \"none\" or \"auto\" or \"required\"",
           "description": "Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools.",
           "fields": "…"
          },
          {
           "variant": "ToolChoiceFunction object { name, type }",
           "description": "Use this option to force the model to call a specific function.",
           "fields": "…"
          },
          {
           "variant": "ToolChoiceMcp object { server_label, type, name }",
           "description": "Use this option to force the model to call a specific tool on a remote MCP server.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "tools",
         "type": "array of RealtimeFunctionTool or object { server_label, type, allowed_callers, 9 more }",
         "required": false,
         "description": "Tools available to the model.",
         "variants": [
          {
           "variant": "RealtimeFunctionTool object { description, name, parameters, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "McpTool object { server_label, type, allowed_callers, 9 more }",
           "description": "Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).",
           "fields": "…"
          }
         ]
        },
        {
         "name": "tracing",
         "type": "\"auto\" or object { group_id, metadata, workflow_name }  or null",
         "required": false,
         "description": "Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once tracing is enabled for a session, the configuration cannot be modified. `auto` will create a trace for the session with default values for the workflow name, group id, and metadata.",
         "variants": [
          {
           "variant": "Auto = \"auto\"",
           "description": "Enables tracing and sets default values for tracing configuration options. Always `auto`.",
           "fields": "…"
          },
          {
           "variant": "TracingConfiguration object { group_id, metadata, workflow_name }",
           "description": "Granular configuration for tracing.",
           "fields": "…"
          }
         ]
        },
        {
         "name": "truncation",
         "type": "RealtimeTruncation",
         "required": false,
         "description": "When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost. Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate. Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.",
         "variants": [
          {
           "variant": "\"auto\" or \"disabled\"",
           "description": "The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.",
           "fields": "…"
          },
          {
           "variant": "RetentionRatioTruncation object { retention_ratio, type, token_limits }",
           "description": "Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.",
           "fields": "…"
          }
         ]
        }
       ]
      },
      {
       "variant": "RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more }",
       "description": "A Realtime transcription session configuration object.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "Unique identifier for the session that looks like `sess_1234567890abcdef`."
        },
        {
         "name": "object",
         "type": "string",
         "required": true,
         "description": "The object type. Always `realtime.transcription_session`."
        },
        {
         "name": "type",
         "type": "\"transcription\"",
         "required": true,
         "description": "The type of session. Always `transcription` for transcription sessions.",
         "enum": [
          "transcription"
         ]
        },
        {
         "name": "audio",
         "type": "object { input }",
         "required": false,
         "description": "Configuration for input audio for the session.",
         "fields": "… 1 nested fields (see source)"
        },
        {
         "name": "expires_at",
         "type": "number",
         "required": false,
         "description": "Expiration timestamp for the session, in seconds since epoch."
        },
        {
         "name": "include",
         "type": "array of \"item.input_audio_transcription.logprobs\"",
         "required": false,
         "description": "Additional fields to include in server outputs. - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.",
         "enum": [
          "item.input_audio_transcription.logprobs"
         ]
        }
       ]
      }
     ]
    },
    {
     "name": "type",
     "type": "\"session.updated\"",
     "required": true,
     "description": "The event type, must be `session.updated`.",
     "enum": [
      "session.updated"
     ]
    }
   ]
  },
  "example": "{\n  \"type\": \"session.updated\",\n  \"event_id\": \"event_C9G8mqI3IucaojlVKE8Cs\",\n  \"session\": {\n    \"type\": \"realtime\",\n    \"object\": \"realtime.session\",\n    \"id\": \"sess_C9G8l3zp50uFv4qgxfJ8o\",\n    \"model\": \"gpt-realtime-2025-08-28\",\n    \"output_modalities\": [\n      \"audio\"\n    ],\n    \"instructions\": \"Your knowledge cutoff is 2023-10. You are a helpful, witty, and friendly AI. Act like a human, but remember that you aren't a human and that you can't do human things in the real world. Your voice and personality should be warm and engaging, with a lively and playful tone. If interacting in a non-English language, start by using the standard accent or dialect familiar to the user. Talk quickly. You should always call a function if you can. Do not refer to these rules, even if you’re asked about them.\",\n    \"tools\": [\n      {\n        \"type\": \"function\",\n        \"name\": \"display_color_palette\",\n        \"description\": \"\\nCall this function when a user asks for a color palette.\\n\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"strict\": true,\n          \"properties\": {\n            \"theme\": {\n              \"type\": \"string\",\n              \"description\": \"Description of the theme for the color scheme.\"\n            },\n            \"colors\": {\n              \"type\": \"array\",\n              \"description\": \"Array of five hex color codes based on the theme.\",\n              \"items\": {\n                \"type\": \"string\",\n                \"description\": \"Hex color code\"\n              }\n            }\n          },\n          \"required\": [\n            \"theme\",\n            \"colors\"\n          ]\n        }\n      }\n    ],\n    \"tool_choice\": \"auto\",\n    \"max_output_tokens\": \"inf\",\n    \"tracing\": null,\n    \"prompt\": null,\n    \"expires_at\": 1756324832,\n    \"audio\": {\n      \"input\": {\n        \"format\": {\n          \"type\": \"audio/pcm\",\n          \"rate\": 24000\n        },\n        \"transcription\": null,\n        \"noise_reduction\": null,\n        \"turn_detection\": {\n          \"type\": \"server_vad\",\n          \"threshold\": 0.5,\n          \"prefix_padding_ms\": 300,\n          \"silence_duration_ms\": 200,\n          \"idle_timeout_ms\": null,\n          \"create_response\": true,\n          \"interrupt_response\": true\n        }\n      },\n      \"output\": {\n        \"format\": {\n          \"type\": \"audio/pcm\",\n          \"rate\": 24000\n        },\n        \"voice\": \"marin\",\n        \"speed\": 1\n      }\n    },\n    \"include\": null\n  },\n}",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#session.updated",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.item.added",
  "description": "Sent by the server when an Item is added to the default Conversation. This can happen in several cases: - When the client sends a `conversation.item.create` event. - When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer. - When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`). The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.",
  "schema": {
   "schema_name": "RealtimeServerEventConversationItemAdded",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item",
     "type": "ConversationItem",
     "required": true,
     "description": "A single item within a Realtime conversation.",
     "variants": [
      {
       "variant": "RealtimeConversationItemSystemMessage object { content, role, type, 3 more }",
       "description": "A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. \"the user is now asking about a different topic\"), use system messages.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { text, type }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 2 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"system\"",
         "required": true,
         "description": "The role of the message sender. Always `system`.",
         "enum": [
          "system"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemUserMessage object { content, role, type, 3 more }",
       "description": "A user message item in a Realtime conversation.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { audio, detail, image_url, 3 more }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 6 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"user\"",
         "required": true,
         "description": "The role of the message sender. Always `user`.",
         "enum": [
          "user"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }",
       "description": "An assistant message item in a Realtime conversation.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { audio, text, transcript, type }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 4 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"assistant\"",
         "required": true,
         "description": "The role of the message sender. Always `assistant`.",
         "enum": [
          "assistant"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }",
       "description": "A function call item in a Realtime conversation.",
       "fields": [
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the function being called."
        },
        {
         "name": "type",
         "type": "\"function_call\"",
         "required": true,
         "description": "The type of the item. Always `function_call`.",
         "enum": [
          "function_call"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "call_id",
         "type": "string",
         "required": false,
         "description": "The ID of the function call."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }",
       "description": "A function call output item in a Realtime conversation.",
       "fields": [
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The ID of the function call this output is for."
        },
        {
         "name": "output",
         "type": "string",
         "required": true,
         "description": "The output of the function call, this is free text and can contain any information or simply be empty."
        },
        {
         "name": "type",
         "type": "\"function_call_output\"",
         "required": true,
         "description": "The type of the item. Always `function_call_output`.",
         "enum": [
          "function_call_output"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }",
       "description": "A Realtime item responding to an MCP approval request.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the approval response."
        },
        {
         "name": "approval_request_id",
         "type": "string",
         "required": true,
         "description": "The ID of the approval request being answered."
        },
        {
         "name": "approve",
         "type": "boolean",
         "required": true,
         "description": "Whether the request was approved."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_response\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_response`.",
         "enum": [
          "mcp_approval_response"
         ]
        },
        {
         "name": "reason",
         "type": "string or null",
         "required": false,
         "description": "Optional reason for the decision."
        }
       ]
      },
      {
       "variant": "RealtimeMcpListTools object { server_label, tools, type, id }",
       "description": "A Realtime item listing tools available on an MCP server.",
       "fields": [
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server."
        },
        {
         "name": "tools",
         "type": "array of object { input_schema, name, annotations, description }",
         "required": true,
         "description": "The tools available on the server.",
         "fields": "… 4 nested fields (see source)"
        },
        {
         "name": "type",
         "type": "\"mcp_list_tools\"",
         "required": true,
         "description": "The type of the item. Always `mcp_list_tools`.",
         "enum": [
          "mcp_list_tools"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the list."
        }
       ]
      },
      {
       "variant": "RealtimeMcpToolCall object { id, arguments, name, 5 more }",
       "description": "A Realtime item representing an invocation of a tool on an MCP server.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the tool call."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of the arguments passed to the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool that was run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server running the tool."
        },
        {
         "name": "type",
         "type": "\"mcp_call\"",
         "required": true,
         "description": "The type of the item. Always `mcp_call`.",
         "enum": [
          "mcp_call"
         ]
        },
        {
         "name": "approval_request_id",
         "type": "string or null",
         "required": false,
         "description": "The ID of an associated approval request, if any."
        },
        {
         "name": "error",
         "type": "RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null",
         "required": false,
         "description": "The error from the tool call, if any.",
         "variants": [
          {
           "variant": "RealtimeMcpProtocolError object { code, message, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "RealtimeMcpToolExecutionError object { message, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "RealtimeMcphttpError object { code, message, type }",
           "description": "",
           "fields": "…"
          }
         ]
        },
        {
         "name": "output",
         "type": "string or null",
         "required": false,
         "description": "The output from the tool call."
        }
       ]
      },
      {
       "variant": "RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }",
       "description": "A Realtime item requesting human approval of a tool invocation.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the approval request."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of arguments for the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool to run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server making the request."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_request\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_request`.",
         "enum": [
          "mcp_approval_request"
         ]
        }
       ]
      }
     ]
    },
    {
     "name": "type",
     "type": "\"conversation.item.added\"",
     "required": true,
     "description": "The event type, must be `conversation.item.added`.",
     "enum": [
      "conversation.item.added"
     ]
    },
    {
     "name": "previous_item_id",
     "type": "string or null",
     "required": false,
     "description": "The ID of the item that precedes this one, if any. This is used to maintain ordering when items are inserted."
    }
   ]
  },
  "example": {
   "type": "conversation.item.added",
   "event_id": "event_C9G8pjSJCfRNEhMEnYAVy",
   "previous_item_id": null,
   "item": {
    "id": "item_C9G8pGVKYnaZu8PH5YQ9O",
    "type": "message",
    "status": "completed",
    "role": "user",
    "content": [
     {
      "type": "input_text",
      "text": "hi"
     }
    ]
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#conversation.item.added",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.item.done",
  "description": "Returned when a conversation item is finalized. The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.",
  "schema": {
   "schema_name": "RealtimeServerEventConversationItemDone",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item",
     "type": "ConversationItem",
     "required": true,
     "description": "A single item within a Realtime conversation.",
     "variants": [
      {
       "variant": "RealtimeConversationItemSystemMessage object { content, role, type, 3 more }",
       "description": "A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. \"the user is now asking about a different topic\"), use system messages.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { text, type }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 2 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"system\"",
         "required": true,
         "description": "The role of the message sender. Always `system`.",
         "enum": [
          "system"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemUserMessage object { content, role, type, 3 more }",
       "description": "A user message item in a Realtime conversation.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { audio, detail, image_url, 3 more }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 6 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"user\"",
         "required": true,
         "description": "The role of the message sender. Always `user`.",
         "enum": [
          "user"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }",
       "description": "An assistant message item in a Realtime conversation.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { audio, text, transcript, type }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 4 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"assistant\"",
         "required": true,
         "description": "The role of the message sender. Always `assistant`.",
         "enum": [
          "assistant"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }",
       "description": "A function call item in a Realtime conversation.",
       "fields": [
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the function being called."
        },
        {
         "name": "type",
         "type": "\"function_call\"",
         "required": true,
         "description": "The type of the item. Always `function_call`.",
         "enum": [
          "function_call"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "call_id",
         "type": "string",
         "required": false,
         "description": "The ID of the function call."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }",
       "description": "A function call output item in a Realtime conversation.",
       "fields": [
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The ID of the function call this output is for."
        },
        {
         "name": "output",
         "type": "string",
         "required": true,
         "description": "The output of the function call, this is free text and can contain any information or simply be empty."
        },
        {
         "name": "type",
         "type": "\"function_call_output\"",
         "required": true,
         "description": "The type of the item. Always `function_call_output`.",
         "enum": [
          "function_call_output"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }",
       "description": "A Realtime item responding to an MCP approval request.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the approval response."
        },
        {
         "name": "approval_request_id",
         "type": "string",
         "required": true,
         "description": "The ID of the approval request being answered."
        },
        {
         "name": "approve",
         "type": "boolean",
         "required": true,
         "description": "Whether the request was approved."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_response\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_response`.",
         "enum": [
          "mcp_approval_response"
         ]
        },
        {
         "name": "reason",
         "type": "string or null",
         "required": false,
         "description": "Optional reason for the decision."
        }
       ]
      },
      {
       "variant": "RealtimeMcpListTools object { server_label, tools, type, id }",
       "description": "A Realtime item listing tools available on an MCP server.",
       "fields": [
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server."
        },
        {
         "name": "tools",
         "type": "array of object { input_schema, name, annotations, description }",
         "required": true,
         "description": "The tools available on the server.",
         "fields": "… 4 nested fields (see source)"
        },
        {
         "name": "type",
         "type": "\"mcp_list_tools\"",
         "required": true,
         "description": "The type of the item. Always `mcp_list_tools`.",
         "enum": [
          "mcp_list_tools"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the list."
        }
       ]
      },
      {
       "variant": "RealtimeMcpToolCall object { id, arguments, name, 5 more }",
       "description": "A Realtime item representing an invocation of a tool on an MCP server.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the tool call."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of the arguments passed to the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool that was run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server running the tool."
        },
        {
         "name": "type",
         "type": "\"mcp_call\"",
         "required": true,
         "description": "The type of the item. Always `mcp_call`.",
         "enum": [
          "mcp_call"
         ]
        },
        {
         "name": "approval_request_id",
         "type": "string or null",
         "required": false,
         "description": "The ID of an associated approval request, if any."
        },
        {
         "name": "error",
         "type": "RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null",
         "required": false,
         "description": "The error from the tool call, if any.",
         "variants": [
          {
           "variant": "RealtimeMcpProtocolError object { code, message, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "RealtimeMcpToolExecutionError object { message, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "RealtimeMcphttpError object { code, message, type }",
           "description": "",
           "fields": "…"
          }
         ]
        },
        {
         "name": "output",
         "type": "string or null",
         "required": false,
         "description": "The output from the tool call."
        }
       ]
      },
      {
       "variant": "RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }",
       "description": "A Realtime item requesting human approval of a tool invocation.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the approval request."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of arguments for the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool to run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server making the request."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_request\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_request`.",
         "enum": [
          "mcp_approval_request"
         ]
        }
       ]
      }
     ]
    },
    {
     "name": "type",
     "type": "\"conversation.item.done\"",
     "required": true,
     "description": "The event type, must be `conversation.item.done`.",
     "enum": [
      "conversation.item.done"
     ]
    },
    {
     "name": "previous_item_id",
     "type": "string or null",
     "required": false,
     "description": "The ID of the item that precedes this one, if any. This is used to maintain ordering when items are inserted."
    }
   ]
  },
  "example": {
   "type": "conversation.item.done",
   "event_id": "event_CCXLgMZPo3qioWCeQa4WH",
   "previous_item_id": "item_CCXLecNJVIVR2HUy3ABLj",
   "item": {
    "id": "item_CCXLfxmM5sXVJVz4mCa2S",
    "type": "message",
    "status": "completed",
    "role": "assistant",
    "content": [
     {
      "type": "output_audio",
      "transcript": "Oh, I can hear you loud and clear! Sounds like we're connected just fine. What can I help you with today?"
     }
    ]
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#conversation.item.done",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.item.retrieved",
  "description": "Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server's representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.",
  "schema": {
   "schema_name": "RealtimeServerEventConversationItemRetrieved",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item",
     "type": "ConversationItem",
     "required": true,
     "description": "A single item within a Realtime conversation.",
     "variants": [
      {
       "variant": "RealtimeConversationItemSystemMessage object { content, role, type, 3 more }",
       "description": "A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. \"the user is now asking about a different topic\"), use system messages.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { text, type }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 2 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"system\"",
         "required": true,
         "description": "The role of the message sender. Always `system`.",
         "enum": [
          "system"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemUserMessage object { content, role, type, 3 more }",
       "description": "A user message item in a Realtime conversation.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { audio, detail, image_url, 3 more }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 6 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"user\"",
         "required": true,
         "description": "The role of the message sender. Always `user`.",
         "enum": [
          "user"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }",
       "description": "An assistant message item in a Realtime conversation.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { audio, text, transcript, type }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 4 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"assistant\"",
         "required": true,
         "description": "The role of the message sender. Always `assistant`.",
         "enum": [
          "assistant"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }",
       "description": "A function call item in a Realtime conversation.",
       "fields": [
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the function being called."
        },
        {
         "name": "type",
         "type": "\"function_call\"",
         "required": true,
         "description": "The type of the item. Always `function_call`.",
         "enum": [
          "function_call"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "call_id",
         "type": "string",
         "required": false,
         "description": "The ID of the function call."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }",
       "description": "A function call output item in a Realtime conversation.",
       "fields": [
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The ID of the function call this output is for."
        },
        {
         "name": "output",
         "type": "string",
         "required": true,
         "description": "The output of the function call, this is free text and can contain any information or simply be empty."
        },
        {
         "name": "type",
         "type": "\"function_call_output\"",
         "required": true,
         "description": "The type of the item. Always `function_call_output`.",
         "enum": [
          "function_call_output"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }",
       "description": "A Realtime item responding to an MCP approval request.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the approval response."
        },
        {
         "name": "approval_request_id",
         "type": "string",
         "required": true,
         "description": "The ID of the approval request being answered."
        },
        {
         "name": "approve",
         "type": "boolean",
         "required": true,
         "description": "Whether the request was approved."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_response\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_response`.",
         "enum": [
          "mcp_approval_response"
         ]
        },
        {
         "name": "reason",
         "type": "string or null",
         "required": false,
         "description": "Optional reason for the decision."
        }
       ]
      },
      {
       "variant": "RealtimeMcpListTools object { server_label, tools, type, id }",
       "description": "A Realtime item listing tools available on an MCP server.",
       "fields": [
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server."
        },
        {
         "name": "tools",
         "type": "array of object { input_schema, name, annotations, description }",
         "required": true,
         "description": "The tools available on the server.",
         "fields": "… 4 nested fields (see source)"
        },
        {
         "name": "type",
         "type": "\"mcp_list_tools\"",
         "required": true,
         "description": "The type of the item. Always `mcp_list_tools`.",
         "enum": [
          "mcp_list_tools"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the list."
        }
       ]
      },
      {
       "variant": "RealtimeMcpToolCall object { id, arguments, name, 5 more }",
       "description": "A Realtime item representing an invocation of a tool on an MCP server.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the tool call."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of the arguments passed to the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool that was run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server running the tool."
        },
        {
         "name": "type",
         "type": "\"mcp_call\"",
         "required": true,
         "description": "The type of the item. Always `mcp_call`.",
         "enum": [
          "mcp_call"
         ]
        },
        {
         "name": "approval_request_id",
         "type": "string or null",
         "required": false,
         "description": "The ID of an associated approval request, if any."
        },
        {
         "name": "error",
         "type": "RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null",
         "required": false,
         "description": "The error from the tool call, if any.",
         "variants": [
          {
           "variant": "RealtimeMcpProtocolError object { code, message, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "RealtimeMcpToolExecutionError object { message, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "RealtimeMcphttpError object { code, message, type }",
           "description": "",
           "fields": "…"
          }
         ]
        },
        {
         "name": "output",
         "type": "string or null",
         "required": false,
         "description": "The output from the tool call."
        }
       ]
      },
      {
       "variant": "RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }",
       "description": "A Realtime item requesting human approval of a tool invocation.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the approval request."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of arguments for the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool to run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server making the request."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_request\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_request`.",
         "enum": [
          "mcp_approval_request"
         ]
        }
       ]
      }
     ]
    },
    {
     "name": "type",
     "type": "\"conversation.item.retrieved\"",
     "required": true,
     "description": "The event type, must be `conversation.item.retrieved`.",
     "enum": [
      "conversation.item.retrieved"
     ]
    }
   ]
  },
  "example": {
   "type": "conversation.item.retrieved",
   "event_id": "event_CCXGSizgEppa2d4XbKA7K",
   "item": {
    "id": "item_CCXGRxbY0n6WE4EszhF5w",
    "object": "realtime.item",
    "type": "message",
    "status": "completed",
    "role": "assistant",
    "content": [
     {
      "type": "audio",
      "transcript": "Yes, I can hear you loud and clear. How can I help you today?",
      "audio": "8//2//v/9//q/+//+P/s...",
      "format": "pcm16"
     }
    ]
   }
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#conversation.item.retrieved",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.item.input_audio_transcription.completed",
  "description": "This event is the output of audio transcription for user audio written to the user audio buffer. Transcription begins when the input audio buffer is committed by the client or server (when VAD is enabled). Transcription runs asynchronously with Response creation, so this event may come before or after the Response events. Realtime API models accept audio natively, and thus input transcription is a separate process run on a separate ASR (Automatic Speech Recognition) model. The transcript may diverge somewhat from the model's interpretation, and should be treated as a rough guide.",
  "schema": {
   "schema_name": "RealtimeServerEventConversationItemInputAudioTranscriptionCompleted",
   "fields": [
    {
     "name": "content_index",
     "type": "number",
     "required": true,
     "description": "The index of the content part containing the audio."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the item containing the audio that is being transcribed."
    },
    {
     "name": "transcript",
     "type": "string",
     "required": true,
     "description": "The transcribed text."
    },
    {
     "name": "type",
     "type": "\"conversation.item.input_audio_transcription.completed\"",
     "required": true,
     "description": "The event type, must be `conversation.item.input_audio_transcription.completed`.",
     "enum": [
      "conversation.item.input_audio_transcription.completed"
     ]
    },
    {
     "name": "usage",
     "type": "object { input_tokens, output_tokens, total_tokens, 2 more }  or object { seconds, type }",
     "required": true,
     "description": "Usage statistics for the transcription, this is billed according to the ASR model's pricing rather than the realtime model's pricing.",
     "variants": [
      {
       "variant": "Tokens object { input_tokens, output_tokens, total_tokens, 2 more }",
       "description": "Usage statistics for models billed by token usage.",
       "fields": [
        {
         "name": "input_tokens",
         "type": "number",
         "required": true,
         "description": "Number of input tokens billed for this request."
        },
        {
         "name": "output_tokens",
         "type": "number",
         "required": true,
         "description": "Number of output tokens generated."
        },
        {
         "name": "total_tokens",
         "type": "number",
         "required": true,
         "description": "Total number of tokens used (input + output)."
        },
        {
         "name": "type",
         "type": "\"tokens\"",
         "required": true,
         "description": "The type of the usage object. Always `tokens` for this variant.",
         "enum": [
          "tokens"
         ]
        },
        {
         "name": "input_token_details",
         "type": "object { audio_tokens, text_tokens }",
         "required": false,
         "description": "Details about the input tokens billed for this request.",
         "fields": "… 2 nested fields (see source)"
        }
       ]
      },
      {
       "variant": "Duration object { seconds, type }",
       "description": "Usage statistics for models billed by audio input duration.",
       "fields": [
        {
         "name": "seconds",
         "type": "number",
         "required": true,
         "description": "Duration of the input audio in seconds."
        },
        {
         "name": "type",
         "type": "\"duration\"",
         "required": true,
         "description": "The type of the usage object. Always `duration` for this variant.",
         "enum": [
          "duration"
         ]
        }
       ]
      }
     ]
    },
    {
     "name": "languages",
     "type": "array of TranscriptionLanguage",
     "required": false,
     "description": "The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.",
     "fields": [
      {
       "name": "code",
       "type": "string",
       "required": true,
       "description": "The code of a language detected in the audio."
      }
     ]
    },
    {
     "name": "logprobs",
     "type": "array of LogProbProperties or null",
     "required": false,
     "description": "The log probabilities of the transcription.",
     "fields": [
      {
       "name": "token",
       "type": "string",
       "required": true,
       "description": "The token that was used to generate the log probability."
      },
      {
       "name": "bytes",
       "type": "array of number",
       "required": true,
       "description": "The bytes that were used to generate the log probability."
      },
      {
       "name": "logprob",
       "type": "number",
       "required": true,
       "description": "The log probability of the token."
      }
     ]
    }
   ]
  },
  "example": {
   "type": "conversation.item.input_audio_transcription.completed",
   "event_id": "event_CCXGRvtUVrax5SJAnNOWZ",
   "item_id": "item_CCXGQ4e1ht4cOraEYcuR2",
   "content_index": 0,
   "transcript": "Hey, can you hear me?",
   "usage": {
    "type": "tokens",
    "total_tokens": 22,
    "input_tokens": 13,
    "input_token_details": {
     "text_tokens": 0,
     "audio_tokens": 13
    },
    "output_tokens": 9
   }
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#conversation.item.input_audio_transcription.completed",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.item.input_audio_transcription.delta",
  "description": "Returned when the text value of an input audio transcription content part is updated with incremental transcription results.",
  "schema": {
   "schema_name": "RealtimeServerEventConversationItemInputAudioTranscriptionDelta",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the item containing the audio that is being transcribed."
    },
    {
     "name": "type",
     "type": "\"conversation.item.input_audio_transcription.delta\"",
     "required": true,
     "description": "The event type, must be `conversation.item.input_audio_transcription.delta`.",
     "enum": [
      "conversation.item.input_audio_transcription.delta"
     ]
    },
    {
     "name": "content_index",
     "type": "number",
     "required": false,
     "description": "The index of the content part in the item's content array."
    },
    {
     "name": "delta",
     "type": "string",
     "required": false,
     "description": "The text delta."
    },
    {
     "name": "logprobs",
     "type": "array of LogProbProperties or null",
     "required": false,
     "description": "The log probabilities of the transcription. These can be enabled by configurating the session with `\"include\": [\"item.input_audio_transcription.logprobs\"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.",
     "fields": [
      {
       "name": "token",
       "type": "string",
       "required": true,
       "description": "The token that was used to generate the log probability."
      },
      {
       "name": "bytes",
       "type": "array of number",
       "required": true,
       "description": "The bytes that were used to generate the log probability."
      },
      {
       "name": "logprob",
       "type": "number",
       "required": true,
       "description": "The log probability of the token."
      }
     ]
    }
   ]
  },
  "example": {
   "type": "conversation.item.input_audio_transcription.delta",
   "event_id": "event_CCXGRxsAimPAs8kS2Wc7Z",
   "item_id": "item_CCXGQ4e1ht4cOraEYcuR2",
   "content_index": 0,
   "delta": "Hey",
   "obfuscation": "aLxx0jTEciOGe"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#conversation.item.input_audio_transcription.delta",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.item.input_audio_transcription.segment",
  "description": "Returned when an input audio transcription segment is identified for an item.",
  "schema": {
   "schema_name": "RealtimeServerEventConversationItemInputAudioTranscriptionSegment",
   "fields": [
    {
     "name": "id",
     "type": "string",
     "required": true,
     "description": "The segment identifier."
    },
    {
     "name": "content_index",
     "type": "number",
     "required": true,
     "description": "The index of the input audio content part within the item."
    },
    {
     "name": "end",
     "type": "number",
     "required": true,
     "description": "End time of the segment in seconds."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the item containing the input audio content."
    },
    {
     "name": "speaker",
     "type": "string",
     "required": true,
     "description": "The detected speaker label for this segment."
    },
    {
     "name": "start",
     "type": "number",
     "required": true,
     "description": "Start time of the segment in seconds."
    },
    {
     "name": "text",
     "type": "string",
     "required": true,
     "description": "The text for this segment."
    },
    {
     "name": "type",
     "type": "\"conversation.item.input_audio_transcription.segment\"",
     "required": true,
     "description": "The event type, must be `conversation.item.input_audio_transcription.segment`.",
     "enum": [
      "conversation.item.input_audio_transcription.segment"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_6501",
   "type": "conversation.item.input_audio_transcription.segment",
   "item_id": "msg_011",
   "content_index": 0,
   "text": "hello",
   "id": "seg_0001",
   "speaker": "spk_1",
   "start": 0.0,
   "end": 0.4
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#conversation.item.input_audio_transcription.segment",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.item.input_audio_transcription.failed",
  "description": "Returned when input audio transcription is configured, and a transcription request for a user message failed. These events are separate from other `error` events so that the client can identify the related Item.",
  "schema": {
   "schema_name": "RealtimeServerEventConversationItemInputAudioTranscriptionFailed",
   "fields": [
    {
     "name": "content_index",
     "type": "number",
     "required": true,
     "description": "The index of the content part containing the audio."
    },
    {
     "name": "error",
     "type": "object { code, message, param, type }",
     "required": true,
     "description": "Details of the transcription error.",
     "fields": [
      {
       "name": "code",
       "type": "string",
       "required": false,
       "description": "Error code, if any."
      },
      {
       "name": "message",
       "type": "string",
       "required": false,
       "description": "A human-readable error message."
      },
      {
       "name": "param",
       "type": "string",
       "required": false,
       "description": "Parameter related to the error, if any."
      },
      {
       "name": "type",
       "type": "string",
       "required": false,
       "description": "The type of error."
      }
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the user message item."
    },
    {
     "name": "type",
     "type": "\"conversation.item.input_audio_transcription.failed\"",
     "required": true,
     "description": "The event type, must be `conversation.item.input_audio_transcription.failed`.",
     "enum": [
      "conversation.item.input_audio_transcription.failed"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_2324",
   "type": "conversation.item.input_audio_transcription.failed",
   "item_id": "msg_003",
   "content_index": 0,
   "error": {
    "type": "transcription_error",
    "code": "audio_unintelligible",
    "message": "The audio could not be transcribed.",
    "param": null
   }
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#conversation.item.input_audio_transcription.failed",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.item.truncated",
  "description": "Returned when an earlier assistant audio message item is truncated by the client with a `conversation.item.truncate` event. This event is used to synchronize the server's understanding of the audio with the client's playback. This action will truncate the audio and remove the server-side text transcript to ensure there is no text in the context that hasn't been heard by the user.",
  "schema": {
   "schema_name": "RealtimeServerEventConversationItemTruncated",
   "fields": [
    {
     "name": "audio_end_ms",
     "type": "number",
     "required": true,
     "description": "The duration up to which the audio was truncated, in milliseconds."
    },
    {
     "name": "content_index",
     "type": "number",
     "required": true,
     "description": "The index of the content part that was truncated."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the assistant message item that was truncated."
    },
    {
     "name": "type",
     "type": "\"conversation.item.truncated\"",
     "required": true,
     "description": "The event type, must be `conversation.item.truncated`.",
     "enum": [
      "conversation.item.truncated"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_2526",
   "type": "conversation.item.truncated",
   "item_id": "msg_004",
   "content_index": 0,
   "audio_end_ms": 1500
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#conversation.item.truncated",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.item.deleted",
  "description": "Returned when an item in the conversation is deleted by the client with a `conversation.item.delete` event. This event is used to synchronize the server's understanding of the conversation history with the client's view.",
  "schema": {
   "schema_name": "RealtimeServerEventConversationItemDeleted",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the item that was deleted."
    },
    {
     "name": "type",
     "type": "\"conversation.item.deleted\"",
     "required": true,
     "description": "The event type, must be `conversation.item.deleted`.",
     "enum": [
      "conversation.item.deleted"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_2728",
   "type": "conversation.item.deleted",
   "item_id": "msg_005"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#conversation.item.deleted",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "input_audio_buffer.committed",
  "description": "Returned when an input audio buffer is committed, either by the client or automatically in server VAD mode. The `item_id` property is the ID of the user message item that will be created, thus a `conversation.item.created` event will also be sent to the client.",
  "schema": {
   "schema_name": "RealtimeServerEventInputAudioBufferCommitted",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the user message item that will be created."
    },
    {
     "name": "type",
     "type": "\"input_audio_buffer.committed\"",
     "required": true,
     "description": "The event type, must be `input_audio_buffer.committed`.",
     "enum": [
      "input_audio_buffer.committed"
     ]
    },
    {
     "name": "previous_item_id",
     "type": "string or null",
     "required": false,
     "description": "The ID of the preceding item after which the new item will be inserted. Can be `null` if the item has no predecessor."
    }
   ]
  },
  "example": {
   "event_id": "event_1121",
   "type": "input_audio_buffer.committed",
   "previous_item_id": "msg_001",
   "item_id": "msg_002"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#input_audio_buffer.committed",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "input_audio_buffer.dtmf_event_received",
  "description": "**SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that represents a telephone keypad press (0–9, *, #, A–D). The `event` property is the keypad that the user press. The `received_at` is the UTC Unix Timestamp that the server received the event.",
  "schema": {
   "schema_name": "RealtimeServerEventInputAudioBufferDtmfEventReceived",
   "fields": [
    {
     "name": "event",
     "type": "string",
     "required": true,
     "description": "The telephone keypad that was pressed by the user."
    },
    {
     "name": "received_at",
     "type": "number",
     "required": true,
     "description": "UTC Unix Timestamp when DTMF Event was received by server."
    },
    {
     "name": "type",
     "type": "\"input_audio_buffer.dtmf_event_received\"",
     "required": true,
     "description": "The event type, must be `input_audio_buffer.dtmf_event_received`.",
     "enum": [
      "input_audio_buffer.dtmf_event_received"
     ]
    }
   ]
  },
  "example": "{\n    \"type\":\" input_audio_buffer.dtmf_event_received\",\n    \"event\": \"9\",\n    \"received_at\": 1763605109,\n}",
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#input_audio_buffer.dtmf_event_received",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "input_audio_buffer.cleared",
  "description": "Returned when the input audio buffer is cleared by the client with a `input_audio_buffer.clear` event.",
  "schema": {
   "schema_name": "RealtimeServerEventInputAudioBufferCleared",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "type",
     "type": "\"input_audio_buffer.cleared\"",
     "required": true,
     "description": "The event type, must be `input_audio_buffer.cleared`.",
     "enum": [
      "input_audio_buffer.cleared"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_1314",
   "type": "input_audio_buffer.cleared"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#input_audio_buffer.cleared",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "input_audio_buffer.speech_started",
  "description": "Sent by the server when in `server_vad` mode to indicate that speech has been detected in the audio buffer. This can happen any time audio is added to the buffer (unless speech is already detected). The client may want to use this event to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event when speech stops. The `item_id` property is the ID of the user message item that will be created when speech stops and will also be included in the `input_audio_buffer.speech_stopped` event (unless the client manually commits the audio buffer during VAD activation).",
  "schema": {
   "schema_name": "RealtimeServerEventInputAudioBufferSpeechStarted",
   "fields": [
    {
     "name": "audio_start_ms",
     "type": "number",
     "required": true,
     "description": "Milliseconds from the start of all audio written to the buffer during the session when speech was first detected. This will correspond to the beginning of audio sent to the model, and thus includes the `prefix_padding_ms` configured in the Session."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the user message item that will be created when speech stops."
    },
    {
     "name": "type",
     "type": "\"input_audio_buffer.speech_started\"",
     "required": true,
     "description": "The event type, must be `input_audio_buffer.speech_started`.",
     "enum": [
      "input_audio_buffer.speech_started"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_1516",
   "type": "input_audio_buffer.speech_started",
   "audio_start_ms": 1000,
   "item_id": "msg_003"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#input_audio_buffer.speech_started",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "input_audio_buffer.speech_stopped",
  "description": "Returned in `server_vad` mode when the server detects the end of speech in the audio buffer. The server will also send an `conversation.item.created` event with the user message item that is created from the audio buffer.",
  "schema": {
   "schema_name": "RealtimeServerEventInputAudioBufferSpeechStopped",
   "fields": [
    {
     "name": "audio_end_ms",
     "type": "number",
     "required": true,
     "description": "Milliseconds since the session started when speech stopped. This will correspond to the end of audio sent to the model, and thus includes the `min_silence_duration_ms` configured in the Session."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the user message item that will be created."
    },
    {
     "name": "type",
     "type": "\"input_audio_buffer.speech_stopped\"",
     "required": true,
     "description": "The event type, must be `input_audio_buffer.speech_stopped`.",
     "enum": [
      "input_audio_buffer.speech_stopped"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_1718",
   "type": "input_audio_buffer.speech_stopped",
   "audio_end_ms": 2000,
   "item_id": "msg_003"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#input_audio_buffer.speech_stopped",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "input_audio_buffer.timeout_triggered",
  "description": "Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured with `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that there hasn't been any speech detected for the configured duration. The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last model response up to the triggering time, as an offset from the beginning of audio written to the input audio buffer. This means it demarcates the segment of audio that was silent and the difference between the start and end values will roughly match the configured timeout. The empty audio will be committed to the conversation as an `input_audio` item (there will be a `input_audio_buffer.committed` event) and a model response will be generated. There may be speech that didn't trigger VAD but is still detected by the model, so the model may respond with something relevant to the conversation or a prompt to continue speaking.",
  "schema": {
   "schema_name": "RealtimeServerEventInputAudioBufferTimeoutTriggered",
   "fields": [
    {
     "name": "audio_end_ms",
     "type": "number",
     "required": true,
     "description": "Millisecond offset of audio written to the input audio buffer at the time the timeout was triggered."
    },
    {
     "name": "audio_start_ms",
     "type": "number",
     "required": true,
     "description": "Millisecond offset of audio written to the input audio buffer that was after the playback time of the last model response."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the item associated with this segment."
    },
    {
     "name": "type",
     "type": "\"input_audio_buffer.timeout_triggered\"",
     "required": true,
     "description": "The event type, must be `input_audio_buffer.timeout_triggered`.",
     "enum": [
      "input_audio_buffer.timeout_triggered"
     ]
    }
   ]
  },
  "example": {
   "type": "input_audio_buffer.timeout_triggered",
   "event_id": "event_CEKKrf1KTGvemCPyiJTJ2",
   "audio_start_ms": 13216,
   "audio_end_ms": 19232,
   "item_id": "item_CEKKrWH0GiwN0ET97NUZc"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#input_audio_buffer.timeout_triggered",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "output_audio_buffer.started",
  "description": "**WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is emitted after an audio content part has been added (`response.content_part.added`) to the response. [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).",
  "schema": {
   "schema_name": "RealtimeServerEventOutputAudioBufferStarted",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the response that produced the audio."
    },
    {
     "name": "type",
     "type": "\"output_audio_buffer.started\"",
     "required": true,
     "description": "The event type, must be `output_audio_buffer.started`.",
     "enum": [
      "output_audio_buffer.started"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_abc123",
   "type": "output_audio_buffer.started",
   "response_id": "resp_abc123"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#output_audio_buffer.started",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "output_audio_buffer.stopped",
  "description": "**WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server, and no more audio is forthcoming. This event is emitted after the full response data has been sent to the client (`response.done`). [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).",
  "schema": {
   "schema_name": "RealtimeServerEventOutputAudioBufferStopped",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the response that produced the audio."
    },
    {
     "name": "type",
     "type": "\"output_audio_buffer.stopped\"",
     "required": true,
     "description": "The event type, must be `output_audio_buffer.stopped`.",
     "enum": [
      "output_audio_buffer.stopped"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_abc123",
   "type": "output_audio_buffer.stopped",
   "response_id": "resp_abc123"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#output_audio_buffer.stopped",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "output_audio_buffer.cleared",
  "description": "**WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD mode when the user has interrupted (`input_audio_buffer.speech_started`), or when the client has emitted the `output_audio_buffer.clear` event to manually cut off the current audio response. [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).",
  "schema": {
   "schema_name": "RealtimeServerEventOutputAudioBufferCleared",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the response that produced the audio."
    },
    {
     "name": "type",
     "type": "\"output_audio_buffer.cleared\"",
     "required": true,
     "description": "The event type, must be `output_audio_buffer.cleared`.",
     "enum": [
      "output_audio_buffer.cleared"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_abc123",
   "type": "output_audio_buffer.cleared",
   "response_id": "resp_abc123"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#output_audio_buffer.cleared",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.created",
  "description": "Returned when a new Response is created. The first event of response creation, where the response is in an initial state of `in_progress`.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseCreated",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "response",
     "type": "RealtimeResponse",
     "required": true,
     "description": "The response resource.",
     "fields": [
      {
       "name": "id",
       "type": "string",
       "required": false,
       "description": "The unique ID of the response, will look like `resp_1234`."
      },
      {
       "name": "audio",
       "type": "object { output }",
       "required": false,
       "description": "Configuration for audio output.",
       "fields": "… 1 nested fields (see source)"
      },
      {
       "name": "conversation_id",
       "type": "string",
       "required": false,
       "description": "Which conversation the response is added to, determined by the `conversation` field in the `response.create` event. If `auto`, the response will be added to the default conversation and the value of `conversation_id` will be an id like `conv_1234`. If `none`, the response will not be added to any conversation and the value of `conversation_id` will be `null`. If responses are being triggered automatically by VAD the response will be added to the default conversation"
      },
      {
       "name": "max_output_tokens",
       "type": "number or \"inf\"",
       "required": false,
       "description": "Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used in this response.",
       "enum": [
        "inf"
       ]
      },
      {
       "name": "metadata",
       "type": "Metadata or null",
       "required": false,
       "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters."
      },
      {
       "name": "object",
       "type": "\"realtime.response\"",
       "required": false,
       "description": "The object type, must be `realtime.response`.",
       "enum": [
        "realtime.response"
       ]
      },
      {
       "name": "output",
       "type": "array of ConversationItem",
       "required": false,
       "description": "The list of output items generated by the response.",
       "variants": [
        {
         "variant": "RealtimeConversationItemSystemMessage object { content, role, type, 3 more }",
         "description": "A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. \"the user is now asking about a different topic\"), use system messages.",
         "fields": "…"
        },
        {
         "variant": "RealtimeConversationItemUserMessage object { content, role, type, 3 more }",
         "description": "A user message item in a Realtime conversation.",
         "fields": "…"
        },
        {
         "variant": "RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }",
         "description": "An assistant message item in a Realtime conversation.",
         "fields": "…"
        },
        {
         "variant": "RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }",
         "description": "A function call item in a Realtime conversation.",
         "fields": "…"
        },
        {
         "variant": "RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }",
         "description": "A function call output item in a Realtime conversation.",
         "fields": "…"
        },
        {
         "variant": "RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }",
         "description": "A Realtime item responding to an MCP approval request.",
         "fields": "…"
        },
        {
         "variant": "RealtimeMcpListTools object { server_label, tools, type, id }",
         "description": "A Realtime item listing tools available on an MCP server.",
         "fields": "…"
        },
        {
         "variant": "RealtimeMcpToolCall object { id, arguments, name, 5 more }",
         "description": "A Realtime item representing an invocation of a tool on an MCP server.",
         "fields": "…"
        },
        {
         "variant": "RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }",
         "description": "A Realtime item requesting human approval of a tool invocation.",
         "fields": "…"
        }
       ]
      },
      {
       "name": "output_modalities",
       "type": "array of \"text\" or \"audio\"",
       "required": false,
       "description": "The set of modalities the model used to respond, currently the only possible values are `[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the output to mode `text` will disable audio output from the model.",
       "enum": [
        "text",
        "audio"
       ]
      },
      {
       "name": "status",
       "type": "\"completed\" or \"cancelled\" or \"failed\" or 2 more",
       "required": false,
       "description": "The final status of the response (`completed`, `cancelled`, `failed`, or `incomplete`, `in_progress`).",
       "enum": [
        "completed",
        "cancelled",
        "failed",
        "incomplete",
        "in_progress"
       ]
      },
      {
       "name": "status_details",
       "type": "RealtimeResponseStatus",
       "required": false,
       "description": "Additional details about the status.",
       "fields": "… 3 nested fields (see source)"
      },
      {
       "name": "usage",
       "type": "RealtimeResponseUsage",
       "required": false,
       "description": "Usage statistics for the Response, this will correspond to billing. A Realtime API session will maintain a conversation context and append new Items to the Conversation, thus output from previous turns (text and audio tokens) will become the input for later turns.",
       "fields": "… 5 nested fields (see source)"
      }
     ]
    },
    {
     "name": "type",
     "type": "\"response.created\"",
     "required": true,
     "description": "The event type, must be `response.created`.",
     "enum": [
      "response.created"
     ]
    }
   ]
  },
  "example": "{\n  \"type\": \"response.created\",\n  \"event_id\": \"event_C9G8pqbTEddBSIxbBN6Os\",\n  \"response\": {\n    \"object\": \"realtime.response\",\n    \"id\": \"resp_C9G8p7IH2WxLbkgPNouYL\",\n    \"status\": \"in_progress\",\n    \"status_details\": null,\n    \"output\": [],\n    \"conversation_id\": \"conv_C9G8mmBkLhQJwCon3hoJN\",\n    \"output_modalities\": [\n      \"audio\"\n    ],\n    \"max_output_tokens\": \"inf\",\n    \"audio\": {\n      \"output\": {\n        \"format\": {\n          \"type\": \"audio/pcm\",\n          \"rate\": 24000\n        },\n        \"voice\": \"marin\"\n      }\n    },\n    \"usage\": null,\n    \"metadata\": null\n  },\n}",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.created",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.done",
  "description": "Returned when a Response is done streaming. Always emitted, no matter the final state. The Response object included in the `response.done` event will include all output Items in the Response but will omit the raw audio data. Clients should check the `status` field of the Response to determine if it was successful (`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`. A response will contain all output items that were generated during the response, excluding any audio content.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseDone",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "response",
     "type": "RealtimeResponse",
     "required": true,
     "description": "The response resource.",
     "fields": [
      {
       "name": "id",
       "type": "string",
       "required": false,
       "description": "The unique ID of the response, will look like `resp_1234`."
      },
      {
       "name": "audio",
       "type": "object { output }",
       "required": false,
       "description": "Configuration for audio output.",
       "fields": "… 1 nested fields (see source)"
      },
      {
       "name": "conversation_id",
       "type": "string",
       "required": false,
       "description": "Which conversation the response is added to, determined by the `conversation` field in the `response.create` event. If `auto`, the response will be added to the default conversation and the value of `conversation_id` will be an id like `conv_1234`. If `none`, the response will not be added to any conversation and the value of `conversation_id` will be `null`. If responses are being triggered automatically by VAD the response will be added to the default conversation"
      },
      {
       "name": "max_output_tokens",
       "type": "number or \"inf\"",
       "required": false,
       "description": "Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used in this response.",
       "enum": [
        "inf"
       ]
      },
      {
       "name": "metadata",
       "type": "Metadata or null",
       "required": false,
       "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters."
      },
      {
       "name": "object",
       "type": "\"realtime.response\"",
       "required": false,
       "description": "The object type, must be `realtime.response`.",
       "enum": [
        "realtime.response"
       ]
      },
      {
       "name": "output",
       "type": "array of ConversationItem",
       "required": false,
       "description": "The list of output items generated by the response.",
       "variants": [
        {
         "variant": "RealtimeConversationItemSystemMessage object { content, role, type, 3 more }",
         "description": "A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. \"the user is now asking about a different topic\"), use system messages.",
         "fields": "…"
        },
        {
         "variant": "RealtimeConversationItemUserMessage object { content, role, type, 3 more }",
         "description": "A user message item in a Realtime conversation.",
         "fields": "…"
        },
        {
         "variant": "RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }",
         "description": "An assistant message item in a Realtime conversation.",
         "fields": "…"
        },
        {
         "variant": "RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }",
         "description": "A function call item in a Realtime conversation.",
         "fields": "…"
        },
        {
         "variant": "RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }",
         "description": "A function call output item in a Realtime conversation.",
         "fields": "…"
        },
        {
         "variant": "RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }",
         "description": "A Realtime item responding to an MCP approval request.",
         "fields": "…"
        },
        {
         "variant": "RealtimeMcpListTools object { server_label, tools, type, id }",
         "description": "A Realtime item listing tools available on an MCP server.",
         "fields": "…"
        },
        {
         "variant": "RealtimeMcpToolCall object { id, arguments, name, 5 more }",
         "description": "A Realtime item representing an invocation of a tool on an MCP server.",
         "fields": "…"
        },
        {
         "variant": "RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }",
         "description": "A Realtime item requesting human approval of a tool invocation.",
         "fields": "…"
        }
       ]
      },
      {
       "name": "output_modalities",
       "type": "array of \"text\" or \"audio\"",
       "required": false,
       "description": "The set of modalities the model used to respond, currently the only possible values are `[\\\"audio\\\"]`, `[\\\"text\\\"]`. Audio output always include a text transcript. Setting the output to mode `text` will disable audio output from the model.",
       "enum": [
        "text",
        "audio"
       ]
      },
      {
       "name": "status",
       "type": "\"completed\" or \"cancelled\" or \"failed\" or 2 more",
       "required": false,
       "description": "The final status of the response (`completed`, `cancelled`, `failed`, or `incomplete`, `in_progress`).",
       "enum": [
        "completed",
        "cancelled",
        "failed",
        "incomplete",
        "in_progress"
       ]
      },
      {
       "name": "status_details",
       "type": "RealtimeResponseStatus",
       "required": false,
       "description": "Additional details about the status.",
       "fields": "… 3 nested fields (see source)"
      },
      {
       "name": "usage",
       "type": "RealtimeResponseUsage",
       "required": false,
       "description": "Usage statistics for the Response, this will correspond to billing. A Realtime API session will maintain a conversation context and append new Items to the Conversation, thus output from previous turns (text and audio tokens) will become the input for later turns.",
       "fields": "… 5 nested fields (see source)"
      }
     ]
    },
    {
     "name": "type",
     "type": "\"response.done\"",
     "required": true,
     "description": "The event type, must be `response.done`.",
     "enum": [
      "response.done"
     ]
    }
   ]
  },
  "example": {
   "type": "response.done",
   "event_id": "event_CCXHxcMy86rrKhBLDdqCh",
   "response": {
    "object": "realtime.response",
    "id": "resp_CCXHw0UJld10EzIUXQCNh",
    "status": "completed",
    "status_details": null,
    "output": [
     {
      "id": "item_CCXHwGjjDUfOXbiySlK7i",
      "type": "message",
      "status": "completed",
      "role": "assistant",
      "content": [
       {
        "type": "output_audio",
        "transcript": "Loud and clear! I can hear you perfectly. How can I help you today?"
       }
      ]
     }
    ],
    "conversation_id": "conv_CCXHsurMKcaVxIZvaCI5m",
    "output_modalities": [
     "audio"
    ],
    "max_output_tokens": "inf",
    "audio": {
     "output": {
      "format": {
       "type": "audio/pcm",
       "rate": 24000
      },
      "voice": "alloy"
     }
    },
    "usage": {
     "total_tokens": 253,
     "input_tokens": 132,
     "output_tokens": 121,
     "input_token_details": {
      "text_tokens": 119,
      "audio_tokens": 13,
      "image_tokens": 0,
      "cached_tokens": 64,
      "cached_tokens_details": {
       "text_tokens": 64,
       "audio_tokens": 0,
       "image_tokens": 0
      }
     },
     "output_token_details": {
      "text_tokens": 30,
      "audio_tokens": 91
     }
    },
    "metadata": null
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.done",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.output_item.added",
  "description": "Returned when a new Item is created during Response generation.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseOutputItemAdded",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item",
     "type": "ConversationItem",
     "required": true,
     "description": "A single item within a Realtime conversation.",
     "variants": [
      {
       "variant": "RealtimeConversationItemSystemMessage object { content, role, type, 3 more }",
       "description": "A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. \"the user is now asking about a different topic\"), use system messages.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { text, type }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 2 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"system\"",
         "required": true,
         "description": "The role of the message sender. Always `system`.",
         "enum": [
          "system"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemUserMessage object { content, role, type, 3 more }",
       "description": "A user message item in a Realtime conversation.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { audio, detail, image_url, 3 more }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 6 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"user\"",
         "required": true,
         "description": "The role of the message sender. Always `user`.",
         "enum": [
          "user"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }",
       "description": "An assistant message item in a Realtime conversation.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { audio, text, transcript, type }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 4 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"assistant\"",
         "required": true,
         "description": "The role of the message sender. Always `assistant`.",
         "enum": [
          "assistant"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }",
       "description": "A function call item in a Realtime conversation.",
       "fields": [
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the function being called."
        },
        {
         "name": "type",
         "type": "\"function_call\"",
         "required": true,
         "description": "The type of the item. Always `function_call`.",
         "enum": [
          "function_call"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "call_id",
         "type": "string",
         "required": false,
         "description": "The ID of the function call."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }",
       "description": "A function call output item in a Realtime conversation.",
       "fields": [
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The ID of the function call this output is for."
        },
        {
         "name": "output",
         "type": "string",
         "required": true,
         "description": "The output of the function call, this is free text and can contain any information or simply be empty."
        },
        {
         "name": "type",
         "type": "\"function_call_output\"",
         "required": true,
         "description": "The type of the item. Always `function_call_output`.",
         "enum": [
          "function_call_output"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }",
       "description": "A Realtime item responding to an MCP approval request.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the approval response."
        },
        {
         "name": "approval_request_id",
         "type": "string",
         "required": true,
         "description": "The ID of the approval request being answered."
        },
        {
         "name": "approve",
         "type": "boolean",
         "required": true,
         "description": "Whether the request was approved."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_response\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_response`.",
         "enum": [
          "mcp_approval_response"
         ]
        },
        {
         "name": "reason",
         "type": "string or null",
         "required": false,
         "description": "Optional reason for the decision."
        }
       ]
      },
      {
       "variant": "RealtimeMcpListTools object { server_label, tools, type, id }",
       "description": "A Realtime item listing tools available on an MCP server.",
       "fields": [
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server."
        },
        {
         "name": "tools",
         "type": "array of object { input_schema, name, annotations, description }",
         "required": true,
         "description": "The tools available on the server.",
         "fields": "… 4 nested fields (see source)"
        },
        {
         "name": "type",
         "type": "\"mcp_list_tools\"",
         "required": true,
         "description": "The type of the item. Always `mcp_list_tools`.",
         "enum": [
          "mcp_list_tools"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the list."
        }
       ]
      },
      {
       "variant": "RealtimeMcpToolCall object { id, arguments, name, 5 more }",
       "description": "A Realtime item representing an invocation of a tool on an MCP server.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the tool call."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of the arguments passed to the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool that was run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server running the tool."
        },
        {
         "name": "type",
         "type": "\"mcp_call\"",
         "required": true,
         "description": "The type of the item. Always `mcp_call`.",
         "enum": [
          "mcp_call"
         ]
        },
        {
         "name": "approval_request_id",
         "type": "string or null",
         "required": false,
         "description": "The ID of an associated approval request, if any."
        },
        {
         "name": "error",
         "type": "RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null",
         "required": false,
         "description": "The error from the tool call, if any.",
         "variants": [
          {
           "variant": "RealtimeMcpProtocolError object { code, message, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "RealtimeMcpToolExecutionError object { message, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "RealtimeMcphttpError object { code, message, type }",
           "description": "",
           "fields": "…"
          }
         ]
        },
        {
         "name": "output",
         "type": "string or null",
         "required": false,
         "description": "The output from the tool call."
        }
       ]
      },
      {
       "variant": "RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }",
       "description": "A Realtime item requesting human approval of a tool invocation.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the approval request."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of arguments for the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool to run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server making the request."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_request\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_request`.",
         "enum": [
          "mcp_approval_request"
         ]
        }
       ]
      }
     ]
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the Response."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The ID of the Response to which the item belongs."
    },
    {
     "name": "type",
     "type": "\"response.output_item.added\"",
     "required": true,
     "description": "The event type, must be `response.output_item.added`.",
     "enum": [
      "response.output_item.added"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_3334",
   "type": "response.output_item.added",
   "response_id": "resp_001",
   "output_index": 0,
   "item": {
    "id": "msg_007",
    "object": "realtime.item",
    "type": "message",
    "status": "in_progress",
    "role": "assistant",
    "content": []
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.output_item.added",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.output_item.done",
  "description": "Returned when an Item is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseOutputItemDone",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item",
     "type": "ConversationItem",
     "required": true,
     "description": "A single item within a Realtime conversation.",
     "variants": [
      {
       "variant": "RealtimeConversationItemSystemMessage object { content, role, type, 3 more }",
       "description": "A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. \"the user is now asking about a different topic\"), use system messages.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { text, type }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 2 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"system\"",
         "required": true,
         "description": "The role of the message sender. Always `system`.",
         "enum": [
          "system"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemUserMessage object { content, role, type, 3 more }",
       "description": "A user message item in a Realtime conversation.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { audio, detail, image_url, 3 more }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 6 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"user\"",
         "required": true,
         "description": "The role of the message sender. Always `user`.",
         "enum": [
          "user"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }",
       "description": "An assistant message item in a Realtime conversation.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { audio, text, transcript, type }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 4 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"assistant\"",
         "required": true,
         "description": "The role of the message sender. Always `assistant`.",
         "enum": [
          "assistant"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }",
       "description": "A function call item in a Realtime conversation.",
       "fields": [
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the function being called."
        },
        {
         "name": "type",
         "type": "\"function_call\"",
         "required": true,
         "description": "The type of the item. Always `function_call`.",
         "enum": [
          "function_call"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "call_id",
         "type": "string",
         "required": false,
         "description": "The ID of the function call."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }",
       "description": "A function call output item in a Realtime conversation.",
       "fields": [
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The ID of the function call this output is for."
        },
        {
         "name": "output",
         "type": "string",
         "required": true,
         "description": "The output of the function call, this is free text and can contain any information or simply be empty."
        },
        {
         "name": "type",
         "type": "\"function_call_output\"",
         "required": true,
         "description": "The type of the item. Always `function_call_output`.",
         "enum": [
          "function_call_output"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }",
       "description": "A Realtime item responding to an MCP approval request.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the approval response."
        },
        {
         "name": "approval_request_id",
         "type": "string",
         "required": true,
         "description": "The ID of the approval request being answered."
        },
        {
         "name": "approve",
         "type": "boolean",
         "required": true,
         "description": "Whether the request was approved."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_response\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_response`.",
         "enum": [
          "mcp_approval_response"
         ]
        },
        {
         "name": "reason",
         "type": "string or null",
         "required": false,
         "description": "Optional reason for the decision."
        }
       ]
      },
      {
       "variant": "RealtimeMcpListTools object { server_label, tools, type, id }",
       "description": "A Realtime item listing tools available on an MCP server.",
       "fields": [
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server."
        },
        {
         "name": "tools",
         "type": "array of object { input_schema, name, annotations, description }",
         "required": true,
         "description": "The tools available on the server.",
         "fields": "… 4 nested fields (see source)"
        },
        {
         "name": "type",
         "type": "\"mcp_list_tools\"",
         "required": true,
         "description": "The type of the item. Always `mcp_list_tools`.",
         "enum": [
          "mcp_list_tools"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the list."
        }
       ]
      },
      {
       "variant": "RealtimeMcpToolCall object { id, arguments, name, 5 more }",
       "description": "A Realtime item representing an invocation of a tool on an MCP server.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the tool call."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of the arguments passed to the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool that was run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server running the tool."
        },
        {
         "name": "type",
         "type": "\"mcp_call\"",
         "required": true,
         "description": "The type of the item. Always `mcp_call`.",
         "enum": [
          "mcp_call"
         ]
        },
        {
         "name": "approval_request_id",
         "type": "string or null",
         "required": false,
         "description": "The ID of an associated approval request, if any."
        },
        {
         "name": "error",
         "type": "RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null",
         "required": false,
         "description": "The error from the tool call, if any.",
         "variants": [
          {
           "variant": "RealtimeMcpProtocolError object { code, message, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "RealtimeMcpToolExecutionError object { message, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "RealtimeMcphttpError object { code, message, type }",
           "description": "",
           "fields": "…"
          }
         ]
        },
        {
         "name": "output",
         "type": "string or null",
         "required": false,
         "description": "The output from the tool call."
        }
       ]
      },
      {
       "variant": "RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }",
       "description": "A Realtime item requesting human approval of a tool invocation.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the approval request."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of arguments for the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool to run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server making the request."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_request\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_request`.",
         "enum": [
          "mcp_approval_request"
         ]
        }
       ]
      }
     ]
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the Response."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The ID of the Response to which the item belongs."
    },
    {
     "name": "type",
     "type": "\"response.output_item.done\"",
     "required": true,
     "description": "The event type, must be `response.output_item.done`.",
     "enum": [
      "response.output_item.done"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_3536",
   "type": "response.output_item.done",
   "response_id": "resp_001",
   "output_index": 0,
   "item": {
    "id": "msg_007",
    "object": "realtime.item",
    "type": "message",
    "status": "completed",
    "role": "assistant",
    "content": [
     {
      "type": "text",
      "text": "Sure, I can help with that."
     }
    ]
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.output_item.done",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.content_part.added",
  "description": "Returned when a new content part is added to an assistant message item during response generation.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseContentPartAdded",
   "fields": [
    {
     "name": "content_index",
     "type": "number",
     "required": true,
     "description": "The index of the content part in the item's content array."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the item to which the content part was added."
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the response."
    },
    {
     "name": "part",
     "type": "object { audio, text, transcript, type }",
     "required": true,
     "description": "The content part that was added.",
     "fields": [
      {
       "name": "audio",
       "type": "string",
       "required": false,
       "description": "Base64-encoded audio data (if type is \"audio\")."
      },
      {
       "name": "text",
       "type": "string",
       "required": false,
       "description": "The text content (if type is \"text\")."
      },
      {
       "name": "transcript",
       "type": "string",
       "required": false,
       "description": "The transcript of the audio (if type is \"audio\")."
      },
      {
       "name": "type",
       "type": "\"audio\" or \"text\"",
       "required": false,
       "description": "The content type (\"text\", \"audio\").",
       "enum": [
        "audio",
        "text"
       ]
      }
     ]
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The ID of the response."
    },
    {
     "name": "type",
     "type": "\"response.content_part.added\"",
     "required": true,
     "description": "The event type, must be `response.content_part.added`.",
     "enum": [
      "response.content_part.added"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_3738",
   "type": "response.content_part.added",
   "response_id": "resp_001",
   "item_id": "msg_007",
   "output_index": 0,
   "content_index": 0,
   "part": {
    "type": "text",
    "text": ""
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.content_part.added",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.content_part.done",
  "description": "Returned when a content part is done streaming in an assistant message item. Also emitted when a Response is interrupted, incomplete, or cancelled.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseContentPartDone",
   "fields": [
    {
     "name": "content_index",
     "type": "number",
     "required": true,
     "description": "The index of the content part in the item's content array."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the item."
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the response."
    },
    {
     "name": "part",
     "type": "object { audio, text, transcript, type }",
     "required": true,
     "description": "The content part that is done.",
     "fields": [
      {
       "name": "audio",
       "type": "string",
       "required": false,
       "description": "Base64-encoded audio data (if type is \"audio\")."
      },
      {
       "name": "text",
       "type": "string",
       "required": false,
       "description": "The text content (if type is \"text\")."
      },
      {
       "name": "transcript",
       "type": "string",
       "required": false,
       "description": "The transcript of the audio (if type is \"audio\")."
      },
      {
       "name": "type",
       "type": "\"audio\" or \"text\"",
       "required": false,
       "description": "The content type (\"text\", \"audio\").",
       "enum": [
        "audio",
        "text"
       ]
      }
     ]
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The ID of the response."
    },
    {
     "name": "type",
     "type": "\"response.content_part.done\"",
     "required": true,
     "description": "The event type, must be `response.content_part.done`.",
     "enum": [
      "response.content_part.done"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_3940",
   "type": "response.content_part.done",
   "response_id": "resp_001",
   "item_id": "msg_007",
   "output_index": 0,
   "content_index": 0,
   "part": {
    "type": "text",
    "text": "Sure, I can help with that."
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.content_part.done",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.output_text.delta",
  "description": "Returned when the text value of an \"output_text\" content part is updated.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseTextDelta",
   "fields": [
    {
     "name": "content_index",
     "type": "number",
     "required": true,
     "description": "The index of the content part in the item's content array."
    },
    {
     "name": "delta",
     "type": "string",
     "required": true,
     "description": "The text delta."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the item."
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the response."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The ID of the response."
    },
    {
     "name": "type",
     "type": "\"response.output_text.delta\"",
     "required": true,
     "description": "The event type, must be `response.output_text.delta`.",
     "enum": [
      "response.output_text.delta"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_4142",
   "type": "response.output_text.delta",
   "response_id": "resp_001",
   "item_id": "msg_007",
   "output_index": 0,
   "content_index": 0,
   "delta": "Sure, I can h"
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.output_text.delta",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.output_text.done",
  "description": "Returned when the text value of an \"output_text\" content part is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseTextDone",
   "fields": [
    {
     "name": "content_index",
     "type": "number",
     "required": true,
     "description": "The index of the content part in the item's content array."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the item."
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the response."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The ID of the response."
    },
    {
     "name": "text",
     "type": "string",
     "required": true,
     "description": "The final text content."
    },
    {
     "name": "type",
     "type": "\"response.output_text.done\"",
     "required": true,
     "description": "The event type, must be `response.output_text.done`.",
     "enum": [
      "response.output_text.done"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_4344",
   "type": "response.output_text.done",
   "response_id": "resp_001",
   "item_id": "msg_007",
   "output_index": 0,
   "content_index": 0,
   "text": "Sure, I can help with that."
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.output_text.done",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.output_audio_transcript.delta",
  "description": "Returned when the model-generated transcription of audio output is updated.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseAudioTranscriptDelta",
   "fields": [
    {
     "name": "content_index",
     "type": "number",
     "required": true,
     "description": "The index of the content part in the item's content array."
    },
    {
     "name": "delta",
     "type": "string",
     "required": true,
     "description": "The transcript delta."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the item."
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the response."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The ID of the response."
    },
    {
     "name": "type",
     "type": "\"response.output_audio_transcript.delta\"",
     "required": true,
     "description": "The event type, must be `response.output_audio_transcript.delta`.",
     "enum": [
      "response.output_audio_transcript.delta"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_4546",
   "type": "response.output_audio_transcript.delta",
   "response_id": "resp_001",
   "item_id": "msg_008",
   "output_index": 0,
   "content_index": 0,
   "delta": "Hello, how can I a"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.output_audio_transcript.delta",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.output_audio_transcript.done",
  "description": "Returned when the model-generated transcription of audio output is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseAudioTranscriptDone",
   "fields": [
    {
     "name": "content_index",
     "type": "number",
     "required": true,
     "description": "The index of the content part in the item's content array."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the item."
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the response."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The ID of the response."
    },
    {
     "name": "transcript",
     "type": "string",
     "required": true,
     "description": "The final transcript of the audio."
    },
    {
     "name": "type",
     "type": "\"response.output_audio_transcript.done\"",
     "required": true,
     "description": "The event type, must be `response.output_audio_transcript.done`.",
     "enum": [
      "response.output_audio_transcript.done"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_4748",
   "type": "response.output_audio_transcript.done",
   "response_id": "resp_001",
   "item_id": "msg_008",
   "output_index": 0,
   "content_index": 0,
   "transcript": "Hello, how can I assist you today?"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.output_audio_transcript.done",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.output_audio.delta",
  "description": "Returned when the model-generated audio is updated.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseAudioDelta",
   "fields": [
    {
     "name": "content_index",
     "type": "number",
     "required": true,
     "description": "The index of the content part in the item's content array."
    },
    {
     "name": "delta",
     "type": "string",
     "required": true,
     "description": "Base64-encoded audio data delta."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the item."
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the response."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The ID of the response."
    },
    {
     "name": "type",
     "type": "\"response.output_audio.delta\"",
     "required": true,
     "description": "The event type, must be `response.output_audio.delta`.",
     "enum": [
      "response.output_audio.delta"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_4950",
   "type": "response.output_audio.delta",
   "response_id": "resp_001",
   "item_id": "msg_008",
   "output_index": 0,
   "content_index": 0,
   "delta": "Base64EncodedAudioDelta"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.output_audio.delta",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.output_audio.done",
  "description": "Returned when the model-generated audio is done. Also emitted when a Response is interrupted, incomplete, or cancelled.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseAudioDone",
   "fields": [
    {
     "name": "content_index",
     "type": "number",
     "required": true,
     "description": "The index of the content part in the item's content array."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the item."
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the response."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The ID of the response."
    },
    {
     "name": "type",
     "type": "\"response.output_audio.done\"",
     "required": true,
     "description": "The event type, must be `response.output_audio.done`.",
     "enum": [
      "response.output_audio.done"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_5152",
   "type": "response.output_audio.done",
   "response_id": "resp_001",
   "item_id": "msg_008",
   "output_index": 0,
   "content_index": 0
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.output_audio.done",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.function_call_arguments.delta",
  "description": "Returned when the model-generated function call arguments are updated.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseFunctionCallArgumentsDelta",
   "fields": [
    {
     "name": "call_id",
     "type": "string",
     "required": true,
     "description": "The ID of the function call."
    },
    {
     "name": "delta",
     "type": "string",
     "required": true,
     "description": "The arguments delta as a JSON string."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the function call item."
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the response."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The ID of the response."
    },
    {
     "name": "type",
     "type": "\"response.function_call_arguments.delta\"",
     "required": true,
     "description": "The event type, must be `response.function_call_arguments.delta`.",
     "enum": [
      "response.function_call_arguments.delta"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_5354",
   "type": "response.function_call_arguments.delta",
   "response_id": "resp_002",
   "item_id": "fc_001",
   "output_index": 0,
   "call_id": "call_001",
   "delta": "{\"location\": \"San\""
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.function_call_arguments.delta",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.function_call_arguments.done",
  "description": "Returned when the model-generated function call arguments are done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseFunctionCallArgumentsDone",
   "fields": [
    {
     "name": "arguments",
     "type": "string",
     "required": true,
     "description": "The final arguments as a JSON string."
    },
    {
     "name": "call_id",
     "type": "string",
     "required": true,
     "description": "The ID of the function call."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the function call item."
    },
    {
     "name": "name",
     "type": "string",
     "required": true,
     "description": "The name of the function that was called."
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the response."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The ID of the response."
    },
    {
     "name": "type",
     "type": "\"response.function_call_arguments.done\"",
     "required": true,
     "description": "The event type, must be `response.function_call_arguments.done`.",
     "enum": [
      "response.function_call_arguments.done"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_5556",
   "type": "response.function_call_arguments.done",
   "response_id": "resp_002",
   "item_id": "fc_001",
   "output_index": 0,
   "call_id": "call_001",
   "name": "get_weather",
   "arguments": "{\"location\": \"San Francisco\"}"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.function_call_arguments.done",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.mcp_call_arguments.delta",
  "description": "Returned when MCP tool call arguments are updated during response generation.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseMCPCallArgumentsDelta",
   "fields": [
    {
     "name": "delta",
     "type": "string",
     "required": true,
     "description": "The JSON-encoded arguments delta."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the MCP tool call item."
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the response."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The ID of the response."
    },
    {
     "name": "type",
     "type": "\"response.mcp_call_arguments.delta\"",
     "required": true,
     "description": "The event type, must be `response.mcp_call_arguments.delta`.",
     "enum": [
      "response.mcp_call_arguments.delta"
     ]
    },
    {
     "name": "obfuscation",
     "type": "string or null",
     "required": false,
     "description": "If present, indicates the delta text was obfuscated."
    }
   ]
  },
  "example": {
   "event_id": "event_6201",
   "type": "response.mcp_call_arguments.delta",
   "response_id": "resp_001",
   "item_id": "mcp_call_001",
   "output_index": 0,
   "delta": "{\"partial\":true}"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.mcp_call_arguments.delta",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.mcp_call_arguments.done",
  "description": "Returned when MCP tool call arguments are finalized during response generation.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseMCPCallArgumentsDone",
   "fields": [
    {
     "name": "arguments",
     "type": "string",
     "required": true,
     "description": "The final JSON-encoded arguments string."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the MCP tool call item."
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the response."
    },
    {
     "name": "response_id",
     "type": "string",
     "required": true,
     "description": "The ID of the response."
    },
    {
     "name": "type",
     "type": "\"response.mcp_call_arguments.done\"",
     "required": true,
     "description": "The event type, must be `response.mcp_call_arguments.done`.",
     "enum": [
      "response.mcp_call_arguments.done"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_6202",
   "type": "response.mcp_call_arguments.done",
   "response_id": "resp_001",
   "item_id": "mcp_call_001",
   "output_index": 0,
   "arguments": "{\"q\":\"docs\"}"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.mcp_call_arguments.done",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.mcp_call.in_progress",
  "description": "Returned when an MCP tool call has started and is in progress.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseMCPCallInProgress",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the MCP tool call item."
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the response."
    },
    {
     "name": "type",
     "type": "\"response.mcp_call.in_progress\"",
     "required": true,
     "description": "The event type, must be `response.mcp_call.in_progress`.",
     "enum": [
      "response.mcp_call.in_progress"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_6301",
   "type": "response.mcp_call.in_progress",
   "output_index": 0,
   "item_id": "mcp_call_001"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.mcp_call.in_progress",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.mcp_call.completed",
  "description": "Returned when an MCP tool call has completed successfully.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseMCPCallCompleted",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the MCP tool call item."
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the response."
    },
    {
     "name": "type",
     "type": "\"response.mcp_call.completed\"",
     "required": true,
     "description": "The event type, must be `response.mcp_call.completed`.",
     "enum": [
      "response.mcp_call.completed"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_6302",
   "type": "response.mcp_call.completed",
   "output_index": 0,
   "item_id": "mcp_call_001"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.mcp_call.completed",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.mcp_call.failed",
  "description": "Returned when an MCP tool call has failed.",
  "schema": {
   "schema_name": "RealtimeServerEventResponseMCPCallFailed",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the MCP tool call item."
    },
    {
     "name": "output_index",
     "type": "number",
     "required": true,
     "description": "The index of the output item in the response."
    },
    {
     "name": "type",
     "type": "\"response.mcp_call.failed\"",
     "required": true,
     "description": "The event type, must be `response.mcp_call.failed`.",
     "enum": [
      "response.mcp_call.failed"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_6303",
   "type": "response.mcp_call.failed",
   "output_index": 0,
   "item_id": "mcp_call_001"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#response.mcp_call.failed",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "mcp_list_tools.in_progress",
  "description": "Returned when listing MCP tools is in progress for an item.",
  "schema": {
   "schema_name": "RealtimeServerEventMCPListToolsInProgress",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the MCP list tools item."
    },
    {
     "name": "type",
     "type": "\"mcp_list_tools.in_progress\"",
     "required": true,
     "description": "The event type, must be `mcp_list_tools.in_progress`.",
     "enum": [
      "mcp_list_tools.in_progress"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_6101",
   "type": "mcp_list_tools.in_progress",
   "item_id": "mcp_list_tools_001"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#mcp_list_tools.in_progress",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "mcp_list_tools.completed",
  "description": "Returned when listing MCP tools has completed for an item.",
  "schema": {
   "schema_name": "RealtimeServerEventMCPListToolsCompleted",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the MCP list tools item."
    },
    {
     "name": "type",
     "type": "\"mcp_list_tools.completed\"",
     "required": true,
     "description": "The event type, must be `mcp_list_tools.completed`.",
     "enum": [
      "mcp_list_tools.completed"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_6102",
   "type": "mcp_list_tools.completed",
   "item_id": "mcp_list_tools_001"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#mcp_list_tools.completed",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "mcp_list_tools.failed",
  "description": "Returned when listing MCP tools has failed for an item.",
  "schema": {
   "schema_name": "RealtimeServerEventMCPListToolsFailed",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item_id",
     "type": "string",
     "required": true,
     "description": "The ID of the MCP list tools item."
    },
    {
     "name": "type",
     "type": "\"mcp_list_tools.failed\"",
     "required": true,
     "description": "The event type, must be `mcp_list_tools.failed`.",
     "enum": [
      "mcp_list_tools.failed"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_6103",
   "type": "mcp_list_tools.failed",
   "item_id": "mcp_list_tools_001"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#mcp_list_tools.failed",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "rate_limits.updated",
  "description": "Emitted at the beginning of a Response to indicate the updated rate limits. When a Response is created some tokens will be \"reserved\" for the output tokens, the rate limits shown here reflect that reservation, which is then adjusted accordingly once the Response is completed.",
  "schema": {
   "schema_name": "RealtimeServerEventRateLimitsUpdated",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "rate_limits",
     "type": "array of object { limit, name, remaining, reset_seconds }",
     "required": true,
     "description": "List of rate limit information.",
     "fields": [
      {
       "name": "limit",
       "type": "number",
       "required": false,
       "description": "The maximum allowed value for the rate limit."
      },
      {
       "name": "name",
       "type": "\"requests\" or \"tokens\"",
       "required": false,
       "description": "The name of the rate limit (`requests`, `tokens`).",
       "enum": [
        "requests",
        "tokens"
       ]
      },
      {
       "name": "remaining",
       "type": "number",
       "required": false,
       "description": "The remaining value before the limit is reached."
      },
      {
       "name": "reset_seconds",
       "type": "number",
       "required": false,
       "description": "Seconds until the rate limit resets."
      }
     ]
    },
    {
     "name": "type",
     "type": "\"rate_limits.updated\"",
     "required": true,
     "description": "The event type, must be `rate_limits.updated`.",
     "enum": [
      "rate_limits.updated"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_5758",
   "type": "rate_limits.updated",
   "rate_limits": [
    {
     "name": "requests",
     "limit": 1000,
     "remaining": 999,
     "reset_seconds": 60
    },
    {
     "name": "tokens",
     "limit": 50000,
     "remaining": 49950,
     "reset_seconds": 60
    }
   ]
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#rate_limits.updated",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.created",
  "description": "Returned when a conversation is created. Emitted right after session creation.",
  "schema": {
   "schema_name": "RealtimeServerEventConversationCreated",
   "fields": [
    {
     "name": "conversation",
     "type": "object { id, object }",
     "required": true,
     "description": "The conversation resource.",
     "fields": [
      {
       "name": "id",
       "type": "string",
       "required": false,
       "description": "The unique ID of the conversation."
      },
      {
       "name": "object",
       "type": "string",
       "required": false,
       "description": "The object type, must be `realtime.conversation`."
      }
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "type",
     "type": "\"conversation.created\"",
     "required": true,
     "description": "The event type, must be `conversation.created`.",
     "enum": [
      "conversation.created"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_9101",
   "type": "conversation.created",
   "conversation": {
    "id": "conv_001",
    "object": "realtime.conversation"
   }
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#conversation.created",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "notes": "Listed at the end of the server-events reference; `conversation.item.created` is the pre-GA name of `conversation.item.added` and was NOT observed in the GA WebSocket probe (only `.added`/`.done` were).",
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.item.created",
  "description": "Returned when a conversation item is created. There are several scenarios that produce this event: - The server is generating a Response, which if successful will produce either one or two Items, which will be of type `message` (role `assistant`) or type `function_call`. - The input audio buffer has been committed, either by the client or the server (in `server_vad` mode). The server will take the content of the input audio buffer and add it to a new user message Item. - The client has sent a `conversation.item.create` event to add a new Item to the Conversation.",
  "schema": {
   "schema_name": "RealtimeServerEventConversationItemCreated",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "item",
     "type": "ConversationItem",
     "required": true,
     "description": "A single item within a Realtime conversation.",
     "variants": [
      {
       "variant": "RealtimeConversationItemSystemMessage object { content, role, type, 3 more }",
       "description": "A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. \"the user is now asking about a different topic\"), use system messages.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { text, type }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 2 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"system\"",
         "required": true,
         "description": "The role of the message sender. Always `system`.",
         "enum": [
          "system"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemUserMessage object { content, role, type, 3 more }",
       "description": "A user message item in a Realtime conversation.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { audio, detail, image_url, 3 more }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 6 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"user\"",
         "required": true,
         "description": "The role of the message sender. Always `user`.",
         "enum": [
          "user"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }",
       "description": "An assistant message item in a Realtime conversation.",
       "fields": [
        {
         "name": "content",
         "type": "array of object { audio, text, transcript, type }",
         "required": true,
         "description": "The content of the message.",
         "fields": "… 4 nested fields (see source)"
        },
        {
         "name": "role",
         "type": "\"assistant\"",
         "required": true,
         "description": "The role of the message sender. Always `assistant`.",
         "enum": [
          "assistant"
         ]
        },
        {
         "name": "type",
         "type": "\"message\"",
         "required": true,
         "description": "The type of the item. Always `message`.",
         "enum": [
          "message"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }",
       "description": "A function call item in a Realtime conversation.",
       "fields": [
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{\"arg1\": \"value1\", \"arg2\": 42}`."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the function being called."
        },
        {
         "name": "type",
         "type": "\"function_call\"",
         "required": true,
         "description": "The type of the item. Always `function_call`.",
         "enum": [
          "function_call"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "call_id",
         "type": "string",
         "required": false,
         "description": "The ID of the function call."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }",
       "description": "A function call output item in a Realtime conversation.",
       "fields": [
        {
         "name": "call_id",
         "type": "string",
         "required": true,
         "description": "The ID of the function call this output is for."
        },
        {
         "name": "output",
         "type": "string",
         "required": true,
         "description": "The output of the function call, this is free text and can contain any information or simply be empty."
        },
        {
         "name": "type",
         "type": "\"function_call_output\"",
         "required": true,
         "description": "The type of the item. Always `function_call_output`.",
         "enum": [
          "function_call_output"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the item. This may be provided by the client or generated by the server."
        },
        {
         "name": "object",
         "type": "\"realtime.item\"",
         "required": false,
         "description": "Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.",
         "enum": [
          "realtime.item"
         ]
        },
        {
         "name": "status",
         "type": "\"completed\" or \"incomplete\" or \"in_progress\"",
         "required": false,
         "description": "The status of the item. Has no effect on the conversation.",
         "enum": [
          "completed",
          "incomplete",
          "in_progress"
         ]
        }
       ]
      },
      {
       "variant": "RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }",
       "description": "A Realtime item responding to an MCP approval request.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the approval response."
        },
        {
         "name": "approval_request_id",
         "type": "string",
         "required": true,
         "description": "The ID of the approval request being answered."
        },
        {
         "name": "approve",
         "type": "boolean",
         "required": true,
         "description": "Whether the request was approved."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_response\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_response`.",
         "enum": [
          "mcp_approval_response"
         ]
        },
        {
         "name": "reason",
         "type": "string or null",
         "required": false,
         "description": "Optional reason for the decision."
        }
       ]
      },
      {
       "variant": "RealtimeMcpListTools object { server_label, tools, type, id }",
       "description": "A Realtime item listing tools available on an MCP server.",
       "fields": [
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server."
        },
        {
         "name": "tools",
         "type": "array of object { input_schema, name, annotations, description }",
         "required": true,
         "description": "The tools available on the server.",
         "fields": "… 4 nested fields (see source)"
        },
        {
         "name": "type",
         "type": "\"mcp_list_tools\"",
         "required": true,
         "description": "The type of the item. Always `mcp_list_tools`.",
         "enum": [
          "mcp_list_tools"
         ]
        },
        {
         "name": "id",
         "type": "string",
         "required": false,
         "description": "The unique ID of the list."
        }
       ]
      },
      {
       "variant": "RealtimeMcpToolCall object { id, arguments, name, 5 more }",
       "description": "A Realtime item representing an invocation of a tool on an MCP server.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the tool call."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of the arguments passed to the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool that was run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server running the tool."
        },
        {
         "name": "type",
         "type": "\"mcp_call\"",
         "required": true,
         "description": "The type of the item. Always `mcp_call`.",
         "enum": [
          "mcp_call"
         ]
        },
        {
         "name": "approval_request_id",
         "type": "string or null",
         "required": false,
         "description": "The ID of an associated approval request, if any."
        },
        {
         "name": "error",
         "type": "RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null",
         "required": false,
         "description": "The error from the tool call, if any.",
         "variants": [
          {
           "variant": "RealtimeMcpProtocolError object { code, message, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "RealtimeMcpToolExecutionError object { message, type }",
           "description": "",
           "fields": "…"
          },
          {
           "variant": "RealtimeMcphttpError object { code, message, type }",
           "description": "",
           "fields": "…"
          }
         ]
        },
        {
         "name": "output",
         "type": "string or null",
         "required": false,
         "description": "The output from the tool call."
        }
       ]
      },
      {
       "variant": "RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }",
       "description": "A Realtime item requesting human approval of a tool invocation.",
       "fields": [
        {
         "name": "id",
         "type": "string",
         "required": true,
         "description": "The unique ID of the approval request."
        },
        {
         "name": "arguments",
         "type": "string",
         "required": true,
         "description": "A JSON string of arguments for the tool."
        },
        {
         "name": "name",
         "type": "string",
         "required": true,
         "description": "The name of the tool to run."
        },
        {
         "name": "server_label",
         "type": "string",
         "required": true,
         "description": "The label of the MCP server making the request."
        },
        {
         "name": "type",
         "type": "\"mcp_approval_request\"",
         "required": true,
         "description": "The type of the item. Always `mcp_approval_request`.",
         "enum": [
          "mcp_approval_request"
         ]
        }
       ]
      }
     ]
    },
    {
     "name": "type",
     "type": "\"conversation.item.created\"",
     "required": true,
     "description": "The event type, must be `conversation.item.created`.",
     "enum": [
      "conversation.item.created"
     ]
    },
    {
     "name": "previous_item_id",
     "type": "string or null",
     "required": false,
     "description": "The ID of the preceding item in the Conversation context, allows the client to understand the order of the conversation. Can be `null` if the item has no predecessor."
    }
   ]
  },
  "example": {
   "event_id": "event_1920",
   "type": "conversation.item.created",
   "previous_item_id": "msg_002",
   "item": {
    "id": "msg_003",
    "object": "realtime.item",
    "type": "message",
    "status": "completed",
    "role": "user",
    "content": []
   }
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel",
   "sip-sideband-websocket"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/server-events#conversation.item.created",
   "retrieved_at": "2026-09-19T01:31:51Z"
  },
  "notes": "Listed at the end of the server-events reference; `conversation.item.created` is the pre-GA name of `conversation.item.added` and was NOT observed in the GA WebSocket probe (only `.added`/`.done` were).",
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime-translation",
  "direction": "client→server",
  "event": "session.update",
  "description": "Send this event to update the translation session configuration. Translation sessions support updates to `audio.output.language`, `audio.input.transcription`, and `audio.input.noise_reduction`.",
  "schema": {
   "schema_name": "RealtimeTranslationClientEventSessionUpdate",
   "fields": [
    {
     "name": "session",
     "type": "RealtimeTranslationSessionUpdateRequest",
     "required": true,
     "description": "Translation session fields to update. The session `type` and `model` are set at creation and cannot be changed with `session.update`.",
     "fields": [
      {
       "name": "audio",
       "type": "object { input, output }",
       "required": false,
       "description": "Configuration for translation input and output audio.",
       "fields": "… 2 nested fields (see source)"
      }
     ]
    },
    {
     "name": "type",
     "type": "\"session.update\"",
     "required": true,
     "description": "The event type, must be `session.update`.",
     "enum": [
      "session.update"
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": false,
     "description": "Optional client-generated ID used to identify this event."
    }
   ]
  },
  "example": {
   "type": "session.update",
   "session": {
    "audio": {
     "input": {
      "transcription": {
       "model": "gpt-realtime-whisper"
      },
      "noise_reduction": null
     },
     "output": {
      "language": "es"
     }
    }
   }
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/translation-client-events#session.update",
   "retrieved_at": "2026-09-19T01:31:52Z"
  },
  "connection": "wss://api.openai.com/v1/realtime/translations?model=gpt-realtime-translate (or POST /v1/realtime/translations/calls for WebRTC)",
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime-translation",
  "direction": "client→server",
  "event": "session.input_audio_buffer.append",
  "description": "Send this event to append audio bytes to the translation session input audio buffer. WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono little-endian raw audio bytes. Unsupported websocket audio formats return a validation error because lower-quality audio materially degrades translation quality. Translation consumes 200 ms engine frames. For best realtime behavior, append audio in 200 ms chunks. If a chunk is shorter, the server buffers it until it has enough audio for one frame. If a chunk is longer, the server splits it into 200 ms frames and enqueues them back-to-back. Keep appending silence while the session is active. If a client stops sending audio and later resumes, model time treats the resumed audio as contiguous with the previous audio rather than as a real-world pause.",
  "schema": {
   "schema_name": "RealtimeTranslationClientEventInputAudioBufferAppend",
   "fields": [
    {
     "name": "audio",
     "type": "string",
     "required": true,
     "description": "Base64-encoded 24 kHz PCM16 mono audio bytes."
    },
    {
     "name": "type",
     "type": "\"session.input_audio_buffer.append\"",
     "required": true,
     "description": "The event type, must be `session.input_audio_buffer.append`.",
     "enum": [
      "session.input_audio_buffer.append"
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": false,
     "description": "Optional client-generated ID used to identify this event."
    }
   ]
  },
  "example": {
   "event_id": "event_456",
   "type": "session.input_audio_buffer.append",
   "audio": "Base64EncodedAudioData"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/translation-client-events#session.input_audio_buffer.append",
   "retrieved_at": "2026-09-19T01:31:52Z"
  },
  "connection": "wss://api.openai.com/v1/realtime/translations?model=gpt-realtime-translate (or POST /v1/realtime/translations/calls for WebRTC)",
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime-translation",
  "direction": "client→server",
  "event": "session.close",
  "description": "Gracefully close the realtime translation session. The server flushes pending input audio and emits any remaining translated output before closing the session.",
  "schema": {
   "schema_name": "RealtimeTranslationClientEventSessionClose",
   "fields": [
    {
     "name": "type",
     "type": "\"session.close\"",
     "required": true,
     "description": "The event type, must be `session.close`.",
     "enum": [
      "session.close"
     ]
    },
    {
     "name": "event_id",
     "type": "string",
     "required": false,
     "description": "Optional client-generated ID used to identify this event."
    }
   ]
  },
  "example": {
   "event_id": "event_789",
   "type": "session.close"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/translation-client-events#session.close",
   "retrieved_at": "2026-09-19T01:31:52Z"
  },
  "connection": "wss://api.openai.com/v1/realtime/translations?model=gpt-realtime-translate (or POST /v1/realtime/translations/calls for WebRTC)",
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime-translation",
  "direction": "server→client",
  "event": "session.created",
  "description": "Returned when a translation session is created. Emitted automatically when a new connection is established as the first server event. This event contains the default translation session configuration.",
  "schema": {
   "schema_name": "RealtimeTranslationServerEventSessionCreated",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "session",
     "type": "RealtimeTranslationSession",
     "required": true,
     "description": "The translation session configuration.",
     "fields": [
      {
       "name": "id",
       "type": "string",
       "required": true,
       "description": "Unique identifier for the session that looks like `sess_1234567890abcdef`."
      },
      {
       "name": "audio",
       "type": "object { input, output }",
       "required": true,
       "description": "Configuration for translation input and output audio.",
       "fields": "… 2 nested fields (see source)"
      },
      {
       "name": "expires_at",
       "type": "number",
       "required": true,
       "description": "Expiration timestamp for the session, in seconds since epoch."
      },
      {
       "name": "model",
       "type": "string",
       "required": true,
       "description": "The Realtime translation model used for this session. This field is set at session creation and cannot be changed with `session.update`."
      },
      {
       "name": "type",
       "type": "\"translation\"",
       "required": true,
       "description": "The session type. Always `translation` for Realtime translation sessions.",
       "enum": [
        "translation"
       ]
      }
     ]
    },
    {
     "name": "type",
     "type": "\"session.created\"",
     "required": true,
     "description": "The event type, must be `session.created`.",
     "enum": [
      "session.created"
     ]
    }
   ]
  },
  "example": {
   "type": "session.created",
   "event_id": "event_123",
   "session": {
    "id": "sess_123",
    "type": "translation",
    "model": "gpt-realtime-translate",
    "expires_at": 1714857600,
    "audio": {
     "input": {
      "transcription": {
       "model": "gpt-realtime-whisper",
       "language": "en"
      },
      "noise_reduction": {
       "type": "near_field"
      }
     },
     "output": {
      "language": "fr"
     }
    }
   }
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/translation-server-events#session.created",
   "retrieved_at": "2026-09-19T01:31:52Z"
  },
  "connection": "wss://api.openai.com/v1/realtime/translations?model=gpt-realtime-translate (or POST /v1/realtime/translations/calls for WebRTC)",
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime-translation",
  "direction": "server→client",
  "event": "session.updated",
  "description": "Returned when a translation session is updated with a `session.update` event, unless there is an error.",
  "schema": {
   "schema_name": "RealtimeTranslationServerEventSessionUpdated",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "session",
     "type": "RealtimeTranslationSession",
     "required": true,
     "description": "The translation session configuration.",
     "fields": [
      {
       "name": "id",
       "type": "string",
       "required": true,
       "description": "Unique identifier for the session that looks like `sess_1234567890abcdef`."
      },
      {
       "name": "audio",
       "type": "object { input, output }",
       "required": true,
       "description": "Configuration for translation input and output audio.",
       "fields": "… 2 nested fields (see source)"
      },
      {
       "name": "expires_at",
       "type": "number",
       "required": true,
       "description": "Expiration timestamp for the session, in seconds since epoch."
      },
      {
       "name": "model",
       "type": "string",
       "required": true,
       "description": "The Realtime translation model used for this session. This field is set at session creation and cannot be changed with `session.update`."
      },
      {
       "name": "type",
       "type": "\"translation\"",
       "required": true,
       "description": "The session type. Always `translation` for Realtime translation sessions.",
       "enum": [
        "translation"
       ]
      }
     ]
    },
    {
     "name": "type",
     "type": "\"session.updated\"",
     "required": true,
     "description": "The event type, must be `session.updated`.",
     "enum": [
      "session.updated"
     ]
    }
   ]
  },
  "example": {
   "type": "session.updated",
   "event_id": "event_124",
   "session": {
    "id": "sess_123",
    "type": "translation",
    "model": "gpt-realtime-translate",
    "expires_at": 1714857600,
    "audio": {
     "input": {
      "transcription": {
       "model": "gpt-realtime-whisper",
       "language": "en"
      },
      "noise_reduction": {
       "type": "near_field"
      }
     },
     "output": {
      "language": "es"
     }
    }
   }
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/translation-server-events#session.updated",
   "retrieved_at": "2026-09-19T01:31:52Z"
  },
  "connection": "wss://api.openai.com/v1/realtime/translations?model=gpt-realtime-translate (or POST /v1/realtime/translations/calls for WebRTC)",
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime-translation",
  "direction": "server→client",
  "event": "session.closed",
  "description": "Returned when a realtime translation session is closed.",
  "schema": {
   "schema_name": "RealtimeTranslationServerEventSessionClosed",
   "fields": [
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "type",
     "type": "\"session.closed\"",
     "required": true,
     "description": "The event type, must be `session.closed`.",
     "enum": [
      "session.closed"
     ]
    }
   ]
  },
  "example": {
   "event_id": "event_987",
   "type": "session.closed"
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/translation-server-events#session.closed",
   "retrieved_at": "2026-09-19T01:31:52Z"
  },
  "connection": "wss://api.openai.com/v1/realtime/translations?model=gpt-realtime-translate (or POST /v1/realtime/translations/calls for WebRTC)",
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime-translation",
  "direction": "server→client",
  "event": "session.input_transcript.delta",
  "description": "Returned when optional source-language transcript text is available. This event is emitted only when `audio.input.transcription` is configured. Transcript deltas are append-only text fragments. Clients should not insert unconditional spaces between deltas.",
  "schema": {
   "schema_name": "RealtimeTranslationServerEventSessionInputTranscriptDelta",
   "fields": [
    {
     "name": "delta",
     "type": "string",
     "required": true,
     "description": "Append-only source-language transcript text."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "type",
     "type": "\"session.input_transcript.delta\"",
     "required": true,
     "description": "The event type, must be `session.input_transcript.delta`.",
     "enum": [
      "session.input_transcript.delta"
     ]
    },
    {
     "name": "elapsed_ms",
     "type": "number or null",
     "required": false,
     "description": "Timing metadata for stream alignment, derived from the translation frame when available. It advances in 200 ms increments, but multiple transcript deltas may share the same `elapsed_ms`. Treat it as alignment metadata, not a unique transcript-delta identifier."
    }
   ]
  },
  "example": {
   "event_id": "event_125",
   "type": "session.input_transcript.delta",
   "delta": " hear",
   "elapsed_ms": 1200
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/translation-server-events#session.input_transcript.delta",
   "retrieved_at": "2026-09-19T01:31:52Z"
  },
  "connection": "wss://api.openai.com/v1/realtime/translations?model=gpt-realtime-translate (or POST /v1/realtime/translations/calls for WebRTC)",
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime-translation",
  "direction": "server→client",
  "event": "session.output_transcript.delta",
  "description": "Returned when translated transcript text is available. Transcript deltas are append-only text fragments. Clients should not insert unconditional spaces between deltas.",
  "schema": {
   "schema_name": "RealtimeTranslationServerEventSessionOutputTranscriptDelta",
   "fields": [
    {
     "name": "delta",
     "type": "string",
     "required": true,
     "description": "Append-only transcript text for the translated output audio."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "type",
     "type": "\"session.output_transcript.delta\"",
     "required": true,
     "description": "The event type, must be `session.output_transcript.delta`.",
     "enum": [
      "session.output_transcript.delta"
     ]
    },
    {
     "name": "elapsed_ms",
     "type": "number or null",
     "required": false,
     "description": "Timing metadata for stream alignment, derived from the translation frame when available. It advances in 200 ms increments, but multiple transcript deltas may share the same `elapsed_ms`. Treat it as alignment metadata, not a unique transcript-delta identifier."
    }
   ]
  },
  "example": {
   "event_id": "event_124",
   "type": "session.output_transcript.delta",
   "delta": " escuch",
   "elapsed_ms": 1200
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/translation-server-events#session.output_transcript.delta",
   "retrieved_at": "2026-09-19T01:31:52Z"
  },
  "connection": "wss://api.openai.com/v1/realtime/translations?model=gpt-realtime-translate (or POST /v1/realtime/translations/calls for WebRTC)",
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "realtime-translation",
  "direction": "server→client",
  "event": "session.output_audio.delta",
  "description": "Returned when translated output audio is available. The `delta` contains a PCM16 audio chunk whose length can vary. Clients should decode and queue the complete delta instead of assuming a fixed byte or sample count.",
  "schema": {
   "schema_name": "RealtimeTranslationServerEventSessionOutputAudioDelta",
   "fields": [
    {
     "name": "delta",
     "type": "string",
     "required": true,
     "description": "Base64-encoded translated audio data."
    },
    {
     "name": "event_id",
     "type": "string",
     "required": true,
     "description": "The unique ID of the server event."
    },
    {
     "name": "type",
     "type": "\"session.output_audio.delta\"",
     "required": true,
     "description": "The event type, must be `session.output_audio.delta`.",
     "enum": [
      "session.output_audio.delta"
     ]
    },
    {
     "name": "channels",
     "type": "number",
     "required": false,
     "description": "Number of audio channels."
    },
    {
     "name": "elapsed_ms",
     "type": "number or null",
     "required": false,
     "description": "Timing metadata for stream alignment, derived from the translation frame when available. Treat `elapsed_ms` as alignment metadata, not a unique event identifier."
    },
    {
     "name": "format",
     "type": "\"pcm16\"",
     "required": false,
     "description": "Audio encoding for `delta`.",
     "enum": [
      "pcm16"
     ]
    },
    {
     "name": "sample_rate",
     "type": "number",
     "required": false,
     "description": "Sample rate of the audio delta."
    }
   ]
  },
  "example": {
   "event_id": "event_123",
   "type": "session.output_audio.delta",
   "delta": "Base64EncodedAudioDelta",
   "sample_rate": 24000,
   "channels": 1,
   "format": "pcm16",
   "elapsed_ms": 1200
  },
  "status": [
   "DOCUMENTED"
  ],
  "transports": [
   "websocket",
   "webrtc-datachannel"
  ],
  "source": {
   "url": "https://developers.openai.com/api/reference/resources/realtime/translation-server-events#session.output_audio.delta",
   "retrieved_at": "2026-09-19T01:31:52Z"
  },
  "connection": "wss://api.openai.com/v1/realtime/translations?model=gpt-realtime-translate (or POST /v1/realtime/translations/calls for WebRTC)",
  "_fragment": "generated/fragments/streaming-events/openai-realtime.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "client→server",
  "event": "response.create",
  "description": "Client event for creating a response over a persistent WebSocket connection. This payload uses the same top-level fields as `POST /v1/responses`, plus WebSocket-only envelope metadata. Notes: - `stream` is implicit over WebSocket and should not be sent. - `background` is not supported over WebSocket. - `stream_id` is WebSocket-only and is not part of `POST /v1/responses`.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the client event. Always `response.create`."
    },
    "stream_id": {
     "type": "string",
     "description": "The WebSocket lane for this response. Requests with the same `stream_id` are processed FIFO, and events for the response echo the same `stream_id`. `stream_id` controls routing; `previous_response_id` controls conversation lineage, so a new lane can fork from a response created on another lane."
    },
    "...CreateResponse fields": {
     "type": "see parameters/openai-responses.json",
     "description": "All POST /v1/responses body fields; `stream` implicit, `background` unsupported, `generate:false` for warm-up."
    }
   },
   "required": [
    "type"
   ]
  },
  "example": {
   "type": "response.create",
   "stream_id": "agent_1",
   "model": "gpt-6-astra",
   "input": "Say hello."
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.create",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponsesClientEventResponseCreate",
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "client→server",
  "event": "response.steer",
  "description": "Queues user input to steer a response on this WebSocket connection. Input can contain text, images, and files. Steering is supported only for single-agent responses on models and execution modes that support steering. Responses bound to a conversation or using automatic compaction do not support steering. A `response.steer.accepted` event acknowledges that the server owns the queued input, not that it has been applied. The successor's `response.created` event is the commit point. Input that cannot be committed is returned in `response.steer.failed`. Steering may cause the active response to finish at a safe output boundary with `response.incomplete` and `incomplete_details.reason` set to `steered`, followed automatically by a successor `response.created`. Normal completion can also be followed by an automatic successor. Automatic successors inherit the previous response's settings and co",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The event discriminator. Always `response.steer`."
    },
    "previous_response_id": {
     "type": "string",
     "description": "The ID of the response to steer on this WebSocket connection."
    },
    "input": {
     "type": "string | array<object<message> | object<function_call_output>>",
     "description": "Input to queue for a continuation of the response. Uses the same string or input-item shape as `response.create.input`, with a non-empty array when supplying input items. Steering accepts only messages with the `user` role. Each message may contain only `type`, `role`, and `content`, with `content` as a string or an array of `input_text`, `input_image`, and `input_file` parts. The optional `type` must be `message`. Other roles, tool outputs, and item types are not supported for steering."
    }
   },
   "required": [
    "type",
    "previous_response_id",
    "input"
   ]
  },
  "example": {
   "type": "response.steer",
   "previous_response_id": "resp_123",
   "input": [
    {
     "type": "message",
     "role": "user",
     "content": [
      {
       "type": "input_text",
       "text": "Prioritize the database rollout."
      }
     ]
    }
   ]
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.steer",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseSteerEvent",
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "client→server",
  "event": "response.inject",
  "description": "Injects input items into an active response over a WebSocket connection. The items are validated and committed atomically. Currently, the server accepts client-owned tool outputs that resume a waiting agent.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The event discriminator. Always `response.inject`."
    },
    "response_id": {
     "type": "string",
     "description": "The ID of the active response that should receive the input."
    },
    "input": {
     "type": "array<object<message> | object<message> | object<file_search_call> | object<computer_call> | object<computer_call_output> | object<web_search_call> | object<function_call> | object<function_call_output> | object<agent_message> | object<multi_agent_call> | object<multi_agent_call_output> | object<tool_search_call> | object<tool_search_output> | object<additional_tools> | object<configuration_update> | object<reasoning> | object<compaction> | object<image_generation_call> | object<code_interpreter_call> | object<local_shell_call> | object<local_shell_call_output> | object<shell_call> | object<shell_call_output> | object<apply_patch_call> | object<apply_patch_call_output> | object<mcp_list_tools> | object<mcp_approval_request> | object<mcp_approval_response> | object<mcp_call> | object<custom_tool_call_output> | object<custom_tool_call> | object<compaction_trigger> | BetaItemReferenceParam | object<program> | object<program_output>>",
     "description": "Input items to inject into the active response."
    }
   },
   "required": [
    "type",
    "response_id",
    "input"
   ]
  },
  "example": {
   "type": "response.inject",
   "response_id": "resp_123",
   "input": [
    {
     "type": "function_call_output",
     "call_id": "call_123",
     "output": "{\"temperature\":72}"
    }
   ]
  },
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/responses/websocket-events#response.inject",
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "schema_name": "BetaResponseInjectEvent",
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.audio.delta",
  "description": "Emitted when there is a partial audio response.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.audio.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "audio",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.audio.done",
  "description": "Emitted when the audio response is complete.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.audio.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "audio",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.audio.transcript.delta",
  "description": "Emitted when there is a partial transcript of audio.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.audio.transcript.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "audio",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.audio.transcript.done",
  "description": "Emitted when the full audio transcript is completed.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.audio.transcript.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "audio",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.code_interpreter_call_code.delta",
  "description": "Emitted when a partial code snippet is streamed by the code interpreter.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.code_interpreter_call_code.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "hosted_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.code_interpreter_call_code.done",
  "description": "Emitted when the code snippet is finalized by the code interpreter.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.code_interpreter_call_code.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "hosted_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.code_interpreter_call.completed",
  "description": "Emitted when the code interpreter call is completed.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.code_interpreter_call.completed",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "hosted_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.code_interpreter_call.in_progress",
  "description": "Emitted when a code interpreter call is in progress.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.code_interpreter_call.in_progress",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "hosted_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.code_interpreter_call.interpreting",
  "description": "Emitted when the code interpreter is actively interpreting the code snippet.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.code_interpreter_call.interpreting",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "hosted_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.compaction.compacting",
  "description": "Emitted when new summary content is sampled for a compaction trigger. Contains no summary content.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.compaction.compacting",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "compaction",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.completed",
  "description": "Emitted when the model response is complete.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.completed",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "response_lifecycle",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.content_part.added",
  "description": "Emitted when a new content part is added.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.content_part.added",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "item_lifecycle",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.content_part.done",
  "description": "Emitted when a content part is done.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.content_part.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "item_lifecycle",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.created",
  "description": "An event that is emitted when a response is created.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.created",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "response_lifecycle",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.file_search_call.completed",
  "description": "Emitted when a file search call is completed (results found).",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.file_search_call.completed",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "hosted_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.file_search_call.in_progress",
  "description": "Emitted when a file search call is initiated.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.file_search_call.in_progress",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "hosted_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.file_search_call.searching",
  "description": "Emitted when a file search is currently searching.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.file_search_call.searching",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "hosted_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.function_call_arguments.delta",
  "description": "Emitted when there is a partial function-call arguments delta.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.function_call_arguments.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "function_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.function_call_arguments.done",
  "description": "Emitted when function-call arguments are finalized.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.function_call_arguments.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "function_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.shell_call_command.added",
  "description": "A streaming event that indicated a shell command was added to a tool call.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.shell_call_command.added",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "shell_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.shell_call_command.delta",
  "description": "A streaming event that indicated a shell command was incrementally updated.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.shell_call_command.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "shell_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.shell_call_command.done",
  "description": "A streaming event that indicated a shell command was completed.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.shell_call_command.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "shell_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.shell_call_output_content.delta",
  "description": "A streaming event that indicated shell call output was incrementally added.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.shell_call_output_content.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "shell_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.shell_call_output_content.done",
  "description": "A streaming event that indicated shell call output was completed.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.shell_call_output_content.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "shell_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.in_progress",
  "description": "Emitted when the response is in progress.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.in_progress",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "response_lifecycle",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.failed",
  "description": "An event that is emitted when a response fails.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.failed",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "response_lifecycle",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.incomplete",
  "description": "An event that is emitted when a response finishes as incomplete. Over WebSocket, steering can finish a response with `response.incomplete_details.reason` set to `steered`, followed automatically by a successor `response.created` that commits the queued steering input.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.incomplete",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "response_lifecycle",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.output_item.added",
  "description": "Emitted when a new output item is added.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.output_item.added",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "item_lifecycle",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.output_item.done",
  "description": "Emitted when an output item is marked done.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.output_item.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "item_lifecycle",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.reasoning_summary_part.added",
  "description": "Emitted when a new reasoning summary part is added.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.reasoning_summary_part.added",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "reasoning",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.reasoning_summary_part.done",
  "description": "Emitted when a reasoning summary part is completed.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.reasoning_summary_part.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "reasoning",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.reasoning_summary_text.delta",
  "description": "Emitted when a delta is added to a reasoning summary text.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.reasoning_summary_text.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "reasoning",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.reasoning_summary_text.done",
  "description": "Emitted when a reasoning summary text is completed.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.reasoning_summary_text.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "reasoning",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.reasoning_text.delta",
  "description": "Emitted when a delta is added to a reasoning text.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.reasoning_text.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "reasoning",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.reasoning_text.done",
  "description": "Emitted when a reasoning text is completed.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.reasoning_text.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "reasoning",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.refusal.delta",
  "description": "Emitted when there is a partial refusal text.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.refusal.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "text",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.refusal.done",
  "description": "Emitted when refusal text is finalized.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.refusal.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "text",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.output_text.delta",
  "description": "Emitted when there is an additional text delta.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.output_text.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "text",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.output_text.done",
  "description": "Emitted when text content is finalized.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.output_text.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "text",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.web_search_call.completed",
  "description": "Emitted when a web search call is completed.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.web_search_call.completed",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "hosted_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.web_search_call.in_progress",
  "description": "Emitted when a web search call is initiated.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.web_search_call.in_progress",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "hosted_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.web_search_call.searching",
  "description": "Emitted when a web search call is executing.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.web_search_call.searching",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "hosted_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.image_generation_call.completed",
  "description": "Emitted when an image generation tool call has completed and the final image is available.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.image_generation_call.completed",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "hosted_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.image_generation_call.generating",
  "description": "Emitted when an image generation tool call is actively generating an image (intermediate state).",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.image_generation_call.generating",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "hosted_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.image_generation_call.in_progress",
  "description": "Emitted when an image generation tool call is in progress.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.image_generation_call.in_progress",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "hosted_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.image_generation_call.partial_image",
  "description": "Emitted when a partial image is available during image generation streaming.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.image_generation_call.partial_image",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "hosted_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.mcp_call_arguments.delta",
  "description": "Emitted when there is a delta (partial update) to the arguments of an MCP tool call.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.mcp_call_arguments.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "mcp",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.mcp_call_arguments.done",
  "description": "Emitted when the arguments for an MCP tool call are finalized.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.mcp_call_arguments.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "mcp",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.mcp_call.completed",
  "description": "Emitted when an MCP tool call has completed successfully.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.mcp_call.completed",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "mcp",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.mcp_call.failed",
  "description": "Emitted when an MCP tool call has failed.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.mcp_call.failed",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "mcp",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.mcp_call.in_progress",
  "description": "Emitted when an MCP tool call is in progress.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.mcp_call.in_progress",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "mcp",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.mcp_list_tools.completed",
  "description": "Emitted when the list of available MCP tools has been successfully retrieved.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.mcp_list_tools.completed",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "mcp",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.mcp_list_tools.failed",
  "description": "Emitted when the attempt to list available MCP tools has failed.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.mcp_list_tools.failed",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "mcp",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.mcp_list_tools.in_progress",
  "description": "Emitted when the system is in the process of retrieving the list of available MCP tools.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.mcp_list_tools.in_progress",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "mcp",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.output_text.annotation.added",
  "description": "Emitted when an annotation is added to output text content.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.output_text.annotation.added",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "text",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.queued",
  "description": "Emitted when a response is queued and waiting to be processed.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.queued",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "response_lifecycle",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.custom_tool_call_input.delta",
  "description": "Event representing a delta (partial update) to the input of a custom tool call.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.custom_tool_call_input.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "custom_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.custom_tool_call_input.done",
  "description": "Event indicating that input for a custom tool call is complete.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.custom_tool_call_input.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": null,
  "category": "custom_tool",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "error",
  "description": "Emitted when an error occurs while processing a Responses WebSocket request.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#error",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseWsError",
  "category": "error",
  "same_as_sse": true,
  "schema": {
   "properties": {
    "stream_id": {
     "type": "string",
     "description": "Echoed for named lanes only (omitted on the implicit default lane)."
    }
   },
   "required": [],
   "note": "Same payload as the SSE event of the same type (see openai-responses.json) plus the optional stream_id envelope field."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.steer.accepted",
  "description": "Emitted when steering input has been validated and queued. Acceptance means the server owns the input, not that it has been applied. The successor's `response.created` event is the commit point. If accepted input cannot be committed, `response.steer.failed` returns it with the same steering ID. When the response stops for client-owned tool output or approval, the input remains queued and `response.steer.pending` is emitted after `response.completed`. Fill the pending event's `required_input` stubs with saved results and send one matching explicit `response.create` per parent. Do not resend accepted input while it is still queued.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.steer.accepted",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseSteerAcceptedEvent",
  "category": "websocket_steering",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The event discriminator. Always `response.steer.accepted`."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number for this event."
    },
    "steer": {
     "type": "object",
     "description": "The accepted steering submission."
    },
    "stream_id": {
     "type": "string",
     "description": "The WebSocket lane that emitted this event. This field is present when the target response's `response.create` event supplied a `stream_id`."
    }
   },
   "required": [
    "type",
    "sequence_number",
    "steer"
   ]
  },
  "example": {
   "type": "response.steer.accepted",
   "sequence_number": 2,
   "steer": {
    "id": "steer_456",
    "previous_response_id": "resp_123"
   }
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.steer.pending",
  "description": "Emitted when accepted steering input remains queued after the target response completes. The server still owns the input. Do not resend it. The successor's `response.created` event is the commit point. When `reason` is `waiting_for_required_input`, this event follows `response.completed` while the response waits for the tool results or approval decisions identified by `required_input`. Copy those stubs, fill their result fields using the ordinary `response.create` input schemas, and submit one continuation per parent with the same `previous_response_id` and WebSocket lane. Use saved results without rerunning tools. The queued steering input is prepended in submission order to the continuation's input. That explicit request retains its own settings. This notification is emitted at most once per steering submission. Multiple submissions for the same parent can report the same required inpu",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.steer.pending",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseSteerPendingEvent",
  "category": "websocket_steering",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The event discriminator. Always `response.steer.pending`."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number for this event."
    },
    "steer": {
     "type": "object",
     "description": "The steering submission that remains queued."
    },
    "reason": {
     "type": "string",
     "description": "An extensible enum describing why accepted steering input is still queued. Clients should handle unknown values because additional reasons may be introduced. Known values include: - `waiting_for_required_input`: The response is waiting for the tool results or approval decisions identified by `required_input`."
    },
    "required_input": {
     "type": "array<object<function_call_output> | object<custom_tool_call_output> | object<computer_call_output> | object<shell_call_output> | object<apply_patch_call_output> | object<tool_search_output> | object<mcp_approval_response>>",
     "description": "Input stubs identifying outstanding client-owned tool results or approval decisions. Each stub contains identifying fields only; the client supplies the result before including it in `response.create`."
    },
    "stream_id": {
     "type": "string",
     "description": "The WebSocket lane that emitted this event. This field is present when the target response's `response.create` event supplied a `stream_id`."
    }
   },
   "required": [
    "type",
    "sequence_number",
    "steer",
    "reason",
    "required_input"
   ]
  },
  "example": {
   "type": "response.steer.pending",
   "sequence_number": 10,
   "steer": {
    "id": "steer_456",
    "previous_response_id": "resp_123"
   },
   "reason": "waiting_for_required_input",
   "required_input": [
    {
     "type": "function_call_output",
     "call_id": "call_789",
     "name": "lookup"
    }
   ]
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.steer.failed",
  "description": "Emitted when steering input is rejected or cannot be committed to a successor response. Returns the original, uncommitted input so the client can carry it into `response.create` when appropriate. Invalid input must be corrected before retrying. Failures after acceptance include the same steering ID. Failures before an ID is allocated omit `steer.id`. A lost connection or missing acknowledgement leaves the outcome unknown; it is not proof that the input was rejected.",
  "source": "https://developers.openai.com/api/reference/resources/responses/websocket-events#response.steer.failed",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseSteerFailedEvent",
  "category": "websocket_steering",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The event discriminator. Always `response.steer.failed`."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number for this event."
    },
    "steer": {
     "type": "object",
     "description": "The steering submission that could not be committed."
    },
    "error": {
     "type": "object",
     "description": "Information about why the input could not be committed."
    },
    "stream_id": {
     "type": "string",
     "description": "The WebSocket lane that emitted this event, when the target response is available and its `response.create` event supplied a `stream_id`."
    }
   },
   "required": [
    "type",
    "sequence_number",
    "steer",
    "error"
   ]
  },
  "example": {
   "type": "response.steer.failed",
   "sequence_number": 5,
   "steer": {
    "id": "steer_456",
    "previous_response_id": "resp_123",
    "input": [
     {
      "type": "message",
      "role": "user",
      "content": [
       {
        "type": "input_text",
        "text": "Prioritize the database rollout."
       }
      ]
     }
    ]
   },
   "error": {
    "type": "invalid_request_error",
    "code": "successor_creation_failed",
    "message": "We couldn't start the next response. Send this steering input again with response.create."
   }
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.inject.created",
  "description": "Emitted when all injected input items were validated and committed to the active response.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The event discriminator. Always `response.inject.created`."
    },
    "response_id": {
     "type": "string",
     "description": "The ID of the response that accepted the input."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number for this event."
    },
    "stream_id": {
     "type": "string",
     "description": "The multiplexed WebSocket stream that emitted the event. This field is present only when WebSocket multiplexing is enabled separately."
    }
   },
   "required": [
    "type",
    "response_id",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.inject.created",
   "response_id": "resp_123",
   "sequence_number": 8
  },
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/responses/websocket-events#response.inject.created",
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "schema_name": "BetaResponseInjectCreatedEvent",
  "category": "websocket_inject",
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "response.inject.failed",
  "description": "Emitted when injected input could not be committed to a response. The event returns the uncommitted raw input so the client can retry it in another response when appropriate.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The event discriminator. Always `response.inject.failed`."
    },
    "response_id": {
     "type": "string",
     "description": "The ID of the response that rejected the input."
    },
    "input": {
     "type": "array<object<message> | object<message> | object<file_search_call> | object<computer_call> | object<computer_call_output> | object<web_search_call> | object<function_call> | object<function_call_output> | object<agent_message> | object<multi_agent_call> | object<multi_agent_call_output> | object<tool_search_call> | object<tool_search_output> | object<additional_tools> | object<configuration_update> | object<reasoning> | object<compaction> | object<image_generation_call> | object<code_interpreter_call> | object<local_shell_call> | object<local_shell_call_output> | object<shell_call> | object<shell_call_output> | object<apply_patch_call> | object<apply_patch_call_output> | object<mcp_list_tools> | object<mcp_approval_request> | object<mcp_approval_response> | object<mcp_call> | object<custom_tool_call_output> | object<custom_tool_call> | object<compaction_trigger> | BetaItemReferenceParam | object<program> | object<program_output>>",
     "description": "The raw input items that were not committed."
    },
    "error": {
     "type": "object",
     "description": "Information about why the input was not committed."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number for this event."
    },
    "stream_id": {
     "type": "string",
     "description": "The multiplexed WebSocket stream that emitted the event. This field is present only when WebSocket multiplexing is enabled separately."
    }
   },
   "required": [
    "type",
    "response_id",
    "input",
    "error",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.inject.failed",
   "response_id": "resp_123",
   "input": [
    {
     "type": "function_call_output",
     "call_id": "call_123",
     "output": "{\"temperature\":72}"
    }
   ],
   "error": {
    "code": "response_already_completed",
    "message": "Response 'resp_123' has already completed."
   },
   "sequence_number": 9
  },
  "source": "https://developers.openai.com/api/reference/resources/beta/subresources/responses/websocket-events#response.inject.failed",
  "status": [
   "DOCUMENTED",
   "BETA"
  ],
  "schema_name": "BetaResponseInjectFailedEvent",
  "category": "websocket_inject",
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "error (code=previous_response_not_found)",
  "description": "Connection/request-scoped WebSocket error `previous_response_not_found`. Request-scoped errors carry stream_id when the lane is known; other lanes continue.",
  "schema": {
   "properties": {
    "type": {
     "type": "string"
    },
    "status": {
     "type": "integer"
    },
    "stream_id": {
     "type": "string"
    },
    "error": {
     "type": "object"
    }
   },
   "required": [
    "type",
    "error"
   ]
  },
  "example": {
   "type": "error",
   "status": 400,
   "error": {
    "type": "invalid_request_error",
    "code": "previous_response_not_found",
    "message": "Previous response with id 'resp_abc' not found.",
    "param": "previous_response_id"
   },
   "stream_id": "main"
  },
  "source": "https://developers.openai.com/api/docs/guides/websocket-mode#errors-to-handle",
  "status": [
   "DOCUMENTED"
  ],
  "category": "error",
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "error (code=invalid_stream_id)",
  "description": "Connection/request-scoped WebSocket error `invalid_stream_id`. Request-scoped errors carry stream_id when the lane is known; other lanes continue.",
  "schema": {
   "properties": {
    "type": {
     "type": "string"
    },
    "status": {
     "type": "integer"
    },
    "stream_id": {
     "type": "string"
    },
    "error": {
     "type": "object"
    }
   },
   "required": [
    "type",
    "error"
   ]
  },
  "example": {
   "type": "error",
   "status": 400,
   "error": {
    "type": "invalid_request_error",
    "code": "invalid_stream_id",
    "message": "The 'stream_id' field must be a non-empty string with at most 256 characters and may only contain letters, numbers, underscores, hyphens, and periods.",
    "param": "stream_id"
   }
  },
  "source": "https://developers.openai.com/api/docs/guides/websocket-mode#errors-to-handle",
  "status": [
   "DOCUMENTED"
  ],
  "category": "error",
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "error (code=websocket_stream_limit_reached)",
  "description": "Connection/request-scoped WebSocket error `websocket_stream_limit_reached`. Request-scoped errors carry stream_id when the lane is known; other lanes continue.",
  "schema": {
   "properties": {
    "type": {
     "type": "string"
    },
    "status": {
     "type": "integer"
    },
    "stream_id": {
     "type": "string"
    },
    "error": {
     "type": "object"
    }
   },
   "required": [
    "type",
    "error"
   ]
  },
  "example": {
   "type": "error",
   "status": 400,
   "error": {
    "type": "invalid_request_error",
    "code": "websocket_stream_limit_reached",
    "message": "This WebSocket connection has reached its maximum number of distinct stream IDs (32). Reuse an existing stream_id or open a new WebSocket connection.",
    "param": "stream_id"
   },
   "stream_id": "main"
  },
  "source": "https://developers.openai.com/api/docs/guides/websocket-mode#errors-to-handle",
  "status": [
   "DOCUMENTED"
  ],
  "category": "error",
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "error (code=websocket_connection_limit_reached)",
  "description": "Connection/request-scoped WebSocket error `websocket_connection_limit_reached`. Request-scoped errors carry stream_id when the lane is known; other lanes continue.",
  "schema": {
   "properties": {
    "type": {
     "type": "string"
    },
    "status": {
     "type": "integer"
    },
    "stream_id": {
     "type": "string"
    },
    "error": {
     "type": "object"
    }
   },
   "required": [
    "type",
    "error"
   ]
  },
  "example": {
   "type": "error",
   "status": 400,
   "error": {
    "type": "invalid_request_error",
    "code": "websocket_connection_limit_reached",
    "message": "Responses websocket connection limit reached (60 minutes). Create a new websocket connection to continue."
   }
  },
  "source": "https://developers.openai.com/api/docs/guides/websocket-mode#errors-to-handle",
  "status": [
   "DOCUMENTED"
  ],
  "category": "error",
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses-websocket",
  "direction": "server→client",
  "event": "_connection_limits",
  "description": "Documented limits for WebSocket mode.",
  "schema": null,
  "example": {
   "max_in_flight_responses_per_connection": 16,
   "max_distinct_named_stream_ids": 32,
   "connection_lifetime_minutes": 60,
   "stream_id_pattern": "^[A-Za-z0-9_.-]{1,256}$",
   "store_false_zdr_compatible": true,
   "background_supported": false
  },
  "source": "https://developers.openai.com/api/docs/guides/websocket-mode#connection-behavior-and-limits",
  "status": [
   "DOCUMENTED"
  ],
  "_fragment": "generated/fragments/streaming-events/openai-responses-websocket.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.audio.delta",
  "description": "Emitted when there is a partial audio response.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.audio.delta`."
    },
    "sequence_number": {
     "type": "integer",
     "description": "A sequence number for this chunk of the stream response."
    },
    "delta": {
     "type": "string",
     "description": "A chunk of Base64 encoded response audio bytes."
    }
   },
   "required": [
    "type",
    "delta",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.audio.delta",
   "response_id": "resp_123",
   "delta": "base64encoded...",
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.audio.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseAudioDeltaEvent",
  "category": "audio",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.audio.done",
  "description": "Emitted when the audio response is complete.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.audio.done`."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of the delta."
    }
   },
   "required": [
    "type",
    "sequence_number",
    "response_id"
   ]
  },
  "example": {
   "type": "response.audio.done",
   "response_id": "resp-123",
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.audio.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseAudioDoneEvent",
  "category": "audio",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.audio.transcript.delta",
  "description": "Emitted when there is a partial transcript of audio.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.audio.transcript.delta`."
    },
    "delta": {
     "type": "string",
     "description": "The partial transcript of the audio response."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    }
   },
   "required": [
    "type",
    "response_id",
    "delta",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.audio.transcript.delta",
   "response_id": "resp_123",
   "delta": " ... partial transcript ... ",
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.audio.transcript.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseAudioTranscriptDeltaEvent",
  "category": "audio",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.audio.transcript.done",
  "description": "Emitted when the full audio transcript is completed.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.audio.transcript.done`."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    }
   },
   "required": [
    "type",
    "response_id",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.audio.transcript.done",
   "response_id": "resp_123",
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.audio.transcript.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseAudioTranscriptDoneEvent",
  "category": "audio",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.code_interpreter_call_code.delta",
  "description": "Emitted when a partial code snippet is streamed by the code interpreter.",
  "schema": {
   "type": {
    "type": "string",
    "description": "The type of the event. Always `response.code_interpreter_call_code.delta`.",
    "enum": [
     "response.code_interpreter_call_code.delta"
    ]
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item in the response for which the code is being streamed."
   },
   "item_id": {
    "type": "string",
    "description": "The unique identifier of the code interpreter tool call item."
   },
   "delta": {
    "type": "string",
    "description": "The partial code snippet being streamed by the code interpreter."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event, used to order streaming events."
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.code_interpreter_call_code.done",
  "description": "Emitted when the code snippet is finalized by the code interpreter.",
  "schema": {
   "type": {
    "type": "string",
    "description": "The type of the event. Always `response.code_interpreter_call_code.done`.",
    "enum": [
     "response.code_interpreter_call_code.done"
    ]
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item in the response for which the code is finalized."
   },
   "item_id": {
    "type": "string",
    "description": "The unique identifier of the code interpreter tool call item."
   },
   "code": {
    "type": "string",
    "description": "The final code snippet output by the code interpreter."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event, used to order streaming events."
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.code_interpreter_call.completed",
  "description": "Emitted when the code interpreter call is completed.",
  "schema": {
   "type": {
    "type": "string",
    "description": "The type of the event. Always `response.code_interpreter_call.completed`.",
    "enum": [
     "response.code_interpreter_call.completed"
    ]
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item in the response for which the code interpreter call is completed."
   },
   "item_id": {
    "type": "string",
    "description": "The unique identifier of the code interpreter tool call item."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event, used to order streaming events."
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.code_interpreter_call.in_progress",
  "description": "Emitted when a code interpreter call is in progress.",
  "schema": {
   "type": {
    "type": "string",
    "description": "The type of the event. Always `response.code_interpreter_call.in_progress`.",
    "enum": [
     "response.code_interpreter_call.in_progress"
    ]
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item in the response for which the code interpreter call is in progress."
   },
   "item_id": {
    "type": "string",
    "description": "The unique identifier of the code interpreter tool call item."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event, used to order streaming events."
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.code_interpreter_call.interpreting",
  "description": "Emitted when the code interpreter is actively interpreting the code snippet.",
  "schema": {
   "type": {
    "type": "string",
    "description": "The type of the event. Always `response.code_interpreter_call.interpreting`.",
    "enum": [
     "response.code_interpreter_call.interpreting"
    ]
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item in the response for which the code interpreter is interpreting code."
   },
   "item_id": {
    "type": "string",
    "description": "The unique identifier of the code interpreter tool call item."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event, used to order streaming events."
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.compaction.compacting",
  "description": "Emitted when new summary content is sampled for a compaction trigger. Contains no summary content.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event, always `response.compaction.compacting`."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of the event that was emitted."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the compaction output item."
    },
    "item_id": {
     "type": "string",
     "description": "The ID of the compaction output item."
    }
   },
   "required": [
    "type",
    "sequence_number",
    "output_index",
    "item_id"
   ]
  },
  "example": null,
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.compaction.compacting",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseCompactionCompactingStreamingEvent",
  "category": "compaction",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.completed",
  "description": "Emitted when the model response is complete.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.completed`."
    },
    "response": {
     "type": "object",
     "description": "Properties of the completed response."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number for this event."
    }
   },
   "required": [
    "type",
    "response",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.completed",
   "response": {
    "id": "resp_123",
    "object": "response",
    "created_at": 1740855869,
    "status": "completed",
    "completed_at": 1740855870,
    "error": null,
    "incomplete_details": null,
    "input": [],
    "instructions": null,
    "max_output_tokens": null,
    "model": "gpt-6-astra",
    "output": [
     {
      "id": "msg_123",
      "type": "message",
      "role": "assistant",
      "content": [
       {
        "type": "output_text",
        "text": "In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.",
        "annotations": []
       }
      ]
     }
    ],
    "previous_response_id": null,
    "reasoning_effort": null,
    "store": false,
    "temperature": 1,
    "text": {
     "format": {
      "type": "text"
     }
    },
    "tool_choice": "auto",
    "tools": [],
    "top_p": 1,
    "truncation": "disabled",
    "usage": {
     "input_tokens": 0,
     "output_tokens": 0,
     "output_tokens_details": {
      "reasoning_tokens": 0
     },
     "total_tokens": 0
    },
    "user": null,
    "metadata": {}
   },
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.completed",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "schema_name": "ResponseCompletedEvent",
  "category": "response_lifecycle",
  "live_example": {
   "type": "response.completed",
   "response": {
    "id": "resp_04222362c67de163006aade8ff049c87d2b611d0ee66139558",
    "object": "response",
    "status": "completed",
    "model": "gpt-5.4-nano-2026-03-17",
    "usage": {
     "input_tokens": 10,
     "input_tokens_details": {
      "cache_write_tokens": 0,
      "cached_tokens": 0
     },
     "output_tokens": 6,
     "output_tokens_details": {
      "reasoning_tokens": 0
     },
     "total_tokens": 16
    },
    "output": [
     {
      "id": "msg_04222362c67de163006aade8ff4aa087d2b6b1d5ef98152584",
      "type": "message",
      "status": "completed",
      "content": [
       {
        "type": "output_text",
        "annotations": [],
        "logprobs": [],
        "text": "OK."
       }
      ],
      "phase": "final_answer",
      "role": "assistant"
     }
    ]
   },
   "sequence_number": 9
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.content_part.added",
  "description": "Emitted when a new content part is added.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.content_part.added`."
    },
    "item_id": {
     "type": "string",
     "description": "The ID of the output item that the content part was added to."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the output item that the content part was added to."
    },
    "content_index": {
     "type": "integer",
     "description": "The index of the content part that was added."
    },
    "part": {
     "type": "object<output_text> | object<refusal> | object<reasoning_text>",
     "description": "The content part that was added."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    }
   },
   "required": [
    "type",
    "item_id",
    "output_index",
    "content_index",
    "part",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.content_part.added",
   "item_id": "msg_123",
   "output_index": 0,
   "content_index": 0,
   "part": {
    "type": "output_text",
    "text": "",
    "annotations": []
   },
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.content_part.added",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "schema_name": "ResponseContentPartAddedEvent",
  "category": "item_lifecycle",
  "live_example": {
   "type": "response.content_part.added",
   "content_index": 0,
   "item_id": "msg_04222362c67de163006aade8ff4aa087d2b6b1d5ef98152584",
   "output_index": 0,
   "part": {
    "type": "output_text",
    "annotations": [],
    "logprobs": [],
    "text": ""
   },
   "sequence_number": 3
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.content_part.done",
  "description": "Emitted when a content part is done.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.content_part.done`."
    },
    "item_id": {
     "type": "string",
     "description": "The ID of the output item that the content part was added to."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the output item that the content part was added to."
    },
    "content_index": {
     "type": "integer",
     "description": "The index of the content part that is done."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    },
    "part": {
     "type": "object<output_text> | object<refusal> | object<reasoning_text>",
     "description": "The content part that is done."
    }
   },
   "required": [
    "type",
    "item_id",
    "output_index",
    "content_index",
    "part",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.content_part.done",
   "item_id": "msg_123",
   "output_index": 0,
   "content_index": 0,
   "sequence_number": 1,
   "part": {
    "type": "output_text",
    "text": "In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.",
    "annotations": []
   }
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.content_part.done",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "schema_name": "ResponseContentPartDoneEvent",
  "category": "item_lifecycle",
  "live_example": {
   "type": "response.content_part.done",
   "content_index": 0,
   "item_id": "msg_04222362c67de163006aade8ff4aa087d2b6b1d5ef98152584",
   "output_index": 0,
   "part": {
    "type": "output_text",
    "annotations": [],
    "logprobs": [],
    "text": "OK."
   },
   "sequence_number": 7
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.created",
  "description": "An event that is emitted when a response is created.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.created`."
    },
    "response": {
     "type": "object",
     "description": "The response that was created."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number for this event."
    }
   },
   "required": [
    "type",
    "response",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.created",
   "response": {
    "id": "resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c",
    "object": "response",
    "created_at": 1741487325,
    "status": "in_progress",
    "completed_at": null,
    "error": null,
    "incomplete_details": null,
    "instructions": null,
    "max_output_tokens": null,
    "model": "gpt-6-astra",
    "output": [],
    "parallel_tool_calls": true,
    "previous_response_id": null,
    "reasoning": {
     "effort": null,
     "summary": null
    },
    "store": true,
    "temperature": 1,
    "text": {
     "format": {
      "type": "text"
     }
    },
    "tool_choice": "auto",
    "tools": [],
    "top_p": 1,
    "truncation": "disabled",
    "usage": null,
    "user": null,
    "metadata": {}
   },
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.created",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "schema_name": "ResponseCreatedEvent",
  "category": "response_lifecycle",
  "live_example": {
   "type": "response.created",
   "response": {
    "id": "resp_04222362c67de163006aade8ff049c87d2b611d0ee66139558",
    "object": "response",
    "status": "in_progress",
    "model": "gpt-5.4-nano-2026-03-17",
    "usage": null,
    "output": []
   },
   "sequence_number": 0
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "error",
  "description": "Emitted when an error occurs.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `error`."
    },
    "code": {
     "type": "string | null",
     "description": null
    },
    "message": {
     "type": "string",
     "description": "The error message."
    },
    "param": {
     "type": "string | null",
     "description": null
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    }
   },
   "required": [
    "type",
    "code",
    "message",
    "param",
    "sequence_number"
   ]
  },
  "example": {
   "type": "error",
   "code": "ERR_SOMETHING",
   "message": "Something went wrong",
   "param": null,
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#error",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseErrorEvent",
  "category": "error",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.file_search_call.completed",
  "description": "Emitted when a file search call is completed (results found).",
  "schema": {
   "type": {
    "type": "string",
    "description": "The type of the event. Always `response.file_search_call.completed`.\n",
    "enum": [
     "response.file_search_call.completed"
    ]
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that the file search call is initiated.\n"
   },
   "item_id": {
    "type": "string",
    "description": "The ID of the output item that the file search call is initiated.\n"
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   }
  },
  "example": {
   "type": "response.file_search_call.completed",
   "item_id": "fs_…",
   "output_index": 1,
   "sequence_number": 7
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.file_search_call.in_progress",
  "description": "Emitted when a file search call is initiated.",
  "schema": {
   "type": {
    "type": "string",
    "description": "The type of the event. Always `response.file_search_call.in_progress`.\n",
    "enum": [
     "response.file_search_call.in_progress"
    ]
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that the file search call is initiated.\n"
   },
   "item_id": {
    "type": "string",
    "description": "The ID of the output item that the file search call is initiated.\n"
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   }
  },
  "example": {
   "type": "response.file_search_call.in_progress",
   "item_id": "fs_…",
   "output_index": 1,
   "sequence_number": 5
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.file_search_call.searching",
  "description": "Emitted when a file search is currently searching.",
  "schema": {
   "type": {
    "type": "string",
    "description": "The type of the event. Always `response.file_search_call.searching`.\n",
    "enum": [
     "response.file_search_call.searching"
    ]
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that the file search call is searching.\n"
   },
   "item_id": {
    "type": "string",
    "description": "The ID of the output item that the file search call is initiated.\n"
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   }
  },
  "example": {
   "type": "response.file_search_call.searching",
   "item_id": "fs_…",
   "output_index": 1,
   "sequence_number": 6
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.function_call_arguments.delta",
  "description": "Emitted when there is a partial function-call arguments delta.",
  "schema": {
   "type": {
    "type": "string",
    "description": "The type of the event. Always `response.function_call_arguments.delta`.\n",
    "enum": [
     "response.function_call_arguments.delta"
    ]
   },
   "item_id": {
    "type": "string",
    "description": "The ID of the output item that the function-call arguments delta is added to.\n"
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that the function-call arguments delta is added to.\n"
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   },
   "delta": {
    "type": "string",
    "description": "The function-call arguments delta that is added.\n"
   }
  },
  "example": {
   "type": "response.function_call_arguments.delta",
   "delta": "{\"",
   "item_id": "fc_…",
   "obfuscation": "LDQNEzSvV7mpzI",
   "output_index": 0,
   "sequence_number": 3
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.function_call_arguments.done",
  "description": "Emitted when function-call arguments are finalized.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.function_call_arguments.done"
    ]
   },
   "item_id": {
    "type": "string",
    "description": "The ID of the item."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   },
   "arguments": {
    "type": "string",
    "description": "The function-call arguments."
   }
  },
  "example": {
   "type": "response.function_call_arguments.done",
   "arguments": "{\"city\":\"Rome\"}",
   "item_id": "fc_…",
   "output_index": 0,
   "sequence_number": 8
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.shell_call_command.added",
  "description": "A streaming event that indicated a shell command was added to a tool call.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.shell_call_command.added"
    ],
    "description": "The type of the event, always `response.shell_call_command.added`."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of the event that was emitted."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that was updated."
   },
   "command_index": {
    "type": "integer",
    "description": "The index of the shell command that was added."
   },
   "command": {
    "type": "string",
    "description": "The shell command that was added."
   }
  },
  "example": {
   "type": "response.shell_call_command.added",
   "command": "",
   "command_index": 0,
   "output_index": 0,
   "sequence_number": 3
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.shell_call_command.delta",
  "description": "A streaming event that indicated a shell command was incrementally updated.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.shell_call_command.delta"
    ],
    "description": "The type of the event, always `response.shell_call_command.delta`."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of the event that was emitted."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that was updated."
   },
   "command_index": {
    "type": "integer",
    "description": "The index of the shell command that was updated."
   },
   "delta": {
    "type": "string",
    "description": "The shell command delta that was appended."
   },
   "obfuscation": {
    "type": "string",
    "description": "An obfuscation string that was added to pad the event payload."
   }
  },
  "example": {
   "type": "response.shell_call_command.delta",
   "command_index": 0,
   "delta": "echo",
   "obfuscation": "PGP4AcyqhWaD",
   "output_index": 0,
   "sequence_number": 4
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.shell_call_command.done",
  "description": "A streaming event that indicated a shell command was completed.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.shell_call_command.done"
    ],
    "description": "The type of the event, always `response.shell_call_command.done`."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of the event that was emitted."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that was updated."
   },
   "command_index": {
    "type": "integer",
    "description": "The index of the shell command that was completed."
   },
   "command": {
    "type": "string",
    "description": "The final shell command that was emitted."
   }
  },
  "example": {
   "type": "response.shell_call_command.done",
   "command": "echo OK",
   "command_index": 0,
   "output_index": 0,
   "sequence_number": 6
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.shell_call_output_content.delta",
  "description": "A streaming event that indicated shell call output was incrementally added.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.shell_call_output_content.delta"
    ],
    "description": "The type of the event, always `response.shell_call_output_content.delta`."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of the event that was emitted."
   },
   "item_id": {
    "type": "string",
    "description": "The ID of the output item that was updated."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that was updated."
   },
   "command_index": {
    "type": "integer",
    "description": "The index of the shell command that produced output."
   },
   "delta": {
    "type": "object",
    "description": "A delta of stdout/stderr emitted while a shell call was running."
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.shell_call_output_content.done",
  "description": "A streaming event that indicated shell call output was completed.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.shell_call_output_content.done"
    ],
    "description": "The type of the event, always `response.shell_call_output_content.done`."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of the event that was emitted."
   },
   "item_id": {
    "type": "string",
    "description": "The ID of the output item that was updated."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that was updated."
   },
   "command_index": {
    "type": "integer",
    "description": "The index of the shell command that produced output."
   },
   "output": {
    "type": "array",
    "description": "The output contents emitted for the shell command."
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.in_progress",
  "description": "Emitted when the response is in progress.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.in_progress`."
    },
    "response": {
     "type": "object",
     "description": "The response that is in progress."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    }
   },
   "required": [
    "type",
    "response",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.in_progress",
   "response": {
    "id": "resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c",
    "object": "response",
    "created_at": 1741487325,
    "status": "in_progress",
    "completed_at": null,
    "error": null,
    "incomplete_details": null,
    "instructions": null,
    "max_output_tokens": null,
    "model": "gpt-6-astra",
    "output": [],
    "parallel_tool_calls": true,
    "previous_response_id": null,
    "reasoning": {
     "effort": null,
     "summary": null
    },
    "store": true,
    "temperature": 1,
    "text": {
     "format": {
      "type": "text"
     }
    },
    "tool_choice": "auto",
    "tools": [],
    "top_p": 1,
    "truncation": "disabled",
    "usage": null,
    "user": null,
    "metadata": {}
   },
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.in_progress",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "schema_name": "ResponseInProgressEvent",
  "category": "response_lifecycle",
  "live_example": {
   "type": "response.in_progress",
   "response": {
    "id": "resp_04222362c67de163006aade8ff049c87d2b611d0ee66139558",
    "object": "response",
    "status": "in_progress",
    "model": "gpt-5.4-nano-2026-03-17",
    "usage": null,
    "output": []
   },
   "sequence_number": 1
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.failed",
  "description": "An event that is emitted when a response fails.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.failed`."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    },
    "response": {
     "type": "object",
     "description": "The response that failed."
    }
   },
   "required": [
    "type",
    "response",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.failed",
   "response": {
    "id": "resp_123",
    "object": "response",
    "created_at": 1740855869,
    "status": "failed",
    "completed_at": null,
    "error": {
     "code": "server_error",
     "message": "The model failed to generate a response."
    },
    "incomplete_details": null,
    "instructions": null,
    "max_output_tokens": null,
    "model": "gpt-6-astra",
    "output": [],
    "previous_response_id": null,
    "reasoning_effort": null,
    "store": false,
    "temperature": 1,
    "text": {
     "format": {
      "type": "text"
     }
    },
    "tool_choice": "auto",
    "tools": [],
    "top_p": 1,
    "truncation": "disabled",
    "usage": null,
    "user": null,
    "metadata": {}
   }
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.failed",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseFailedEvent",
  "category": "response_lifecycle",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.incomplete",
  "description": "An event that is emitted when a response finishes as incomplete. Over WebSocket, steering can finish a response with `response.incomplete_details.reason` set to `steered`, followed automatically by a successor `response.created` that commits the queued steering input.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.incomplete`."
    },
    "response": {
     "type": "object",
     "description": "The response that was incomplete."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    }
   },
   "required": [
    "type",
    "response",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.incomplete",
   "response": {
    "id": "resp_123",
    "object": "response",
    "created_at": 1740855869,
    "status": "incomplete",
    "completed_at": null,
    "error": null,
    "incomplete_details": {
     "reason": "max_tokens"
    },
    "instructions": null,
    "max_output_tokens": null,
    "model": "gpt-6-astra",
    "output": [],
    "previous_response_id": null,
    "reasoning_effort": null,
    "store": false,
    "temperature": 1,
    "text": {
     "format": {
      "type": "text"
     }
    },
    "tool_choice": "auto",
    "tools": [],
    "top_p": 1,
    "truncation": "disabled",
    "usage": null,
    "user": null,
    "metadata": {}
   },
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.incomplete",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseIncompleteEvent",
  "category": "response_lifecycle",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.output_item.added",
  "description": "Emitted when a new output item is added.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.output_item.added`."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the output item that was added."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    },
    "item": {
     "type": "object<message> | object<file_search_call> | object<function_call> | object<function_call_output> | object<web_search_call> | object<computer_call> | object<computer_call_output> | object<reasoning> | object<program> | object<program_output> | object<tool_search_call> | object<tool_search_output> | object<additional_tools> | object<compaction> | object<image_generation_call> | object<code_interpreter_call> | object<local_shell_call> | object<local_shell_call_output> | object<shell_call> | object<shell_call_output> | object<apply_patch_call> | object<apply_patch_call_output> | object<mcp_call> | object<mcp_list_tools> | object<mcp_approval_request> | object<mcp_approval_response> | object<custom_tool_call> | object<custom_tool_call_output>",
     "description": "The output item that was added. For reasoning items, `encrypted_content` may be incomplete while the item is in progress. Use the reasoning item from the corresponding `response.output_item.done` event when passing it as input to a subsequent request."
    }
   },
   "required": [
    "type",
    "output_index",
    "item",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.output_item.added",
   "output_index": 0,
   "item": {
    "id": "msg_123",
    "status": "in_progress",
    "type": "message",
    "role": "assistant",
    "content": []
   },
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.output_item.added",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "schema_name": "ResponseOutputItemAddedEvent",
  "category": "item_lifecycle",
  "live_example": {
   "type": "response.output_item.added",
   "item": {
    "id": "msg_04222362c67de163006aade8ff4aa087d2b6b1d5ef98152584",
    "type": "message",
    "status": "in_progress",
    "content": [],
    "phase": "final_answer",
    "role": "assistant"
   },
   "output_index": 0,
   "sequence_number": 2
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.output_item.done",
  "description": "Emitted when an output item is marked done.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.output_item.done`."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the output item that was marked done."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    },
    "item": {
     "type": "object<message> | object<file_search_call> | object<function_call> | object<function_call_output> | object<web_search_call> | object<computer_call> | object<computer_call_output> | object<reasoning> | object<program> | object<program_output> | object<tool_search_call> | object<tool_search_output> | object<additional_tools> | object<compaction> | object<image_generation_call> | object<code_interpreter_call> | object<local_shell_call> | object<local_shell_call_output> | object<shell_call> | object<shell_call_output> | object<apply_patch_call> | object<apply_patch_call_output> | object<mcp_call> | object<mcp_list_tools> | object<mcp_approval_request> | object<mcp_approval_response> | object<custom_tool_call> | object<custom_tool_call_output>",
     "description": "The output item that was marked done."
    }
   },
   "required": [
    "type",
    "output_index",
    "item",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.output_item.done",
   "output_index": 0,
   "item": {
    "id": "msg_123",
    "status": "completed",
    "type": "message",
    "role": "assistant",
    "content": [
     {
      "type": "output_text",
      "text": "In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.",
      "annotations": []
     }
    ]
   },
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.output_item.done",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "schema_name": "ResponseOutputItemDoneEvent",
  "category": "item_lifecycle",
  "live_example": {
   "type": "response.output_item.done",
   "item": {
    "id": "msg_04222362c67de163006aade8ff4aa087d2b6b1d5ef98152584",
    "type": "message",
    "status": "completed",
    "content": [
     {
      "type": "output_text",
      "annotations": [],
      "logprobs": [],
      "text": "OK."
     }
    ],
    "phase": "final_answer",
    "role": "assistant"
   },
   "output_index": 0,
   "sequence_number": 8
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.reasoning_summary_part.added",
  "description": "Emitted when a new reasoning summary part is added.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.reasoning_summary_part.added`."
    },
    "item_id": {
     "type": "string",
     "description": "The ID of the item this summary part is associated with."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the output item this summary part is associated with."
    },
    "summary_index": {
     "type": "integer",
     "description": "The index of the summary part within the reasoning summary."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    },
    "part": {
     "type": "object",
     "description": "The summary part that was added."
    }
   },
   "required": [
    "type",
    "item_id",
    "output_index",
    "summary_index",
    "part",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.reasoning_summary_part.added",
   "item_id": "rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476",
   "output_index": 0,
   "summary_index": 0,
   "part": {
    "type": "summary_text",
    "text": ""
   },
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.reasoning_summary_part.added",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseReasoningSummaryPartAddedEvent",
  "category": "reasoning",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.reasoning_summary_part.done",
  "description": "Emitted when a reasoning summary part is completed.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.reasoning_summary_part.done`."
    },
    "item_id": {
     "type": "string",
     "description": "The ID of the item this summary part is associated with."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the output item this summary part is associated with."
    },
    "summary_index": {
     "type": "integer",
     "description": "The index of the summary part within the reasoning summary."
    },
    "status": {
     "type": "string",
     "description": "The completion status of the summary part. Omitted when the part completed normally and set to `incomplete` when generation was interrupted."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    },
    "part": {
     "type": "object",
     "description": "The completed summary part."
    }
   },
   "required": [
    "type",
    "item_id",
    "output_index",
    "summary_index",
    "part",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.reasoning_summary_part.done",
   "item_id": "rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476",
   "output_index": 0,
   "summary_index": 0,
   "part": {
    "type": "summary_text",
    "text": "**Responding to a greeting**\n\nThe user just said, \"Hello!\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \"Hello! How can I assist you today?\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!"
   },
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.reasoning_summary_part.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseReasoningSummaryPartDoneEvent",
  "category": "reasoning",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.reasoning_summary_text.delta",
  "description": "Emitted when a delta is added to a reasoning summary text.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.reasoning_summary_text.delta`."
    },
    "item_id": {
     "type": "string",
     "description": "The ID of the item this summary text delta is associated with."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the output item this summary text delta is associated with."
    },
    "summary_index": {
     "type": "integer",
     "description": "The index of the summary part within the reasoning summary."
    },
    "delta": {
     "type": "string",
     "description": "The text delta that was added to the summary."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    }
   },
   "required": [
    "type",
    "item_id",
    "output_index",
    "summary_index",
    "delta",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.reasoning_summary_text.delta",
   "item_id": "rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476",
   "output_index": 0,
   "summary_index": 0,
   "delta": "**Responding to a greeting**\n\nThe user just said, \"Hello!\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \"Hello! How can I assist you today?\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!",
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.reasoning_summary_text.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseReasoningSummaryTextDeltaEvent",
  "category": "reasoning",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.reasoning_summary_text.done",
  "description": "Emitted when a reasoning summary text is completed.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.reasoning_summary_text.done`."
    },
    "item_id": {
     "type": "string",
     "description": "The ID of the item this summary text is associated with."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the output item this summary text is associated with."
    },
    "summary_index": {
     "type": "integer",
     "description": "The index of the summary part within the reasoning summary."
    },
    "text": {
     "type": "string",
     "description": "The full text of the completed reasoning summary."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    }
   },
   "required": [
    "type",
    "item_id",
    "output_index",
    "summary_index",
    "text",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.reasoning_summary_text.done",
   "item_id": "rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476",
   "output_index": 0,
   "summary_index": 0,
   "text": "**Responding to a greeting**\n\nThe user just said, \"Hello!\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \"Hello! How can I assist you today?\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!",
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.reasoning_summary_text.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseReasoningSummaryTextDoneEvent",
  "category": "reasoning",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.reasoning_text.delta",
  "description": "Emitted when a delta is added to a reasoning text.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.reasoning_text.delta`."
    },
    "item_id": {
     "type": "string",
     "description": "The ID of the item this reasoning text delta is associated with."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the output item this reasoning text delta is associated with."
    },
    "content_index": {
     "type": "integer",
     "description": "The index of the reasoning content part this delta is associated with."
    },
    "delta": {
     "type": "string",
     "description": "The text delta that was added to the reasoning content."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    }
   },
   "required": [
    "type",
    "item_id",
    "output_index",
    "content_index",
    "delta",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.reasoning_text.delta",
   "item_id": "rs_123",
   "output_index": 0,
   "content_index": 0,
   "delta": "The",
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.reasoning_text.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseReasoningTextDeltaEvent",
  "category": "reasoning",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.reasoning_text.done",
  "description": "Emitted when a reasoning text is completed.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.reasoning_text.done`."
    },
    "item_id": {
     "type": "string",
     "description": "The ID of the item this reasoning text is associated with."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the output item this reasoning text is associated with."
    },
    "content_index": {
     "type": "integer",
     "description": "The index of the reasoning content part."
    },
    "text": {
     "type": "string",
     "description": "The full text of the completed reasoning content."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    }
   },
   "required": [
    "type",
    "item_id",
    "output_index",
    "content_index",
    "text",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.reasoning_text.done",
   "item_id": "rs_123",
   "output_index": 0,
   "content_index": 0,
   "text": "The user is asking...",
   "sequence_number": 4
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.reasoning_text.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseReasoningTextDoneEvent",
  "category": "reasoning",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.refusal.delta",
  "description": "Emitted when there is a partial refusal text.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.refusal.delta`."
    },
    "item_id": {
     "type": "string",
     "description": "The ID of the output item that the refusal text is added to."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the output item that the refusal text is added to."
    },
    "content_index": {
     "type": "integer",
     "description": "The index of the content part that the refusal text is added to."
    },
    "delta": {
     "type": "string",
     "description": "The refusal text that is added."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    }
   },
   "required": [
    "type",
    "item_id",
    "output_index",
    "content_index",
    "delta",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.refusal.delta",
   "item_id": "msg_123",
   "output_index": 0,
   "content_index": 0,
   "delta": "refusal text so far",
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.refusal.delta",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseRefusalDeltaEvent",
  "category": "text",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.refusal.done",
  "description": "Emitted when refusal text is finalized.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.refusal.done`."
    },
    "item_id": {
     "type": "string",
     "description": "The ID of the output item that the refusal text is finalized."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the output item that the refusal text is finalized."
    },
    "content_index": {
     "type": "integer",
     "description": "The index of the content part that the refusal text is finalized."
    },
    "refusal": {
     "type": "string",
     "description": "The refusal text that is finalized."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    }
   },
   "required": [
    "type",
    "item_id",
    "output_index",
    "content_index",
    "refusal",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.refusal.done",
   "item_id": "item-abc",
   "output_index": 1,
   "content_index": 2,
   "refusal": "final refusal text",
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.refusal.done",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseRefusalDoneEvent",
  "category": "text",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.output_text.delta",
  "description": "Emitted when there is an additional text delta.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.output_text.delta`."
    },
    "item_id": {
     "type": "string",
     "description": "The ID of the output item that the text delta was added to."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the output item that the text delta was added to."
    },
    "content_index": {
     "type": "integer",
     "description": "The index of the content part that the text delta was added to."
    },
    "delta": {
     "type": "string",
     "description": "The text delta that was added."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number for this event."
    },
    "logprobs": {
     "type": "array<object>",
     "description": "The log probabilities of the tokens in the delta."
    }
   },
   "required": [
    "type",
    "item_id",
    "output_index",
    "content_index",
    "delta",
    "sequence_number",
    "logprobs"
   ]
  },
  "example": {
   "type": "response.output_text.delta",
   "item_id": "msg_123",
   "output_index": 0,
   "content_index": 0,
   "delta": "In",
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.output_text.delta",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "schema_name": "ResponseTextDeltaEvent",
  "category": "text",
  "live_example": {
   "type": "response.output_text.delta",
   "content_index": 0,
   "delta": "OK",
   "item_id": "msg_04222362c67de163006aade8ff4aa087d2b6b1d5ef98152584",
   "logprobs": [],
   "obfuscation": "tcI6fDMDcuuDp0",
   "output_index": 0,
   "sequence_number": 4
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.output_text.done",
  "description": "Emitted when text content is finalized.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always `response.output_text.done`."
    },
    "item_id": {
     "type": "string",
     "description": "The ID of the output item that the text content is finalized."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the output item that the text content is finalized."
    },
    "content_index": {
     "type": "integer",
     "description": "The index of the content part that the text content is finalized."
    },
    "text": {
     "type": "string",
     "description": "The text content that is finalized."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number for this event."
    },
    "logprobs": {
     "type": "array<object>",
     "description": "The log probabilities of the tokens in the delta."
    }
   },
   "required": [
    "type",
    "item_id",
    "output_index",
    "content_index",
    "text",
    "sequence_number",
    "logprobs"
   ]
  },
  "example": {
   "type": "response.output_text.done",
   "item_id": "msg_123",
   "output_index": 0,
   "content_index": 0,
   "text": "In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.",
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.output_text.done",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "schema_name": "ResponseTextDoneEvent",
  "category": "text",
  "live_example": {
   "type": "response.output_text.done",
   "content_index": 0,
   "item_id": "msg_04222362c67de163006aade8ff4aa087d2b6b1d5ef98152584",
   "logprobs": [],
   "output_index": 0,
   "sequence_number": 6,
   "text": "OK."
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.web_search_call.completed",
  "description": "Emitted when a web search call is completed.",
  "schema": {
   "type": {
    "type": "string",
    "description": "The type of the event. Always `response.web_search_call.completed`.\n",
    "enum": [
     "response.web_search_call.completed"
    ]
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that the web search call is associated with.\n"
   },
   "item_id": {
    "type": "string",
    "description": "Unique ID for the output item associated with the web search call.\n"
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of the web search call being processed."
   }
  },
  "example": {
   "type": "response.web_search_call.completed",
   "item_id": "ws_…",
   "output_index": 1,
   "sequence_number": 7
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.web_search_call.in_progress",
  "description": "Emitted when a web search call is initiated.",
  "schema": {
   "type": {
    "type": "string",
    "description": "The type of the event. Always `response.web_search_call.in_progress`.\n",
    "enum": [
     "response.web_search_call.in_progress"
    ]
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that the web search call is associated with.\n"
   },
   "item_id": {
    "type": "string",
    "description": "Unique ID for the output item associated with the web search call.\n"
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of the web search call being processed."
   }
  },
  "example": {
   "type": "response.web_search_call.in_progress",
   "item_id": "ws_…",
   "output_index": 1,
   "sequence_number": 5
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.web_search_call.searching",
  "description": "Emitted when a web search call is executing.",
  "schema": {
   "type": {
    "type": "string",
    "description": "The type of the event. Always `response.web_search_call.searching`.\n",
    "enum": [
     "response.web_search_call.searching"
    ]
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that the web search call is associated with.\n"
   },
   "item_id": {
    "type": "string",
    "description": "Unique ID for the output item associated with the web search call.\n"
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of the web search call being processed."
   }
  },
  "example": {
   "type": "response.web_search_call.searching",
   "item_id": "ws_…",
   "output_index": 1,
   "sequence_number": 6
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.image_generation_call.completed",
  "description": "Emitted when an image generation tool call has completed and the final image is available.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.image_generation_call.completed"
    ],
    "description": "The type of the event. Always 'response.image_generation_call.completed'."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item in the response's output array."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   },
   "item_id": {
    "type": "string",
    "description": "The unique identifier of the image generation item being processed."
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.image_generation_call.generating",
  "description": "Emitted when an image generation tool call is actively generating an image (intermediate state).",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.image_generation_call.generating"
    ],
    "description": "The type of the event. Always 'response.image_generation_call.generating'."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item in the response's output array."
   },
   "item_id": {
    "type": "string",
    "description": "The unique identifier of the image generation item being processed."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of the image generation item being processed."
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.image_generation_call.in_progress",
  "description": "Emitted when an image generation tool call is in progress.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.image_generation_call.in_progress"
    ],
    "description": "The type of the event. Always 'response.image_generation_call.in_progress'."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item in the response's output array."
   },
   "item_id": {
    "type": "string",
    "description": "The unique identifier of the image generation item being processed."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of the image generation item being processed."
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.image_generation_call.partial_image",
  "description": "Emitted when a partial image is available during image generation streaming.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.image_generation_call.partial_image"
    ],
    "description": "The type of the event. Always 'response.image_generation_call.partial_image'."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item in the response's output array."
   },
   "item_id": {
    "type": "string",
    "description": "The unique identifier of the image generation item being processed."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of the image generation item being processed."
   },
   "partial_image_index": {
    "type": "integer",
    "description": "0-based index for the partial image (backend is 1-based, but this is 0-based for the user)."
   },
   "partial_image_b64": {
    "type": "string",
    "description": "Base64-encoded partial image data, suitable for rendering as an image."
   },
   "size": {
    "type": "string",
    "description": "The image size that was used."
   },
   "quality": {
    "type": "string",
    "description": "The image quality that was used."
   },
   "background": {
    "type": "string",
    "description": "The background setting that was used."
   },
   "output_format": {
    "type": "string",
    "description": "The output format that was used."
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.mcp_call_arguments.delta",
  "description": "Emitted when there is a delta (partial update) to the arguments of an MCP tool call.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.mcp_call_arguments.delta"
    ],
    "description": "The type of the event. Always 'response.mcp_call_arguments.delta'."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item in the response's output array."
   },
   "item_id": {
    "type": "string",
    "description": "The unique identifier of the MCP tool call item being processed."
   },
   "delta": {
    "type": "string",
    "description": "A JSON string containing the partial update to the arguments for the MCP tool call.\n"
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   }
  },
  "example": {
   "type": "response.mcp_call_arguments.delta",
   "delta": "{\"repoName\":\"openai/openai-python\"}",
   "item_id": "mcp_…",
   "obfuscation": "oWNr7kyWBnPAy",
   "output_index": 1,
   "sequence_number": 8
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.mcp_call_arguments.done",
  "description": "Emitted when the arguments for an MCP tool call are finalized.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.mcp_call_arguments.done"
    ],
    "description": "The type of the event. Always 'response.mcp_call_arguments.done'."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item in the response's output array."
   },
   "item_id": {
    "type": "string",
    "description": "The unique identifier of the MCP tool call item being processed."
   },
   "arguments": {
    "type": "string",
    "description": "A JSON string containing the finalized arguments for the MCP tool call.\n"
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   }
  },
  "example": {
   "type": "response.mcp_call_arguments.done",
   "arguments": "{\"repoName\":\"openai/openai-python\"}",
   "item_id": "mcp_…",
   "output_index": 1,
   "sequence_number": 9
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.mcp_call.completed",
  "description": "Emitted when an MCP  tool call has completed successfully.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.mcp_call.completed"
    ],
    "description": "The type of the event. Always 'response.mcp_call.completed'."
   },
   "item_id": {
    "type": "string",
    "description": "The ID of the MCP tool call item that completed."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that completed."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   }
  },
  "example": {
   "type": "response.mcp_call.completed",
   "item_id": "mcp_…",
   "output_index": 1,
   "sequence_number": 10
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.mcp_call.failed",
  "description": "Emitted when an MCP  tool call has failed.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.mcp_call.failed"
    ],
    "description": "The type of the event. Always 'response.mcp_call.failed'."
   },
   "item_id": {
    "type": "string",
    "description": "The ID of the MCP tool call item that failed."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that failed."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.mcp_call.in_progress",
  "description": "Emitted when an MCP  tool call is in progress.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.mcp_call.in_progress"
    ],
    "description": "The type of the event. Always 'response.mcp_call.in_progress'."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item in the response's output array."
   },
   "item_id": {
    "type": "string",
    "description": "The unique identifier of the MCP tool call item being processed."
   }
  },
  "example": {
   "type": "response.mcp_call.in_progress",
   "item_id": "mcp_…",
   "output_index": 1,
   "sequence_number": 7
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.mcp_list_tools.completed",
  "description": "Emitted when the list of available MCP tools has been successfully retrieved.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.mcp_list_tools.completed"
    ],
    "description": "The type of the event. Always 'response.mcp_list_tools.completed'."
   },
   "item_id": {
    "type": "string",
    "description": "The ID of the MCP tool call item that produced this output."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that was processed."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   }
  },
  "example": {
   "type": "response.mcp_list_tools.completed",
   "item_id": "mcpl_…",
   "output_index": 0,
   "sequence_number": 4
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.mcp_list_tools.failed",
  "description": "Emitted when the attempt to list available MCP tools has failed.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.mcp_list_tools.failed"
    ],
    "description": "The type of the event. Always 'response.mcp_list_tools.failed'."
   },
   "item_id": {
    "type": "string",
    "description": "The ID of the MCP tool call item that failed."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that failed."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   }
  },
  "example": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.mcp_list_tools.in_progress",
  "description": "Emitted when the system is in the process of retrieving the list of available MCP tools.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.mcp_list_tools.in_progress"
    ],
    "description": "The type of the event. Always 'response.mcp_list_tools.in_progress'."
   },
   "item_id": {
    "type": "string",
    "description": "The ID of the MCP tool call item that is being processed."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output item that is being processed."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   }
  },
  "example": {
   "type": "response.mcp_list_tools.in_progress",
   "item_id": "mcpl_…",
   "output_index": 0,
   "sequence_number": 3
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.output_text.annotation.added",
  "description": "Emitted when an annotation is added to output text content.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always 'response.output_text.annotation.added'."
    },
    "item_id": {
     "type": "string",
     "description": "The unique identifier of the item to which the annotation is being added."
    },
    "output_index": {
     "type": "integer",
     "description": "The index of the output item in the response's output array."
    },
    "content_index": {
     "type": "integer",
     "description": "The index of the content part within the output item."
    },
    "annotation_index": {
     "type": "integer",
     "description": "The index of the annotation within the content part."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number of this event."
    },
    "annotation": {
     "type": "object<file_citation> | object<url_citation> | object<container_file_citation> | object<file_path> | null",
     "description": "The annotation object being added. (See annotation schema for details.)"
    }
   },
   "required": [
    "type",
    "item_id",
    "output_index",
    "content_index",
    "annotation_index",
    "annotation",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.output_text.annotation.added",
   "item_id": "item-abc",
   "output_index": 0,
   "content_index": 0,
   "annotation_index": 0,
   "annotation": {
    "type": "file_citation",
    "file_id": "file-abc",
    "index": 0,
    "filename": "example.txt"
   },
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.output_text.annotation.added",
  "status": [
   "DOCUMENTED"
  ],
  "schema_name": "ResponseOutputTextAnnotationAddedEvent",
  "category": "text",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.queued",
  "description": "Emitted when a response is queued and waiting to be processed.",
  "schema": {
   "properties": {
    "type": {
     "type": "string",
     "description": "The type of the event. Always 'response.queued'."
    },
    "response": {
     "type": "object",
     "description": "The full response object that is queued."
    },
    "sequence_number": {
     "type": "integer",
     "description": "The sequence number for this event."
    }
   },
   "required": [
    "type",
    "response",
    "sequence_number"
   ]
  },
  "example": {
   "type": "response.queued",
   "response": {
    "id": "res_123",
    "status": "queued",
    "created_at": "2021-01-01T00:00:00Z",
    "updated_at": "2021-01-01T00:00:00Z"
   },
   "sequence_number": 1
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events#response.queued",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "schema_name": "ResponseQueuedEvent",
  "category": "response_lifecycle",
  "live_example": {
   "type": "response.queued",
   "response": {
    "id": "resp_06060313e4d9fdae006aade9081c8c87d28ad77931e6cdd11f",
    "object": "response",
    "status": "queued",
    "model": "gpt-5.4-nano-2026-03-17",
    "usage": null,
    "output": []
   },
   "sequence_number": 1
  },
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.custom_tool_call_input.delta",
  "description": "Event representing a delta (partial update) to the input of a custom tool call.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.custom_tool_call_input.delta"
    ],
    "description": "The event type identifier."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output this delta applies to."
   },
   "item_id": {
    "type": "string",
    "description": "Unique identifier for the API item associated with this event."
   },
   "delta": {
    "type": "string",
    "description": "The incremental input data (delta) for the custom tool call."
   }
  },
  "example": {
   "type": "response.custom_tool_call_input.delta",
   "delta": "yes",
   "item_id": "ctc_…",
   "obfuscation": "edRTib4zuVyeT",
   "output_index": 0,
   "sequence_number": 3
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.custom_tool_call_input.done",
  "description": "Event indicating that input for a custom tool call is complete.",
  "schema": {
   "type": {
    "type": "string",
    "enum": [
     "response.custom_tool_call_input.done"
    ],
    "description": "The event type identifier."
   },
   "sequence_number": {
    "type": "integer",
    "description": "The sequence number of this event."
   },
   "output_index": {
    "type": "integer",
    "description": "The index of the output this event applies to."
   },
   "item_id": {
    "type": "string",
    "description": "Unique identifier for the API item associated with this event."
   },
   "input": {
    "type": "string",
    "description": "The complete input data for the custom tool call."
   }
  },
  "example": {
   "type": "response.custom_tool_call_input.done",
   "input": "yes",
   "item_id": "ctc_…",
   "output_index": 0,
   "sequence_number": 4
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "_sequence_observed",
  "description": "Observed ordered event sequences (gpt-5.4-nano, 2026-09-18).",
  "schema": null,
  "example": {
   "plain_text_stream": [
    "response.created",
    "response.in_progress",
    "response.output_item.added",
    "response.content_part.added",
    "response.output_text.delta",
    "response.output_text.delta",
    "response.output_text.done",
    "response.content_part.done",
    "response.output_item.done",
    "response.completed"
   ],
   "background_stream": [
    "response.created",
    "response.queued",
    "response.in_progress",
    "response.output_item.added",
    "response.content_part.added",
    "response.output_text.delta",
    "response.output_text.done",
    "response.content_part.done",
    "response.output_item.done",
    "response.completed"
   ],
   "resume_via_GET_starting_after_1": [
    "response.in_progress",
    "response.output_item.added",
    "response.content_part.added",
    "response.output_text.delta",
    "response.output_text.done",
    "response.content_part.done",
    "response.output_item.done",
    "response.completed"
   ]
  },
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "status": [
   "LIVE_VERIFIED"
  ],
  "notes": "SSE `event:` line equals `data.type`; sequence_number starts at 0 and increments by 1 per event; text deltas carry an `obfuscation` string unless stream_options.include_obfuscation=false; response.created carries the full Response with status=in_progress (queued for background).",
  "_fragment": "generated/fragments/streaming-events/openai-responses.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.apply_patch_call_operation_diff.delta",
  "description": "Streams the `diff` of an apply_patch_call operation (delta chunks, then the final diff). Observed live on gpt-5.4-nano; NOT present in the OpenAPI ResponseStreamEvent union nor in the streaming-events reference page at retrieval time.",
  "schema": {
   "type": {
    "type": "string"
   },
   "item_id": {
    "type": "string"
   },
   "output_index": {
    "type": "integer"
   },
   "sequence_number": {
    "type": "integer"
   },
   "delta": {
    "type": "string"
   },
   "obfuscation": {
    "type": "string"
   }
  },
  "example": {
   "type": "response.apply_patch_call_operation_diff.delta",
   "delta": "+",
   "item_id": "apc_…",
   "obfuscation": "11F10pEBNExMTzK",
   "output_index": 0,
   "sequence_number": 3
  },
  "status": [
   "LIVE_DISCOVERED",
   "LIVE_VERIFIED"
  ],
  "source": "live observation 2026-09-18 (tmp-live/tools/apply_patch_stream.json)",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.apply_patch_call_operation_diff.done",
  "description": "Streams the `diff` of an apply_patch_call operation (delta chunks, then the final diff). Observed live on gpt-5.4-nano; NOT present in the OpenAPI ResponseStreamEvent union nor in the streaming-events reference page at retrieval time.",
  "schema": {
   "type": {
    "type": "string"
   },
   "item_id": {
    "type": "string"
   },
   "output_index": {
    "type": "integer"
   },
   "sequence_number": {
    "type": "integer"
   },
   "diff": {
    "type": "string"
   }
  },
  "example": {
   "type": "response.apply_patch_call_operation_diff.done",
   "diff": "+OK\n",
   "item_id": "apc_…",
   "output_index": 0,
   "sequence_number": 6
  },
  "status": [
   "LIVE_DISCOVERED",
   "LIVE_VERIFIED"
  ],
  "source": "live observation 2026-09-18 (tmp-live/tools/apply_patch_stream.json)",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "openai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.output_item.added / response.output_item.done (tool items)",
  "description": "Generic item lifecycle events wrap every tool item: function_call, custom_tool_call, web_search_call, file_search_call, code_interpreter_call, image_generation_call, mcp_list_tools, mcp_call, mcp_approval_request, shell_call, shell_call_output, apply_patch_call, computer_call, tool_search_call, tool_search_output. `item` carries the full item; tool-specific events refer to it by item_id/output_index.",
  "schema": {
   "type": {
    "type": "string"
   },
   "output_index": {
    "type": "integer"
   },
   "sequence_number": {
    "type": "integer"
   },
   "item": {
    "type": "object"
   }
  },
  "example": {
   "type": "response.output_item.added",
   "item": {
    "id": "fc_…",
    "type": "function_call",
    "status": "in_progress",
    "arguments": "",
    "call_id": "call_…",
    "name": "get_weather"
   },
   "output_index": 0,
   "sequence_number": 2
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://developers.openai.com/api/reference/resources/responses/streaming-events",
  "_fragment": "generated/fragments/streaming-events/openai-tools.json"
 },
 {
  "provider": "xai",
  "api": "chat_completions",
  "direction": "server→client",
  "event": "chat.completion.chunk",
  "description": "Data-only SSE line `data: {…}` (no event: name). Observed order (grok-4.3): [delta.role+reasoning_content]* → [delta.content]* → {delta:{}, finish_reason} → (stream_options.include_usage) {choices:[], usage} → `data: [DONE]`. Every chunk carries id, object, created (=0 live), model, system_fingerprint, service_tier. Tool calls arrive whole in one chunk (delta.tool_calls[{index, id, type:'function', function:{name, arguments}}]).",
  "schema": {
   "id": "string",
   "object": "chat.completion.chunk",
   "created": "integer (0 live)",
   "model": "string",
   "choices[].index": "integer",
   "choices[].delta": "{role?, content?, reasoning_content?, tool_calls?[], images?[]}",
   "choices[].finish_reason": "string|null (stop | length | tool_calls)",
   "usage": "Usage|null (only on the final usage chunk)",
   "citations": "array|null (last chunk, Live Search — retired)",
   "system_fingerprint": "string",
   "service_tier": "default|priority"
  },
  "example": [
   {
    "id": "d8a0c652-f22c-9190-9220-7e756178d56a",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "grok-4.3",
    "choices": [
     {
      "index": 0,
      "delta": {
       "reasoning_content": "Calculating 17 times",
       "role": "assistant"
      }
     }
    ],
    "system_fingerprint": "fp_eb3c003fc66c14ed",
    "service_tier": "default"
   },
   {
    "id": "d8a0c652-f22c-9190-9220-7e756178d56a",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "grok-4.3",
    "choices": [
     {
      "index": 0,
      "delta": {
       "reasoning_content": " 23."
      }
     }
    ],
    "system_fingerprint": "fp_eb3c003fc66c14ed",
    "service_tier": "default"
   },
   {
    "id": "d8a0c652-f22c-9190-9220-7e756178d56a",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "grok-4.3",
    "choices": [
     {
      "index": 0,
      "delta": {
       "content": "391"
      }
     }
    ],
    "system_fingerprint": "fp_eb3c003fc66c14ed",
    "service_tier": "default"
   },
   {
    "id": "d8a0c652-f22c-9190-9220-7e756178d56a",
    "object": "chat.completion.chunk",
    "created": 0,
    "model": "grok-4.3",
    "choices": [
     {
      "index": 0,
      "delta": {},
      "finish_reason": "stop"
     }
    ],
    "system_fingerprint": "fp_eb3c003fc66c14ed",
    "service_tier": "default"
   }
  ],
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/model-capabilities/text/streaming",
  "order_hint": 0,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "chat_completions",
  "direction": "server→client",
  "event": "chat.completion.chunk (usage chunk)",
  "description": "Final chunk when stream_options.include_usage=true: choices=[] and full usage (prompt/completion/total, details, num_sources_used, cost_in_usd_ticks).",
  "schema": null,
  "example": {
   "id": "29b7bff9-aa9a-9951-b645-4f1eaf2f4f92",
   "object": "chat.completion.chunk",
   "created": 0,
   "model": "grok-4.3",
   "choices": [],
   "usage": {
    "prompt_tokens": 196,
    "completion_tokens": 2,
    "total_tokens": 319,
    "prompt_tokens_details": {
     "text_tokens": 196,
     "audio_tokens": 0,
     "image_tokens": 0,
     "cached_tokens": 192
    },
    "completion_tokens_details": {
     "reasoning_tokens": 121,
     "audio_tokens": 0,
     "accepted_prediction_tokens": 0,
     "rejected_prediction_tokens": 0
    },
    "num_sources_used": 0,
    "cost_in_usd_ticks": 3509000
   },
   "system_fingerprint": "fp_eb3c003fc66c14ed",
   "service_tier": "default"
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/openapi.json",
  "order_hint": 1,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "chat_completions",
  "direction": "server→client",
  "event": "[DONE]",
  "description": "Terminator `data: [DONE]`.",
  "schema": null,
  "example": "data: [DONE]",
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/openapi.json",
  "order_hint": 2,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.created",
  "description": "First event; response snapshot with status in_progress, output [], usage null, reasoning {effort:null, summary:null}. SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 0,
   "type": "response.created",
   "response": {
    "id": "ee2a3737-1808-925b-8c71-f5b04b61b711",
    "model": "grok-4.3",
    "object": "response",
    "output": [],
    "usage": null,
    "status": "in_progress",
    "store": false
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 0,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.in_progress",
  "description": "Second snapshot (same shape). SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 1,
   "type": "response.in_progress",
   "response": {
    "id": "ee2a3737-1808-925b-8c71-f5b04b61b711",
    "model": "grok-4.3",
    "object": "response",
    "output": [],
    "usage": null,
    "status": "in_progress",
    "store": false
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 1,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.output_item.added",
  "description": "New output item (reasoning | message | function_call | code_interpreter_call | web_search_call …) with output_index; item.status in_progress. SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 2,
   "type": "response.output_item.added",
   "item": {
    "id": "rs_ee2a3737-1808-925b-8c71-f5b04b61b711",
    "summary": [],
    "type": "reasoning",
    "status": "in_progress"
   },
   "output_index": 0
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 2,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.reasoning_summary_part.added",
  "description": "Reasoning summary part opened {item_id, output_index, summary_index, part:{type:'summary_text', text:''}}. SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 3,
   "type": "response.reasoning_summary_part.added",
   "item_id": "rs_ee2a3737-1808-925b-8c71-f5b04b61b711",
   "output_index": 0,
   "part": {
    "text": "",
    "type": "summary_text"
   },
   "summary_index": 0
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 3,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.reasoning_summary_text.delta",
  "description": "Reasoning summary text delta {delta, item_id, output_index, summary_index}. Emitted for grok-4.3 without any reasoning.summary setting. SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 4,
   "type": "response.reasoning_summary_text.delta",
   "delta": "I need to calculate ",
   "item_id": "rs_ee2a3737-1808-925b-8c71-f5b04b61b711",
   "output_index": 0,
   "summary_index": 0
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 4,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.reasoning_summary_text.done",
  "description": "Full summary text. SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 9,
   "type": "response.reasoning_summary_text.done",
   "item_id": "rs_ee2a3737-1808-925b-8c71-f5b04b61b711",
   "output_index": 0,
   "summary_index": 0,
   "text": "I need to calculate 17 times 23.\n\n17 times 23 equals 391. I will call get_weather for Paris."
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 5,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.reasoning_summary_part.done",
  "description": "Summary part closed (part.text complete). SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 10,
   "type": "response.reasoning_summary_part.done",
   "item_id": "rs_ee2a3737-1808-925b-8c71-f5b04b61b711",
   "output_index": 0,
   "part": {
    "text": "I need to calculate 17 times 23.\n\n17 times 23 equals 391. I will call get_weather for Paris.",
    "type": "summary_text"
   },
   "summary_index": 0
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 6,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.output_item.done",
  "description": "Item completed (reasoning item may carry encrypted_content when include requested; function_call carries final arguments; code_interpreter_call carries code + outputs). SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 11,
   "type": "response.output_item.done",
   "item": {
    "id": "rs_ee2a3737-1808-925b-8c71-f5b04b61b711",
    "summary": [
     {
      "text": "I need to calculate 17 times 23.\n\n17 times 23 equals 391. I will call get_weather for Paris.",
      "type": "summary_text"
     }
    ],
    "type": "reasoning",
    "status": "completed",
    "encrypted_content": "1VOWbs0aBiReu1XR5aAH…"
   },
   "output_index": 0
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 7,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.content_part.added",
  "description": "Message content part opened {item_id, output_index, content_index, part:{type:'output_text', text:'', logprobs:[], annotations:[]}}. SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 17,
   "type": "response.content_part.added",
   "content_index": 0,
   "item_id": "msg_d47a56f6-17c2-9724-83ef-64b673b34816",
   "output_index": 2,
   "part": {
    "type": "output_text",
    "text": "",
    "logprobs": [],
    "annotations": []
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 8,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.output_text.delta",
  "description": "Text delta {delta, item_id, output_index, content_index}. SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 18,
   "type": "response.output_text.delta",
   "content_index": 0,
   "delta": "42",
   "item_id": "msg_d47a56f6-17c2-9724-83ef-64b673b34816",
   "output_index": 2,
   "logprobs": []
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 9,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.output_text.done",
  "description": "Full text {text, logprobs:[]}. SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 19,
   "type": "response.output_text.done",
   "content_index": 0,
   "item_id": "msg_d47a56f6-17c2-9724-83ef-64b673b34816",
   "output_index": 2,
   "text": "42",
   "logprobs": []
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 10,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.content_part.done",
  "description": "Content part closed (part with text/annotations). SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 20,
   "type": "response.content_part.done",
   "content_index": 0,
   "item_id": "msg_d47a56f6-17c2-9724-83ef-64b673b34816",
   "output_index": 2,
   "part": {
    "type": "output_text",
    "text": "42",
    "logprobs": [],
    "annotations": []
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 11,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.function_call_arguments.delta",
  "description": "Function-call arguments delta — live a single delta containing the whole JSON string. SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 13,
   "type": "response.function_call_arguments.delta",
   "delta": "{\"city\":\"Paris\"}",
   "item_id": "fc_ee2a3737-1808-925b-8c71-f5b04b61b711_0",
   "output_index": 1
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 12,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.function_call_arguments.done",
  "description": "{arguments, item_id, name, output_index}. SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 14,
   "type": "response.function_call_arguments.done",
   "arguments": "{\"city\":\"Paris\"}",
   "item_id": "fc_ee2a3737-1808-925b-8c71-f5b04b61b711_0",
   "name": "get_weather",
   "output_index": 1
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 13,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.code_interpreter_call.in_progress",
  "description": "Code interpreter call started {item_id, output_index}. SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 10,
   "type": "response.code_interpreter_call.in_progress",
   "item_id": "ci_d47a56f6-17c2-9724-83ef-64b673b34816_call-4724546e-53f5-4bc6-8bcc-e3e719d25e58-0",
   "output_index": 1
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 14,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.code_interpreter_call_code.delta",
  "description": "Code delta {delta}. SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 11,
   "type": "response.code_interpreter_call_code.delta",
   "item_id": "ci_d47a56f6-17c2-9724-83ef-64b673b34816_call-4724546e-53f5-4bc6-8bcc-e3e719d25e58-0",
   "output_index": 1,
   "delta": "print(6*7)"
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 15,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.code_interpreter_call_code.done",
  "description": "Full code {code}. SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 12,
   "type": "response.code_interpreter_call_code.done",
   "item_id": "ci_d47a56f6-17c2-9724-83ef-64b673b34816_call-4724546e-53f5-4bc6-8bcc-e3e719d25e58-0",
   "output_index": 1,
   "code": "print(6*7)"
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 16,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.code_interpreter_call.interpreting",
  "description": "Sandbox executing. SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 13,
   "type": "response.code_interpreter_call.interpreting",
   "item_id": "ci_d47a56f6-17c2-9724-83ef-64b673b34816_call-4724546e-53f5-4bc6-8bcc-e3e719d25e58-0",
   "output_index": 1
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 17,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.code_interpreter_call.completed",
  "description": "Execution finished (outputs appear in the following output_item.done). SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 14,
   "type": "response.code_interpreter_call.completed",
   "item_id": "ci_d47a56f6-17c2-9724-83ef-64b673b34816_call-4724546e-53f5-4bc6-8bcc-e3e719d25e58-0",
   "output_index": 1
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 18,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.completed",
  "description": "Final snapshot with full output[] and usage; completed_at set. Stream ends here (no `data: [DONE]` observed). SSE framing: `event: <type>` line + `data: {…}` with sequence_number.",
  "schema": null,
  "example": {
   "sequence_number": 16,
   "type": "response.completed",
   "response": {
    "id": "ee2a3737-1808-925b-8c71-f5b04b61b711",
    "model": "grok-4.3",
    "object": "response",
    "output": [
     {
      "id": "rs_ee2a3737-1808-925b-8c71-f5b04b61b711",
      "summary": [
       {
        "text": "I need to calculate 17 times 23.\n\n17 times 23 equals 391. I will call get_weather for Paris.",
        "type": "summary_text"
       }
      ],
      "type": "reasoning",
      "status": "completed",
      "encrypted_content": "1VOWbs0aBiReu1XR5aAHWyFUT+n52QFNjHyinPzR+tvuC/uJyadXWinxjCLO4DrqQoYg8O6DKjU4Sltn82nM72K0nQb5GT+uQmFD7Opv21zbThQuhqtyVAm6DtBxDqy+NbDtUOG5EhD8XFbQdPUWNLpsV1C+oBmsvAWB9JEZnRbaaikhIrGrrcsVVny505xykoZhzuFT+EfK704SHmQQH7ivFnmBc1PujummOunKTo4AkugfLfR21pHppkanpOpoOv1BfJHRCsupUC0Gm7ii3vDb4Eid/U+I7MlqJ24RYPlZlj2VTteYvcVgRLea5SOagK67cyVeOWdKRv6MuZF58Z5o6bXSKlnn9436iK7NBrMZXKCO6W2R4UTRvq8WOepe8gQ1Krpl9HRopj/8IAqaNVGUUVFtaaNs+/vJcTmxT3MrrYobuTJW1Z6fhd6pF+7o7r7Xee3jjZCDV3bvaXFOQ+2UrE8Eo0nuGmuAkjf2ENNMkKjNEx+MoAFafpzaV/N8mrn4R9z/bxQPCyoIuoGgfBAYKN0mjafm/tzgxLCdhYKeJZK37hl8dX4PrAlkEcp7TtexhX4vf5dZKMf7rpx0aYDBm70E5JTHqVWYQlw9RPnDoq9SwmE+Tx18zsj86wHjLAO310G1OJVZ7Hn+Xv1tTLzyi/EqDaoH9javispkP6qGJfAVTaJvonLddaj5mU/mzp+ua42gV6Gup+Fv0qZ2s4kI05NmzdG2gFRNlDxKJsOmPbC/wdqDWoPm3T/0t4ZYq0CGT05k/WUMxPni12Eu1xRzTX+/rsR2kz0Fgi4AgMNcEpgz7j74u4Jg8oO6w3bEZwnFyrZUyww/SkMXVrEBmsZvlXCe2gc349bJyj4lHs0eWDz0ue45DwuaK+DjUXOqkUwiCPwTIwnbhZ0qqLZnMocoFXdGKYgUC0nrOuDuFlM7jjb57gu2J9Eu2+pRA9Ph6TjeTcGlAUYtg+225wPXwUXWQ51ZV2PG9HdRP6pY2HNkOLyGoc2Df16IMfZ5M8QUF/34sE+ILvdkVRr+Ytvw+g3hFm/u9M85zZaKPx7X1or+LOLifNAAQTHkYFSF+jOxgZS3Kr0i8rr5AfUvFCHbg1NJsy5SXewSAt4okJJZQJWz5m7i952xNk+wm8FM2vpMzhD2b8uLIcC5V/5FVZQKmbz3kc1YOiLfAF9uGtpwTzYYmp25PwSv9gY7RRyLKuejAF8l1Q38QCyxzQ+u50sgHk45XvO9IguHIm1UQ1uSko5PE20fdCHBqBZVZ5BC+U7k3EKwHNoHvoC+Ighd3xbX2WZF5pckoGLCCyuL1glIchAvq8hDIwyzo6q8jy4n97YoL+VWEMnTE6JBjHUAFt6LhDfMB6TjFEzPaSwlUilcXttJBzKTL7TbPGBhHx70b1OmDZO7PBvxhiKejc8+bHqP0p1+q6eDYMNp0zGbartgELWXgiehN4MQpLzTr1/IdNBEUC0MQGA6KxwRhFIZvkz1WSMe/6/CAgxS58MaW/wvYATQ+HAHRnLvrg9wsZp3XIf64bEAPxaehmwYr8TMAD196v+pW4GnLmCUDGwK5vofk/SJO6ZPfEgQcHPz2mb0cxEByE4483dv8XeE3zXlbJYiLdVpKY6KtvfZq/9SqimEPcbJq18uWVS+HahBrNYCknbuddr5wIxLPZl9UcJQMYfYcRuA3/L+zBIXhOuoBezecosDroxNVwVkOgT/7VCBhFh0ZfLjyfnxlH1OItQe4zBZs39vZcJH5LeYBQ7z5uB2BhmkFNX+0wZKOXXADTkJkyQ5jvu4PonuMsOCDbLqsbOycnLdIE0fTWR6SMc5IQh+I9uL6PcdnNe68uPsAziRGqhyJ9FF/8jzA5mHVCJ73m9v1fdeyowMBw1qEJmDx2tDlLz19oD9VAgtE+v45BKn6SMUo4x1lo6pzc8HvYKr5UJMw+XRDSBGHW9RM2H0t+6le0ZhTeu2CUhYzc/Zb+O9iwGJdbVW/EulZ+aJDwpq1H79evZIU9p5X3lZ1qn+WmNa8GFKFNA95zqsbke7IJJ88ydHqxDlHQoClOSH+MuZMyxEt/bAPaMKypnC5kP7egQjmGytfpVofiqeKv1RKrMl0kKN4igPAgWK/5ZI4yIWxCuF4UQODVIRcYC3M6P6J/2q6uqNThd/iFBwSE/OnDqSU7dExHeBSaMxLoTmYKu4DcU/nECHomUW7pxciEjcuc/ikBMGAs5vZ1c131nqxQW/8XwFMmmmQNgB6jFT65J0o7FMW2HjmioSdeQxLphLelWLond4B5bugwdKWiHwFjGA27qAkbQ24esQn4eNUAhl+JHOj7wUxUuuKZ8dKfLxasHeTRliwglb3a+gCnCS"
     },
     {
      "arguments": "{\"city\":\"Paris\"}",
      "call_id": "call-b50424b0-c80c-45a1-8f74-ca3bf108bb02-0",
      "name": "get_weather",
      "type": "function_call",
      "id": "fc_ee2a3737-1808-925b-8c71-f5b04b61b711_0",
      "status": "completed"
     }
    ],
    "usage": {
     "input_tokens": 292,
     "input_tokens_details": {
      "cached_tokens": 128
     },
     "output_tokens": 404,
     "output_tokens_details": {
      "reasoning_tokens": 394
     },
     "total_tokens": 696,
     "num_sources_used": 0,
     "num_server_side_tools_used": 0,
     "cost_in_usd_ticks": 12406000,
     "context_details": {
      "input_tokens": 292,
      "output_tokens": 408
     }
    },
    "status": "completed",
    "store": false
   }
  },
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/responses",
  "order_hint": 19,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.reasoning_text.delta",
  "description": "Raw reasoning text delta — mentioned in the reasoning guide alongside reasoning_summary_text.delta; NOT observed live on grok-4.3 (only summary deltas).",
  "schema": null,
  "example": null,
  "status": [
   "DOCUMENTED",
   "UNVERIFIED"
  ],
  "source": "https://docs.x.ai/developers/model-capabilities/text/reasoning",
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.web_search_call.in_progress / .searching / .completed",
  "description": "OpenAI-style web search progress events — not observed (web_search only exercised non-streaming).",
  "schema": null,
  "example": null,
  "status": [
   "UNVERIFIED"
  ],
  "source": "https://docs.x.ai/developers/model-capabilities/text/reasoning",
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.mcp_call.* / response.file_search_call.*",
  "description": "Not observed; mcp/file_search only exercised non-streaming.",
  "schema": null,
  "example": null,
  "status": [
   "UNVERIFIED"
  ],
  "source": "https://docs.x.ai/developers/model-capabilities/text/reasoning",
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "responses",
  "direction": "server→client",
  "event": "response.incomplete / response.failed / error",
  "description": "Not observed.",
  "schema": null,
  "example": null,
  "status": [
   "UNVERIFIED"
  ],
  "source": "https://docs.x.ai/developers/model-capabilities/text/reasoning",
  "_fragment": "generated/fragments/streaming-events/xai-inference.json"
 },
 {
  "provider": "xai",
  "api": "messages",
  "direction": "server→client",
  "event": "message_start",
  "description": "Anthropic-compatible: {message:{id, type:'message', role, content:[], model, stop_reason:null, usage:{input_tokens, cache_creation_input_tokens, cache_read_input_tokens, output_tokens:0}}}. Framing: `event: <name>` + `data: {…}`.",
  "schema": null,
  "example": {
   "type": "message_start",
   "message": {
    "id": "1bf6522c-ed92-9f36-a261-91bc34099b89",
    "type": "message",
    "role": "assistant",
    "content": [],
    "model": "grok-4.3",
    "stop_reason": null,
    "stop_sequence": null,
    "usage": {
     "input_tokens": 4,
     "cache_creation_input_tokens": 0,
     "cache_read_input_tokens": 192,
     "output_tokens": 0
    }
   }
  },
  "status": [
   "DOCUMENTED",
   "DEPRECATED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/legacy",
  "order_hint": 0,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json",
  "api_raw": "messages_compat"
 },
 {
  "provider": "xai",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_start",
  "description": "Opens a block: {index, content_block:{type:'thinking', thinking:'', signature:''}} for reasoning, then {type:'text', text:''}. Live: index is 0 for BOTH blocks (Anthropic would use 0 and 1). Framing: `event: <name>` + `data: {…}`.",
  "schema": null,
  "example": {
   "type": "content_block_start",
   "index": 0,
   "content_block": {
    "type": "thinking",
    "signature": "",
    "thinking": ""
   }
  },
  "status": [
   "DOCUMENTED",
   "DEPRECATED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/legacy",
  "order_hint": 1,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json",
  "api_raw": "messages_compat"
 },
 {
  "provider": "xai",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_delta",
  "description": "{delta:{type:'thinking_delta', thinking}} or {delta:{type:'text_delta', text}} — live deltas carry no `index` field. Framing: `event: <name>` + `data: {…}`.",
  "schema": null,
  "example": {
   "type": "content_block_delta",
   "delta": {
    "type": "thinking_delta",
    "thinking": "The user requested a"
   }
  },
  "status": [
   "DOCUMENTED",
   "DEPRECATED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/legacy",
  "order_hint": 2,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json",
  "api_raw": "messages_compat"
 },
 {
  "provider": "xai",
  "api": "messages",
  "direction": "server→client",
  "event": "content_block_stop",
  "description": "{index}. Framing: `event: <name>` + `data: {…}`.",
  "schema": null,
  "example": {
   "type": "content_block_stop",
   "index": 0
  },
  "status": [
   "DOCUMENTED",
   "DEPRECATED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/legacy",
  "order_hint": 3,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json",
  "api_raw": "messages_compat"
 },
 {
  "provider": "xai",
  "api": "messages",
  "direction": "server→client",
  "event": "message_delta",
  "description": "{delta:{stop_reason:'end_turn', stop_sequence:null}, usage:{output_tokens}} (output_tokens includes reasoning). Framing: `event: <name>` + `data: {…}`.",
  "schema": null,
  "example": {
   "type": "message_delta",
   "delta": {
    "stop_reason": "end_turn",
    "stop_sequence": null
   },
   "usage": {
    "output_tokens": 147
   }
  },
  "status": [
   "DOCUMENTED",
   "DEPRECATED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/legacy",
  "order_hint": 4,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json",
  "api_raw": "messages_compat"
 },
 {
  "provider": "xai",
  "api": "messages",
  "direction": "server→client",
  "event": "message_stop",
  "description": "End of stream (no [DONE]). Framing: `event: <name>` + `data: {…}`.",
  "schema": null,
  "example": {
   "type": "message_stop"
  },
  "status": [
   "DOCUMENTED",
   "DEPRECATED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/developers/rest-api-reference/inference/legacy",
  "order_hint": 5,
  "_fragment": "generated/fragments/streaming-events/xai-inference.json",
  "api_raw": "messages_compat"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "client→server",
  "event": "session.update",
  "description": "Update session configuration such as system prompt, voice, audio format, turn detection, and tools.",
  "schema": {
   "type": "object",
   "required": [
    "type",
    "session"
   ],
   "properties": {
    "type": {
     "type": "string",
     "description": "Event type identifier. Must be `session.update`."
    },
    "session": {
     "type": "object",
     "description": "Session configuration object.",
     "properties": {
      "model": {
       "type": "string",
       "enum": [
        "grok-voice-latest",
        "grok-voice-think-fast-2.0"
       ],
       "description": "Model to use for the session. Defaults to `grok-voice-latest`. Can also be set at connection time via the `model` query parameter."
      },
      "instructions": {
       "type": "string",
       "description": "System prompt for the voice agent."
      },
      "reasoning": {
       "type": "object",
       "description": "Reasoning settings for models that support them.",
       "properties": {
        "effort": {
         "type": "string",
         "enum": [
          "high",
          "none"
         ],
         "default": "high",
         "description": "Controls whether the model uses reasoning. Defaults to `high`. Can also be set at connection time via the `reasoning.effort` query parameter."
        }
       }
      },
      "voice": {
       "type": "string",
       "description": "Voice identifier. Use a built-in voice (e.g. Eve, Ara) or a custom voice ID."
      },
      "turn_detection": {
       "type": "object",
       "description": "Voice Activity Detection (VAD) settings.",
       "properties": {
        "type": {
         "type": "string",
         "description": "`\"server_vad\"` for automatic detection, `null` for manual text turns."
        },
        "threshold": {
         "type": "number",
         "description": "VAD activation threshold (0.1-0.9). Higher values require louder audio. Default: 0.85."
        },
        "silence_duration_ms": {
         "type": "number",
         "description": "Duration of silence in ms to detect speech stop (0-10000). Shorter values respond faster but may interrupt pauses."
        },
        "prefix_padding_ms": {
         "type": "number",
         "description": "Amount of audio (in ms) to include before the detected start of speech (0-10000). Helps capture the beginning of words that might otherwise be clipped by the VAD. Default: 333."
        },
        "idle_timeout_ms": {
         "type": "number",
         "description": "When set, the server proactively re-engages the user if no speech is detected for this many milliseconds after the assistant finishes responding, emitting `input_audio_buffer.timeout_triggered` and generating a check-in. Re-arms after every response. Default: null (disabled)."
        }
       }
      },
      "resumption": {
       "type": "object",
       "description": "Session resumption settings (xAI extension). Caches conversation turns keyed by the `conversation_id` query parameter and replays them on reconnect.",
       "properties": {
        "enabled": {
         "type": "boolean",
         "description": "Opt in to session resumption so prior turns are replayed to the model on reconnect. Default: false."
        }
       }
      },
      "audio": {
       "type": "object",
       "description": "Audio format and transport for input and output. `format` selects the codec; `transport` selects the wire path. Default transport is `json` (base64 in Realtime events). Set `transport` to `binary` to send/receive raw codec bytes as WebSocket binary frames (no protocol header). For `audio/opus`, each payload is one raw Opus packet (24 kHz). Input dual-accepts both channels for the configured format; output emits on the configured transport only. Mid-session `output.transport` changes apply at the next response boundary.",
       "properties": {
        "input": {
         "type": "object",
         "description": "Input audio format and transport.",
         "properties": {
          "format": {
           "type": "object",
           "description": "Audio format specification.",
           "properties": {
            "type": {
             "type": "string",
             "enum": [
              "audio/pcm",
              "audio/pcmu",
              "audio/pcma",
              "audio/opus"
             ],
             "description": "Audio encoding format. `audio/pcm` for raw PCM, `audio/pcmu` for G.711 u-law (telephony), `audio/pcma` for G.711 A-law (telephony), `audio/opus` for raw Opus packets (24 kHz)."
            },
            "rate": {
             "type": "integer",
             "enum": [
              8000,
              11025,
              16000,
              22050,
              24000,
              32000,
              44100,
              48000
             ],
             "description": "Sample rate in Hz (PCM only). Default: 24000. Use 8000 for telephony (G.711)."
            }
           }
          },
          "transport": {
           "type": "string",
           "enum": [
            "json",
            "binary"
           ],
           "description": "Preferred wire path for input audio. `json` (default): base64 in `input_audio_buffer.append`. `binary`: raw codec bytes as WebSocket binary frames. Server accepts both for the configured format (dual-accept)."
          },
          "transcription": {
           "type": "object",
           "description": "Transcription configuration for the user's input audio.",
           "properties": {
            "language_hint": {
             "type": "string",
             "description": "BCP-47 language code (e.g. `ja`, `ar`, `es-MX`, `pt-BR`) to bias ASR transcription toward a specific language. Can be updated mid-session."
            },
            "keyterms": {
             "type": "array",
             "items": {
              "type": "string"
             },
             "description": "Key terms to bias transcription toward (e.g. product names, proper nouns). Repeat for each term. Max 100 terms, each up to 50 characters. Can be updated mid-session."
            }
           }
          }
         }
        },
        "output": {
         "type": "object",
         "description": "Output audio format and transport.",
         "properties": {
          "format": {
           "type": "object",
           "description": "Audio format specification.",
           "properties": {
            "type": {
             "type": "string",
             "enum": [
              "audio/pcm",
              "audio/pcmu",
              "audio/pcma",
              "audio/opus"
             ],
             "description": "Audio encoding format. `audio/pcm` for raw PCM, `audio/pcmu` for G.711 u-law (telephony), `audio/pcma` for G.711 A-law (telephony), `audio/opus` for raw Opus packets (24 kHz)."
            },
            "rate": {
             "type": "integer",
             "enum": [
              8000,
              11025,
              16000,
              22050,
              24000,
              32000,
              44100,
              48000
             ],
             "description": "Sample rate in Hz (PCM only). Default: 24000. Use 8000 for telephony (G.711)."
            }
           }
          },
          "transport": {
           "type": "string",
           "enum": [
            "json",
            "binary"
           ],
           "description": "Wire path for assistant audio. `json` (default): base64 in `response.output_audio.delta` / `response.audio.delta`. `binary`: raw codec bytes as WebSocket binary frames (lifecycle events remain JSON). Changes apply at the next response boundary."
          },
          "speed": {
           "type": "number",
           "description": "Playback speed multiplier for assistant audio output. Range: 0.7–1.5. Default: 1.0. Values below 1.0 slow down speech; values above 1.0 speed it up."
          }
         }
        }
       }
      },
      "tools": {
       "type": "array",
       "description": "Tools available to the voice agent.",
       "items": {
        "type": "object",
        "required": [
         "type"
        ],
        "properties": {
         "type": {
          "type": "string",
          "enum": [
           "function",
           "web_search",
           "x_search",
           "file_search",
           "mcp"
          ],
          "description": "Tool type."
         },
         "function": {
          "type": "object",
          "description": "For `function` type: the function definition.",
          "properties": {
           "name": {
            "type": "string",
            "description": "Function name."
           },
           "description": {
            "type": "string",
            "description": "Description of what the function does."
           },
           "parameters": {
            "type": "object",
            "description": "JSON Schema object describing the function parameters."
           }
          }
         },
         "location": {
          "type": "object",
          "description": "For `web_search` type: optional location context for search results. Also accepted under the text-API name `user_location`.",
          "properties": {
           "country": {
            "type": "string",
            "description": "Country name or ISO 3166-1 alpha-2 code."
           },
           "city": {
            "type": "string",
            "description": "City name."
           },
           "region": {
            "type": "string",
            "description": "State or region name."
           },
           "timezone": {
            "type": "string",
            "description": "IANA timezone, e.g., `America/Los_Angeles`."
           }
          }
         },
         "allowed_domains": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "maxItems": 5,
          "description": "For `web_search` type: only include results from these domains (no protocol or path). Mutually exclusive with `excluded_domains` — do not set both on the same tool."
         },
         "excluded_domains": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "maxItems": 5,
          "description": "For `web_search` type: exclude results from these domains. Mutually exclusive with `allowed_domains` — do not set both on the same tool."
         },
         "allowed_x_handles": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "maxItems": 20,
          "description": "For `x_search` type: only include posts from these X handles (without `@`). Mutually exclusive with `excluded_x_handles` — do not set both on the same tool."
         },
         "excluded_x_handles": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "maxItems": 20,
          "description": "For `x_search` type: exclude posts from these X handles. Mutually exclusive with `allowed_x_handles` — do not set both on the same tool."
         },
         "from_date": {
          "type": "string",
          "format": "date",
          "description": "For `x_search` type: only consider posts from this date, ISO-8601 `YYYY-MM-DD`. Must not be later than `to_date`."
         },
         "to_date": {
          "type": "string",
          "format": "date",
          "description": "For `x_search` type: only consider posts up to this date, ISO-8601 `YYYY-MM-DD`."
         },
         "enable_image_understanding": {
          "type": "boolean",
          "description": "For `web_search` and `x_search` types: let the agent view images found in results."
         },
         "enable_video_understanding": {
          "type": "boolean",
          "description": "For `x_search` type: let the agent view videos in posts."
         },
         "vector_store_ids": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "For `file_search` type: array of vector store IDs to search."
         },
         "max_num_results": {
          "type": "integer",
          "description": "For `file_search` type: maximum number of results to return."
         },
         "server_label": {
          "type": "string",
          "description": "For `mcp` type: unique label for the MCP server (no dots allowed, use hyphens)."
         },
         "server_url": {
          "type": "string",
          "description": "For `mcp` type: URL of the MCP server."
         },
         "allowed_tools": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "For `mcp` type: optional list of tool names to allow from this server."
         },
         "authorization": {
          "type": "string",
          "description": "For `mcp` type: optional authorization token to send with requests."
         },
         "headers": {
          "type": "object",
          "description": "For `mcp` type: optional custom headers to send with requests."
         },
         "server_description": {
          "type": "string",
          "description": "For `mcp` type: optional description of the MCP server for the model."
         }
        }
       }
      },
      "replace": {
       "type": [
        "object",
        "null"
       ],
       "additionalProperties": {
        "type": "string"
       },
       "description": "Spoken-text find-and-replace map applied to the model's output before TTS, e.g. `{\"Acme Mobile\": \"Acme Mobull\"}`. Each key is matched case-insensitively on whole-word boundaries with the configured replacement casing preserved; longest match wins. Changes only the spoken audio, not the transcript the user sees. The applied map is echoed back on `session.updated`."
      }
     }
    }
   }
  },
  "example": {
   "type": "session.update",
   "session": {
    "voice": "Eve",
    "instructions": "You are a helpful assistant.",
    "replace": {
     "Acme Mobile": "Acme Mobull"
    },
    "turn_detection": {
     "type": "server_vad"
    },
    "audio": {
     "input": {
      "format": {
       "type": "audio/pcm",
       "rate": 24000
      },
      "transcription": {
       "language_hint": "en",
       "keyterms": [
        "xAI",
        "Grok",
        "Understand The Universe"
       ]
      }
     },
     "output": {
      "format": {
       "type": "audio/pcm",
       "rate": 24000
      }
     }
    }
   }
  },
  "order_hint": 3,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "client→server",
  "event": "input_audio_buffer.append",
  "description": "Append chunks of base64-encoded audio data to the input buffer. The server does not send back a corresponding message.",
  "schema": {
   "type": "object",
   "required": [
    "type",
    "audio"
   ],
   "properties": {
    "type": {
     "type": "string",
     "description": "Must be `input_audio_buffer.append`."
    },
    "audio": {
     "type": "string",
     "description": "Base64-encoded audio data chunk."
    }
   }
  },
  "example": {
   "type": "input_audio_buffer.append",
   "audio": "<Base64EncodedAudioData>"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "client→server",
  "event": "input_audio_buffer.commit",
  "description": "Commit the audio buffer as a user message. Only available when `turn_detection` type is `null`. Confirmed by `input_audio_buffer.committed` from the server.",
  "schema": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "description": "Must be `input_audio_buffer.commit`."
    }
   }
  },
  "example": {
   "type": "input_audio_buffer.commit"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "client→server",
  "event": "conversation.item.create",
  "description": "Create a new conversation item. Can be a user text message, an assistant text message for history seeding, a function call for seeding tool-use history, or a function call output.",
  "schema": {
   "type": "object",
   "required": [
    "type",
    "item"
   ],
   "properties": {
    "type": {
     "type": "string",
     "description": "Must be `conversation.item.create`."
    },
    "previous_item_id": {
     "type": "string",
     "description": "Optional. Used to insert the turn into a specific position in history."
    },
    "item": {
     "description": "The conversation item to create.",
     "oneOf": [
      {
       "type": "object",
       "title": "Message",
       "description": "A text message from a user, assistant, or system role.",
       "required": [
        "type",
        "role",
        "content"
       ],
       "properties": {
        "type": {
         "type": "string",
         "description": "Always `message`.",
         "enum": [
          "message"
         ]
        },
        "role": {
         "type": "string",
         "enum": [
          "user",
          "assistant",
          "system"
         ],
         "description": "Role of the message sender. Use `user` for user messages, `assistant` for seeding assistant history, or `system` for system-level context."
        },
        "id": {
         "type": "string",
         "description": "Optional client-generated item ID."
        },
        "content": {
         "type": "array",
         "description": "Array of content parts.",
         "items": {
          "type": "object",
          "properties": {
           "type": {
            "type": "string",
            "enum": [
             "input_text",
             "input_audio",
             "text",
             "audio"
            ],
            "description": "Content type. Use `input_text` for user text input, `input_audio` for user audio input, `text` for general text, or `audio` for audio content."
           },
           "text": {
            "type": "string",
            "description": "Text content. Used with `input_text` or `text` content types."
           },
           "audio": {
            "type": "string",
            "description": "Base64-encoded audio data. Used with `input_audio` or `audio` content types."
           },
           "transcript": {
            "type": "string",
            "description": "Transcript of the audio content, if available."
           }
          }
         }
        }
       }
      },
      {
       "type": "object",
       "title": "Function call",
       "description": "Inject an assistant-initiated function call into the conversation history. Use this to seed tool-use history when reconnecting or restoring a previous session. Pair with a corresponding `function_call_output` item to provide the tool result.",
       "required": [
        "type",
        "name",
        "arguments"
       ],
       "properties": {
        "type": {
         "type": "string",
         "description": "Always `function_call`.",
         "enum": [
          "function_call"
         ]
        },
        "name": {
         "type": "string",
         "description": "The name of the function that was called."
        },
        "arguments": {
         "type": "string",
         "description": "JSON string of the function arguments."
        },
        "call_id": {
         "type": "string",
         "description": "The unique identifier for this function call. Use the same `call_id` in the corresponding `function_call_output` item."
        },
        "id": {
         "type": "string",
         "description": "Optional client-generated item ID."
        }
       }
      },
      {
       "type": "object",
       "title": "Function call output",
       "description": "Return the result of a function call to the model. Send this after receiving a `response.function_call_arguments.done` event, then call `response.create` to continue.",
       "required": [
        "type",
        "call_id",
        "output"
       ],
       "properties": {
        "type": {
         "type": "string",
         "description": "Always `function_call_output`.",
         "enum": [
          "function_call_output"
         ]
        },
        "call_id": {
         "type": "string",
         "description": "The `call_id` from the `response.function_call_arguments.done` event."
        },
        "output": {
         "type": "string",
         "description": "JSON string of the function result."
        },
        "id": {
         "type": "string",
         "description": "Optional client-generated item ID."
        }
       }
      },
      {
       "type": "object",
       "title": "Force message",
       "description": "Make the agent speak a hard-coded, TTS-synthesized line (not model-generated). The server synthesizes the text, injects a full response lifecycle (`response.created` → audio deltas → `response.done`), and records the utterance in conversation context as an assistant message. Do not send `response.create` after this — the force message is the complete turn. xAI extension; not part of the OpenAI Realtime API.",
       "required": [
        "type",
        "role",
        "content"
       ],
       "properties": {
        "type": {
         "type": "string",
         "description": "Always `force_message`.",
         "enum": [
          "force_message"
         ]
        },
        "role": {
         "type": "string",
         "description": "Always `assistant`.",
         "enum": [
          "assistant"
         ]
        },
        "content": {
         "type": "array",
         "description": "Array with a single content part containing the text to synthesize.",
         "items": {
          "type": "object",
          "properties": {
           "type": {
            "type": "string",
            "description": "Content type.",
            "enum": [
             "output_text"
            ]
           },
           "text": {
            "type": "string",
            "description": "Verbatim text to synthesize via TTS."
           }
          }
         }
        },
        "interruptible": {
         "type": "boolean",
         "description": "Whether the user can interrupt playback by speaking. When `false`, caller audio is dropped until playback completes. Default: `true`."
        }
       }
      }
     ]
    }
   }
  },
  "example": {
   "type": "conversation.item.create",
   "item": {
    "type": "message",
    "role": "user",
    "content": [
     {
      "type": "input_text",
      "text": "Hello, how are you?"
     }
    ]
   }
  },
  "order_hint": 5,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "client→server",
  "event": "input_audio_buffer.clear",
  "description": "Clear the input audio buffer. Use this to discard any pending audio data without committing it.",
  "schema": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "description": "Must be `input_audio_buffer.clear`."
    }
   }
  },
  "example": {
   "type": "input_audio_buffer.clear"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "client→server",
  "event": "conversation.item.delete",
  "description": "Delete a conversation item by ID. The server confirms deletion with a `conversation.item.deleted` event.",
  "schema": {
   "type": "object",
   "required": [
    "type",
    "item_id"
   ],
   "properties": {
    "type": {
     "type": "string",
     "description": "Must be `conversation.item.delete`."
    },
    "item_id": {
     "type": "string",
     "description": "The ID of the conversation item to delete."
    }
   }
  },
  "example": {
   "type": "conversation.item.delete",
   "item_id": "msg_003"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "client→server",
  "event": "conversation.item.truncate",
  "description": "Truncate a previous assistant audio message item. Removes audio and transcript content after the specified duration, keeping only the content up to that point. The server confirms with a `conversation.item.truncated` event.",
  "schema": {
   "type": "object",
   "required": [
    "type",
    "item_id",
    "content_index",
    "audio_end_ms"
   ],
   "properties": {
    "type": {
     "type": "string",
     "description": "Must be `conversation.item.truncate`."
    },
    "item_id": {
     "type": "string",
     "description": "The ID of the assistant message item to truncate."
    },
    "content_index": {
     "type": "integer",
     "description": "Index of the content part to truncate."
    },
    "audio_end_ms": {
     "type": "integer",
     "description": "How many milliseconds of audio the client has actually played back before the interruption. Audio and transcript after this point is removed from the conversation context."
    }
   }
  },
  "example": {
   "type": "conversation.item.truncate",
   "item_id": "msg_004",
   "content_index": 0,
   "audio_end_ms": 1500
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "client→server",
  "event": "response.create",
  "description": "Request the server to create a new assistant response. This is handled automatically when using server-side VAD.",
  "schema": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "description": "Must be `response.create`."
    },
    "response": {
     "type": "object",
     "description": "Optional response configuration.",
     "properties": {
      "modalities": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string",
        "enum": [
         "text",
         "audio"
        ]
       },
       "description": "Requested output modalities."
      },
      "instructions": {
       "type": [
        "string",
        "null"
       ],
       "description": "Per-response system prompt override. When set, this replaces the session-level `instructions` for this response only — subsequent responses revert to the session instructions. Useful for injecting dynamic context or changing behavior for a single turn without updating the session."
      },
      "metadata": {
       "type": [
        "object",
        "null"
       ],
       "description": "Developer-provided key-value pairs attached to this response, echoed back on `response.created` and `response.done`. Useful for correlating responses with what triggered them. Up to 16 pairs; keys up to 64 characters, string values up to 512 characters."
      }
     }
    }
   }
  },
  "example": {
   "type": "response.create",
   "response": {
    "metadata": {
     "my_trigger_id": "btn-checkout-42"
    }
   }
  },
  "order_hint": 7,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "client→server",
  "event": "response.cancel",
  "description": "Cancel an in-progress response. In VAD mode, interruptions are automatic — use this for manual cancel in non-VAD mode.",
  "schema": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "description": "Must be `response.cancel`."
    },
    "response_id": {
     "type": "string",
     "description": "Optional. The ID of the response to cancel. If not provided, cancels the current in-progress response."
    }
   }
  },
  "example": {
   "type": "response.cancel"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "session.created",
  "description": "Sent automatically on WebSocket connection. Contains the session configuration.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `session.created`."
    },
    "session": {
     "type": "object",
     "description": "The session configuration.",
     "properties": {
      "id": {
       "type": "string",
       "description": "Unique session identifier."
      },
      "object": {
       "type": "string",
       "enum": [
        "realtime.session"
       ],
       "description": "Always `realtime.session`."
      },
      "model": {
       "type": "string",
       "description": "The model used for this session."
      },
      "instructions": {
       "type": "string",
       "description": "System prompt for the voice agent."
      },
      "reasoning": {
       "type": "object",
       "description": "Reasoning settings for the session when supported by the selected model.",
       "properties": {
        "effort": {
         "type": "string",
         "enum": [
          "high",
          "none"
         ],
         "default": "high",
         "description": "Reasoning setting for the session when supported by the selected model. Defaults to `high`."
        }
       }
      },
      "voice": {
       "type": "string",
       "description": "Voice identifier. Use a built-in voice (e.g. Eve, Ara) or a custom voice ID."
      },
      "modalities": {
       "type": "array",
       "items": {
        "type": "string",
        "enum": [
         "text",
         "audio"
        ]
       },
       "description": "Enabled output modalities."
      },
      "turn_detection": {
       "type": "object",
       "description": "Turn detection configuration.",
       "properties": {
        "type": {
         "type": "string",
         "description": "`server_vad` or `null`."
        }
       }
      },
      "tools": {
       "type": "array",
       "items": {
        "type": "object"
       },
       "description": "Configured tools."
      },
      "replace": {
       "type": "object",
       "additionalProperties": {
        "type": "string"
       },
       "description": "Spoken-text find-and-replace map currently applied to the session (see `session.update`)."
      }
     }
    }
   }
  },
  "example": {
   "event_id": "event_001",
   "type": "session.created",
   "session": {
    "id": "sess_001",
    "object": "realtime.session",
    "model": "grok-voice-latest"
   }
  },
  "observed_example": {
   "type": "session.created",
   "event_id": "09780353-6b3b-4d47-b3be-b8c2a28a0afa",
   "session": {
    "id": "e4af06beea014dd9875711cae1afe82f",
    "object": "realtime.session",
    "instructions": "",
    "voice": "xai_ara",
    "modalities": [
     "audio"
    ],
    "turn_detection": {
     "type": null
    },
    "tools": [],
    "model": "grok-voice-think-fast-2.0"
   }
  },
  "order_hint": 1,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.created",
  "description": "The first message on connection. Notifies the client that a conversation session has been created.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `conversation.created`."
    },
    "conversation": {
     "type": "object",
     "description": "The conversation object.",
     "properties": {
      "id": {
       "type": "string",
       "description": "Unique conversation identifier."
      },
      "object": {
       "type": "string",
       "enum": [
        "realtime.conversation"
       ],
       "description": "Always `realtime.conversation`."
      }
     }
    }
   }
  },
  "example": {
   "event_id": "event_9101",
   "type": "conversation.created",
   "conversation": {
    "id": "conv_001",
    "object": "realtime.conversation"
   }
  },
  "observed_example": {
   "type": "conversation.created",
   "event_id": "9bcf9997-7c8e-422f-9f82-da962539fc95",
   "conversation": {
    "id": "0e174811-70d7-4e8e-9fa5-882e882adf69",
    "object": "realtime.conversation"
   },
   "previous_item_id": null
  },
  "order_hint": 2,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "session.updated",
  "description": "Acknowledges the client's session.update message that the session has been configured.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `session.updated`."
    },
    "session": {
     "type": "object",
     "description": "The updated session configuration.",
     "properties": {
      "id": {
       "type": "string",
       "description": "Unique session identifier."
      },
      "object": {
       "type": "string",
       "enum": [
        "realtime.session"
       ],
       "description": "Always `realtime.session`."
      },
      "model": {
       "type": "string",
       "description": "The model used for this session."
      },
      "instructions": {
       "type": "string",
       "description": "System prompt for the voice agent."
      },
      "voice": {
       "type": "string",
       "description": "Voice identifier. Use a built-in voice (e.g. Eve, Ara) or a custom voice ID."
      },
      "modalities": {
       "type": "array",
       "items": {
        "type": "string",
        "enum": [
         "text",
         "audio"
        ]
       },
       "description": "Enabled output modalities."
      },
      "turn_detection": {
       "type": "object",
       "description": "Turn detection configuration.",
       "properties": {
        "type": {
         "type": "string",
         "description": "`server_vad` for automatic detection, or `null` for manual turns."
        }
       }
      },
      "tools": {
       "type": "array",
       "items": {
        "type": "object"
       },
       "description": "Configured tools."
      },
      "replace": {
       "type": "object",
       "additionalProperties": {
        "type": "string"
       },
       "description": "The applied spoken-text find-and-replace map, echoed back from the client's `session.update` (see `session.update`)."
      }
     }
    }
   }
  },
  "example": {
   "event_id": "event_123",
   "type": "session.updated",
   "session": {
    "model": "grok-voice-latest",
    "instructions": "You are a helpful assistant.",
    "voice": "Eve",
    "replace": {
     "Acme Mobile": "Acme Mobull"
    },
    "turn_detection": {
     "type": "server_vad"
    }
   }
  },
  "observed_example": {
   "session": {
    "instructions": "You are a test agent. Answer with the single word OK and nothing else.",
    "enable_noise_suppression": false,
    "reasoning": {
     "effort": "none"
    },
    "model": "grok-voice-think-fast-2.0",
    "keep_context": false,
    "enable_phonetic_spelling": false,
    "modalities": [
     "audio"
    ],
    "input_audio_format": "not specified",
    "output_audio_format": "not specified",
    "tool_choice": "auto",
    "temperature": -1.0,
    "max_response_output_tokens": "inf",
    "audio": {
     "input": {
      "format": {
       "type": "audio/pcm",
       "rate": 16000
      },
      "transport": "json"
     },
     "output": {
      "format": {
       "type": "audio/pcm",
       "rate": 16000
      },
      "transport": "json"
     }
    },
    "input_audio_transcription": null
   },
   "type": "session.updated",
   "event_id": "46ea6da0-ca85-48c5-9f8a-69ffd6bb11f7",
   "previous_item_id": null
  },
  "order_hint": 4,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "input_audio_buffer.speech_started",
  "description": "Notifies that the server's VAD detected the start of speech. Only available with server_vad turn detection.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `input_audio_buffer.speech_started`."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the associated message item."
    },
    "audio_start_ms": {
     "type": "integer",
     "description": "Millisecond offset in the audio buffer where speech was detected."
    }
   }
  },
  "example": {
   "event_id": "event_1516",
   "type": "input_audio_buffer.speech_started",
   "item_id": "msg_003"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "input_audio_buffer.speech_stopped",
  "description": "Notifies that the server's VAD detected the end of speech. Only available with server_vad turn detection.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `input_audio_buffer.speech_stopped`."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the associated message item."
    },
    "audio_end_ms": {
     "type": "integer",
     "description": "Millisecond offset in the audio buffer where speech ended."
    }
   }
  },
  "example": {
   "event_id": "event_1516",
   "type": "input_audio_buffer.speech_stopped",
   "item_id": "msg_003"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "input_audio_buffer.committed",
  "description": "Input audio buffer has been committed as a user message.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `input_audio_buffer.committed`."
    },
    "previous_item_id": {
     "type": "string",
     "description": "ID of the preceding conversation item."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the newly created user message item."
    }
   }
  },
  "example": {
   "event_id": "event_1121",
   "type": "input_audio_buffer.committed",
   "previous_item_id": "msg_001",
   "item_id": "msg_002"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "input_audio_buffer.timeout_triggered",
  "description": "The `turn_detection.idle_timeout_ms` idle timer fired: no user speech was detected for the configured duration after the assistant finished responding. The server commits a silent user turn and generates a proactive check-in.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `input_audio_buffer.timeout_triggered`."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the user item committed for this idle-timeout turn."
    },
    "previous_item_id": {
     "type": [
      "string",
      "null"
     ],
     "description": "ID of the preceding conversation item, or null."
    },
    "audio_start_ms": {
     "type": "integer",
     "description": "Cumulative offset (ms) from the start of audio written to the input buffer marking the beginning of the idle stretch."
    },
    "audio_end_ms": {
     "type": "integer",
     "description": "Cumulative offset (ms) at which the idle timer fired. `audio_end_ms - audio_start_ms` is approximately the configured `idle_timeout_ms`."
    }
   }
  },
  "example": {
   "event_id": "e4d0d1b6-aebc-49ec-bb3b-66122daa89f1",
   "type": "input_audio_buffer.timeout_triggered",
   "item_id": "f1bfca0c-169e-4752-8b8a-b52abde3ddb6",
   "previous_item_id": null,
   "audio_start_ms": 39100,
   "audio_end_ms": 49300
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "input_audio_buffer.cleared",
  "description": "Confirms the input audio buffer has been cleared.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `input_audio_buffer.cleared`."
    }
   }
  },
  "example": {
   "event_id": "event_1122",
   "type": "input_audio_buffer.cleared"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.item.deleted",
  "description": "Confirms a conversation item has been deleted.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `conversation.item.deleted`."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the deleted item."
    }
   }
  },
  "example": {
   "event_id": "event_1920",
   "type": "conversation.item.deleted",
   "item_id": "msg_003"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.item.added",
  "description": "A new user or assistant message has been added to the conversation history.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `conversation.item.added`."
    },
    "previous_item_id": {
     "type": "string",
     "description": "ID of the preceding item in conversation history."
    },
    "item": {
     "description": "The conversation item that was added.",
     "oneOf": [
      {
       "type": "object",
       "title": "Message",
       "description": "A text or audio message from a user or assistant.",
       "properties": {
        "id": {
         "type": "string",
         "description": "Unique item identifier."
        },
        "object": {
         "type": "string",
         "enum": [
          "realtime.item"
         ],
         "description": "Always `realtime.item`."
        },
        "type": {
         "type": "string",
         "enum": [
          "message"
         ],
         "description": "Always `message`."
        },
        "status": {
         "type": "string",
         "enum": [
          "completed",
          "in_progress",
          "cancelled",
          "incomplete"
         ],
         "description": "Processing status of the item."
        },
        "role": {
         "type": "string",
         "enum": [
          "user",
          "assistant",
          "system"
         ],
         "description": "Role of the message sender."
        },
        "content": {
         "type": "array",
         "description": "Array of content parts.",
         "items": {
          "type": "object",
          "properties": {
           "type": {
            "type": "string",
            "enum": [
             "input_audio",
             "input_text",
             "text",
             "audio"
            ],
            "description": "Content type."
           },
           "transcript": {
            "type": "string",
            "description": "Text transcript of audio content."
           },
           "text": {
            "type": "string",
            "description": "Text content."
           }
          }
         }
        }
       }
      },
      {
       "type": "object",
       "title": "Function call",
       "description": "A function call initiated by the assistant.",
       "properties": {
        "id": {
         "type": "string",
         "description": "Unique item identifier."
        },
        "object": {
         "type": "string",
         "enum": [
          "realtime.item"
         ],
         "description": "Always `realtime.item`."
        },
        "type": {
         "type": "string",
         "enum": [
          "function_call"
         ],
         "description": "Always `function_call`."
        },
        "status": {
         "type": "string",
         "enum": [
          "completed",
          "in_progress",
          "cancelled",
          "incomplete"
         ],
         "description": "Processing status."
        },
        "call_id": {
         "type": "string",
         "description": "Unique function call identifier."
        },
        "name": {
         "type": "string",
         "description": "Name of the function being called."
        },
        "arguments": {
         "type": "string",
         "description": "JSON string of the function arguments."
        }
       }
      },
      {
       "type": "object",
       "title": "Function call output",
       "description": "The result of a function call, provided by the client.",
       "properties": {
        "id": {
         "type": "string",
         "description": "Unique item identifier."
        },
        "object": {
         "type": "string",
         "enum": [
          "realtime.item"
         ],
         "description": "Always `realtime.item`."
        },
        "type": {
         "type": "string",
         "enum": [
          "function_call_output"
         ],
         "description": "Always `function_call_output`."
        },
        "status": {
         "type": "string",
         "enum": [
          "completed",
          "in_progress"
         ],
         "description": "Processing status."
        },
        "call_id": {
         "type": "string",
         "description": "The function call identifier this output is for."
        },
        "output": {
         "type": "string",
         "description": "JSON string of the function result."
        }
       }
      }
     ]
    }
   }
  },
  "example": {
   "event_id": "event_1920",
   "type": "conversation.item.added",
   "previous_item_id": "msg_002",
   "item": {
    "id": "msg_003",
    "object": "realtime.item",
    "type": "message",
    "status": "completed",
    "role": "user",
    "content": [
     {
      "type": "input_audio",
      "transcript": "hello how are you"
     }
    ]
   }
  },
  "observed_example": {
   "type": "conversation.item.added",
   "event_id": "a0d67e20-3a2e-43f1-b4f8-4ab637f26790",
   "item": {
    "id": "95be5a32-c44f-459b-9ca9-be462f7611a5",
    "object": "realtime.item",
    "type": "message",
    "status": "completed",
    "role": "user",
    "content": [
     {
      "type": "input_text",
      "text": "Reply with OK."
     }
    ],
    "replayed": false
   },
   "previous_item_id": null
  },
  "order_hint": 6,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.item.truncated",
  "description": "Confirms that a conversation item has been truncated. Sent in response to a `conversation.item.truncate` client event.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `conversation.item.truncated`."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the truncated item."
    },
    "content_index": {
     "type": "integer",
     "description": "Index of the content part that was truncated."
    },
    "audio_end_ms": {
     "type": "integer",
     "description": "Duration in milliseconds of the remaining audio."
    },
    "transcript": {
     "type": "string",
     "description": "The truncated transcript text (up to the truncation point). Useful for updating the displayed transcript in the client UI after an interruption. xAI extension — not part of the OpenAI Realtime API."
    }
   }
  },
  "example": {
   "event_id": "event_2021",
   "type": "conversation.item.truncated",
   "item_id": "msg_004",
   "content_index": 0,
   "audio_end_ms": 1500,
   "transcript": "Hello! I'm doing well, thank you for"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.item.input_audio_transcription.completed",
  "description": "Audio transcription for the user's input has been completed.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `conversation.item.input_audio_transcription.completed`."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the conversation item whose audio was transcribed."
    },
    "transcript": {
     "type": "string",
     "description": "The transcribed text."
    }
   }
  },
  "example": {
   "event_id": "event_2122",
   "type": "conversation.item.input_audio_transcription.completed",
   "item_id": "msg_003",
   "transcript": "Hello, how are you?"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "conversation.item.input_audio_transcription.updated",
  "description": "Streaming transcription update for the user's audio input. Emitted as the user speaks, providing the cumulative transcript so far before the final `completed` event. Note that this is the cumulative transcript which may have corrections to previous updated transcripts — this is different from a transcript delta. Only emitted when `audio.input.transcription.model` is set to `grok-transcribe` in the session configuration. Useful for displaying live captions.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `conversation.item.input_audio_transcription.updated`."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the conversation item whose audio is being transcribed."
    },
    "transcript": {
     "type": "string",
     "description": "The cumulative transcript text so far. May contain corrections to text from previous `updated` events."
    }
   }
  },
  "example": {
   "event_id": "event_2123",
   "type": "conversation.item.input_audio_transcription.updated",
   "item_id": "msg_003",
   "transcript": "Hello, how are"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "input_audio_buffer.dtmf_event_received",
  "description": "A DTMF tone (phone keypress) was detected on a SIP session. SIP only — not emitted on direct WebSocket connections. Digits are buffered server-side and flushed as a text message to the model on `#` key, 2.5s idle, or when the user begins speaking.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `input_audio_buffer.dtmf_event_received`."
    },
    "event": {
     "type": "string",
     "description": "The DTMF digit or symbol (`0`–`9`, `*`, `#`)."
    },
    "received_at": {
     "type": "integer",
     "description": "Unix timestamp (seconds) when the tone was received."
    }
   }
  },
  "example": {
   "event_id": "event_dtmf01",
   "type": "input_audio_buffer.dtmf_event_received",
   "event": "5",
   "received_at": 1730000000
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.created",
  "description": "A new assistant response turn is in progress. Audio deltas from this turn share the same response_id.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.created`."
    },
    "response": {
     "type": "object",
     "description": "The response object.",
     "properties": {
      "id": {
       "type": "string",
       "description": "Unique response identifier."
      },
      "object": {
       "type": "string",
       "enum": [
        "realtime.response"
       ],
       "description": "Always `realtime.response`."
      },
      "status": {
       "type": "string",
       "enum": [
        "in_progress",
        "completed",
        "cancelled",
        "incomplete"
       ],
       "description": "Status of the response. Initially `in_progress`."
      },
      "output": {
       "type": "array",
       "items": {
        "type": "object"
       },
       "description": "Array of output items (initially empty, populated as items are added)."
      },
      "metadata": {
       "type": [
        "object",
        "null"
       ],
       "description": "Developer-provided key-value pairs from `response.create`, echoed verbatim. `null` for responses not triggered by a client `response.create` (e.g. automatic responses in server-side VAD mode)."
      }
     }
    }
   }
  },
  "example": {
   "event_id": "event_2930",
   "type": "response.created",
   "response": {
    "id": "resp_001",
    "object": "realtime.response",
    "status": "in_progress",
    "output": [],
    "metadata": {
     "my_trigger_id": "btn-checkout-42"
    }
   }
  },
  "observed_example": {
   "type": "response.created",
   "event_id": "9c4f40f9-4d9a-4510-bb89-facc6ea314c5",
   "response": {
    "id": "5e885467-a403-43e5-8fd0-6fbbc0922035",
    "object": "realtime.response",
    "output": [],
    "status": "in_progress",
    "status_details": "unimplemented",
    "usage": {}
   },
   "previous_item_id": null
  },
  "order_hint": 8,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.output_item.added",
  "description": "A new assistant response item is added to the message history.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.output_item.added`."
    },
    "response_id": {
     "type": "string",
     "description": "ID of the response this item belongs to."
    },
    "output_index": {
     "type": "integer",
     "description": "Index of the output item in the response."
    },
    "item": {
     "description": "The output item that was added.",
     "oneOf": [
      {
       "type": "object",
       "title": "Message",
       "description": "An assistant text or audio message.",
       "properties": {
        "id": {
         "type": "string",
         "description": "Unique item identifier."
        },
        "object": {
         "type": "string",
         "enum": [
          "realtime.item"
         ],
         "description": "Always `realtime.item`."
        },
        "type": {
         "type": "string",
         "enum": [
          "message"
         ],
         "description": "Always `message`."
        },
        "status": {
         "type": "string",
         "enum": [
          "in_progress",
          "completed",
          "cancelled",
          "incomplete"
         ],
         "description": "Processing status."
        },
        "role": {
         "type": "string",
         "enum": [
          "assistant"
         ],
         "description": "Always `assistant`."
        },
        "content": {
         "type": "array",
         "items": {
          "type": "object"
         },
         "description": "Content parts (populated as content streams in)."
        }
       }
      },
      {
       "type": "object",
       "title": "Function call",
       "description": "A function call the assistant wants to invoke.",
       "properties": {
        "id": {
         "type": "string",
         "description": "Unique item identifier."
        },
        "object": {
         "type": "string",
         "enum": [
          "realtime.item"
         ],
         "description": "Always `realtime.item`."
        },
        "type": {
         "type": "string",
         "enum": [
          "function_call"
         ],
         "description": "Always `function_call`."
        },
        "status": {
         "type": "string",
         "enum": [
          "in_progress",
          "completed",
          "cancelled",
          "incomplete"
         ],
         "description": "Processing status."
        },
        "call_id": {
         "type": "string",
         "description": "Unique function call identifier. Use this in `conversation.item.create` with `function_call_output`."
        },
        "name": {
         "type": "string",
         "description": "Name of the function being called."
        }
       }
      }
     ]
    }
   }
  },
  "example": {
   "event_id": "event_3334",
   "type": "response.output_item.added",
   "response_id": "resp_001",
   "output_index": 0,
   "item": {
    "id": "msg_007",
    "object": "realtime.item",
    "type": "message",
    "status": "in_progress",
    "role": "assistant",
    "content": []
   }
  },
  "observed_example": {
   "type": "response.output_item.added",
   "event_id": "d421b30d-232c-48cb-87a2-067e3604d975",
   "item": {
    "id": "3e40d600-a8bd-445f-a206-1950d2091453",
    "object": "realtime.item",
    "type": "message",
    "status": "in_progress",
    "role": "assistant",
    "replayed": false
   },
   "response_id": "5e885467-a403-43e5-8fd0-6fbbc0922035",
   "output_index": 0,
   "previous_item_id": null
  },
  "order_hint": 9,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.output_item.done",
  "description": "An output item is complete.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.output_item.done`."
    },
    "response_id": {
     "type": "string",
     "description": "ID of the response this item belongs to."
    },
    "output_index": {
     "type": "integer",
     "description": "Index of the output item in the response."
    },
    "item": {
     "description": "The completed output item.",
     "oneOf": [
      {
       "type": "object",
       "title": "Message",
       "description": "A completed assistant text or audio message.",
       "properties": {
        "id": {
         "type": "string",
         "description": "Unique item identifier."
        },
        "object": {
         "type": "string",
         "enum": [
          "realtime.item"
         ],
         "description": "Always `realtime.item`."
        },
        "type": {
         "type": "string",
         "enum": [
          "message"
         ],
         "description": "Always `message`."
        },
        "status": {
         "type": "string",
         "enum": [
          "completed",
          "cancelled",
          "incomplete"
         ],
         "description": "Final status."
        },
        "role": {
         "type": "string",
         "enum": [
          "assistant"
         ],
         "description": "Always `assistant`."
        },
        "content": {
         "type": "array",
         "items": {
          "type": "object"
         },
         "description": "Content parts for this item."
        }
       }
      },
      {
       "type": "object",
       "title": "Function call",
       "description": "A completed function call with final arguments.",
       "properties": {
        "id": {
         "type": "string",
         "description": "Unique item identifier."
        },
        "object": {
         "type": "string",
         "enum": [
          "realtime.item"
         ],
         "description": "Always `realtime.item`."
        },
        "type": {
         "type": "string",
         "enum": [
          "function_call"
         ],
         "description": "Always `function_call`."
        },
        "status": {
         "type": "string",
         "enum": [
          "completed",
          "cancelled",
          "incomplete"
         ],
         "description": "Final status."
        },
        "call_id": {
         "type": "string",
         "description": "Unique function call identifier. Use this in `conversation.item.create` with `function_call_output`."
        },
        "name": {
         "type": "string",
         "description": "Name of the function to call."
        },
        "arguments": {
         "type": "string",
         "description": "JSON string of the complete function arguments."
        }
       }
      }
     ]
    }
   }
  },
  "example": {
   "event_id": "event_3335",
   "type": "response.output_item.done",
   "response_id": "resp_001",
   "output_index": 0,
   "item": {
    "id": "msg_007",
    "object": "realtime.item",
    "type": "message",
    "status": "completed",
    "role": "assistant",
    "content": []
   }
  },
  "observed_example": {
   "type": "response.output_item.done",
   "event_id": "40a4f97c-5ade-4169-aa8b-87f1ee5e9b08",
   "item": {
    "id": "3e40d600-a8bd-445f-a206-1950d2091453",
    "object": "realtime.item",
    "type": "message",
    "status": "completed",
    "role": "assistant",
    "replayed": false
   },
   "response_id": "5e885467-a403-43e5-8fd0-6fbbc0922035",
   "output_index": 0,
   "previous_item_id": null
  },
  "order_hint": 16,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.content_part.added",
  "description": "A content part starts within an output item.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.content_part.added`."
    },
    "response_id": {
     "type": "string",
     "description": "ID of the response."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the output item."
    },
    "output_index": {
     "type": "integer",
     "description": "Index of the output item in the response."
    },
    "content_index": {
     "type": "integer",
     "description": "Index of the content part within the item."
    },
    "part": {
     "type": "object",
     "description": "The content part.",
     "properties": {
      "type": {
       "type": "string",
       "enum": [
        "audio",
        "text"
       ],
       "description": "Content type. `audio` for audio responses, `text` for text responses."
      },
      "transcript": {
       "type": "string",
       "description": "Transcript text, if applicable."
      }
     }
    }
   }
  },
  "example": {
   "event_id": "event_3336",
   "type": "response.content_part.added",
   "response_id": "resp_001",
   "item_id": "msg_007",
   "output_index": 0,
   "content_index": 0,
   "part": {
    "type": "audio"
   }
  },
  "observed_example": {
   "type": "response.content_part.added",
   "event_id": "52a30e1c-2f86-40a1-9992-df99782c39d0",
   "item_id": "3e40d600-a8bd-445f-a206-1950d2091453",
   "previous_item_id": "0",
   "part": {
    "type": "audio",
    "transcript": ""
   },
   "response_id": "5e885467-a403-43e5-8fd0-6fbbc0922035",
   "content_index": 0,
   "output_index": 0
  },
  "order_hint": 10,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.content_part.done",
  "description": "A content part finishes.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.content_part.done`."
    },
    "response_id": {
     "type": "string",
     "description": "ID of the response."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the output item."
    },
    "output_index": {
     "type": "integer",
     "description": "Index of the output item in the response."
    },
    "content_index": {
     "type": "integer",
     "description": "Index of the content part within the item."
    },
    "part": {
     "type": "object",
     "description": "The completed content part.",
     "properties": {
      "type": {
       "type": "string",
       "enum": [
        "audio",
        "text"
       ],
       "description": "Content type. `audio` for audio responses, `text` for text responses."
      },
      "transcript": {
       "type": "string",
       "description": "Full transcript of the content part."
      }
     }
    }
   }
  },
  "example": {
   "event_id": "event_3337",
   "type": "response.content_part.done",
   "response_id": "resp_001",
   "item_id": "msg_007",
   "output_index": 0,
   "content_index": 0,
   "part": {
    "type": "audio"
   }
  },
  "observed_example": {
   "type": "response.content_part.done",
   "event_id": "0789d0be-4767-4e5c-84b9-381fcbe52bd2",
   "item_id": "3e40d600-a8bd-445f-a206-1950d2091453",
   "response_id": "5e885467-a403-43e5-8fd0-6fbbc0922035",
   "content_index": 0,
   "output_index": 0,
   "previous_item_id": null
  },
  "order_hint": 15,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.output_audio_transcript.delta",
  "description": "Streaming text transcript delta of the assistant's audio response.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.output_audio_transcript.delta`."
    },
    "response_id": {
     "type": "string",
     "description": "ID of the response."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the output item."
    },
    "output_index": {
     "type": "integer",
     "description": "Index of the output item in the response."
    },
    "content_index": {
     "type": "integer",
     "description": "Index of the content part within the item."
    },
    "delta": {
     "type": "string",
     "description": "Text transcript fragment."
    }
   }
  },
  "example": {
   "event_id": "event_4950",
   "type": "response.output_audio_transcript.delta",
   "response_id": "resp_001",
   "item_id": "msg_008",
   "delta": "Hello! I'm doing"
  },
  "observed_example": {
   "type": "response.output_audio_transcript.delta",
   "event_id": "07193536-a8be-4053-a1ba-2bdf28887953",
   "item_id": "3e40d600-a8bd-445f-a206-1950d2091453",
   "response_id": "5e885467-a403-43e5-8fd0-6fbbc0922035",
   "delta": "OK",
   "content_index": 0,
   "output_index": 0,
   "rid": "07193536-a8be-4053-a1ba-2bdf28887953",
   "start_time": 0.0,
   "previous_item_id": null
  },
  "order_hint": 12,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.output_audio_transcript.done",
  "description": "The audio transcript for this assistant turn has finished generating.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.output_audio_transcript.done`."
    },
    "response_id": {
     "type": "string",
     "description": "ID of the response."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the output item."
    },
    "output_index": {
     "type": "integer",
     "description": "Index of the output item in the response."
    },
    "content_index": {
     "type": "integer",
     "description": "Index of the content part within the item."
    },
    "transcript": {
     "type": "string",
     "description": "The complete transcript text."
    }
   }
  },
  "example": {
   "event_id": "event_5152",
   "type": "response.output_audio_transcript.done",
   "response_id": "resp_001",
   "item_id": "msg_008"
  },
  "observed_example": {
   "type": "response.output_audio_transcript.done",
   "event_id": "f7f72839-3db5-4d70-a836-581cf600b5a3",
   "item_id": "3e40d600-a8bd-445f-a206-1950d2091453",
   "transcript": "OK",
   "response_id": "5e885467-a403-43e5-8fd0-6fbbc0922035",
   "content_index": 0,
   "output_index": 0,
   "previous_item_id": null
  },
  "order_hint": 14,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.output_audio.delta",
  "description": "Streaming base64-encoded audio delta of the assistant's response.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.output_audio.delta`."
    },
    "response_id": {
     "type": "string",
     "description": "ID of the response."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the output item."
    },
    "output_index": {
     "type": "integer",
     "description": "Index of the output item in the response."
    },
    "content_index": {
     "type": "integer",
     "description": "Index of the content part within the item."
    },
    "delta": {
     "type": "string",
     "description": "Base64-encoded audio data chunk."
    }
   }
  },
  "example": {
   "event_id": "event_4950",
   "type": "response.output_audio.delta",
   "response_id": "resp_001",
   "item_id": "msg_008",
   "output_index": 0,
   "content_index": 0,
   "delta": "<Base64EncodedAudioDelta>"
  },
  "observed_example": {
   "type": "response.output_audio.delta",
   "event_id": "ea786f23-5a63-4521-a002-a86946920278",
   "item_id": "3e40d600-a8bd-445f-a206-1950d2091453",
   "response_id": "5e885467-a403-43e5-8fd0-6fbbc0922035",
   "delta": "<23488 base64 chars>",
   "content_index": 0,
   "output_index": 0,
   "rid": "07193536-a8be-4053-a1ba-2bdf28887953",
   "latency": "0.49",
   "audio_duration_ms": 550,
   "ts": 1789789364541,
   "previous_item_id": null
  },
  "order_hint": 11,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.output_audio.done",
  "description": "Audio generation for this assistant turn has finished.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.output_audio.done`."
    },
    "response_id": {
     "type": "string",
     "description": "ID of the response."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the output item."
    },
    "output_index": {
     "type": "integer",
     "description": "Index of the output item in the response."
    },
    "content_index": {
     "type": "integer",
     "description": "Index of the content part within the item."
    }
   }
  },
  "example": {
   "event_id": "event_5152",
   "type": "response.output_audio.done",
   "response_id": "resp_001",
   "item_id": "msg_008"
  },
  "observed_example": {
   "type": "response.output_audio.done",
   "event_id": "94418224-42e5-4422-b401-2c2e04e2ec44",
   "item_id": "3e40d600-a8bd-445f-a206-1950d2091453",
   "response_id": "5e885467-a403-43e5-8fd0-6fbbc0922035",
   "content_index": 0,
   "output_index": 0,
   "previous_item_id": null
  },
  "order_hint": 13,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.text.delta",
  "description": "Text-mode output delta (when using text modality).",
  "schema": {
   "type": "object",
   "required": [
    "type",
    "response_id",
    "item_id",
    "delta"
   ],
   "properties": {
    "type": {
     "type": "string",
     "description": "Always `response.text.delta`.",
     "enum": [
      "response.text.delta"
     ]
    },
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "response_id": {
     "type": "string",
     "description": "The response ID."
    },
    "item_id": {
     "type": "string",
     "description": "The item ID."
    },
    "output_index": {
     "type": "integer",
     "description": "Index of the output item."
    },
    "content_index": {
     "type": "integer",
     "description": "Index of the content part."
    },
    "delta": {
     "type": "string",
     "description": "The text delta."
    }
   }
  },
  "example": {
   "type": "response.text.delta",
   "event_id": "event_4950",
   "response_id": "resp_001",
   "item_id": "msg_008",
   "output_index": 0,
   "content_index": 0,
   "delta": "Text response..."
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.output_text.delta",
  "description": "Text-mode output delta using the OpenAI GA event name. Functionally identical to `response.text.delta`. Clients should handle both event names for maximum compatibility.",
  "schema": {
   "type": "object",
   "required": [
    "type",
    "response_id",
    "item_id",
    "delta"
   ],
   "properties": {
    "type": {
     "type": "string",
     "description": "Always `response.output_text.delta`.",
     "enum": [
      "response.output_text.delta"
     ]
    },
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "response_id": {
     "type": "string",
     "description": "The response ID."
    },
    "item_id": {
     "type": "string",
     "description": "The item ID."
    },
    "output_index": {
     "type": "integer",
     "description": "Index of the output item."
    },
    "content_index": {
     "type": "integer",
     "description": "Index of the content part."
    },
    "delta": {
     "type": "string",
     "description": "The text delta."
    }
   }
  },
  "example": {
   "type": "response.output_text.delta",
   "event_id": "event_4951",
   "response_id": "resp_001",
   "item_id": "msg_008",
   "output_index": 0,
   "content_index": 0,
   "delta": "Text response..."
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.function_call_arguments.delta",
  "description": "Streaming function call arguments.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.function_call_arguments.delta`."
    },
    "response_id": {
     "type": "string",
     "description": "ID of the response."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the function call item."
    },
    "output_index": {
     "type": "integer",
     "description": "Index of the output item in the response."
    },
    "call_id": {
     "type": "string",
     "description": "Unique identifier for this function call. Use in `conversation.item.create` with `function_call_output`."
    },
    "delta": {
     "type": "string",
     "description": "Partial JSON arguments string."
    }
   }
  },
  "example": {
   "event_id": "event_fc00",
   "type": "response.function_call_arguments.delta",
   "response_id": "resp_001",
   "item_id": "msg_009",
   "output_index": 0,
   "call_id": "call_001",
   "delta": "{\"location\":"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.function_call_arguments.done",
  "description": "A function call has been triggered with complete arguments. Your code should execute the function and return results via `conversation.item.create` with type `function_call_output`.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.function_call_arguments.done`."
    },
    "response_id": {
     "type": "string",
     "description": "ID of the response."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the function call item."
    },
    "output_index": {
     "type": "integer",
     "description": "Index of the output item in the response."
    },
    "call_id": {
     "type": "string",
     "description": "Unique ID for this function call. Pass this as `call_id` in the `conversation.item.create` event with type `function_call_output`."
    },
    "name": {
     "type": "string",
     "description": "Name of the function to call."
    },
    "arguments": {
     "type": "string",
     "description": "JSON string of the function arguments."
    }
   }
  },
  "example": {
   "event_id": "event_fc01",
   "type": "response.function_call_arguments.done",
   "response_id": "resp_001",
   "item_id": "msg_009",
   "output_index": 0,
   "call_id": "call_001",
   "name": "get_weather",
   "arguments": "{\"location\": \"San Francisco\"}"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "mcp_list_tools.in_progress",
  "description": "MCP tool discovery has started.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `mcp_list_tools.in_progress`."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the MCP list tools item."
    }
   }
  },
  "example": {
   "event_id": "event_mcp01",
   "type": "mcp_list_tools.in_progress",
   "item_id": "item_456"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "mcp_list_tools.completed",
  "description": "MCP tool discovery succeeded.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `mcp_list_tools.completed`."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the MCP list tools item."
    }
   }
  },
  "example": {
   "event_id": "event_mcp02",
   "type": "mcp_list_tools.completed",
   "item_id": "item_456"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "mcp_list_tools.failed",
  "description": "MCP tool discovery failed.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `mcp_list_tools.failed`."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the MCP list tools item."
    },
    "error": {
     "type": "object",
     "description": "Error details.",
     "properties": {
      "type": {
       "type": "string",
       "description": "Error type, e.g., `connection_error`."
      },
      "message": {
       "type": "string",
       "description": "Human-readable error message."
      }
     }
    }
   }
  },
  "example": {
   "event_id": "event_mcp03",
   "type": "mcp_list_tools.failed",
   "item_id": "item_456",
   "error": {
    "type": "connection_error",
    "message": "Failed to connect to MCP server"
   }
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.mcp_call_arguments.delta",
  "description": "MCP call arguments streaming.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.mcp_call_arguments.delta`."
    },
    "response_id": {
     "type": "string",
     "description": "ID of the response."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the MCP call item."
    },
    "call_id": {
     "type": "string",
     "description": "Unique identifier for this MCP call."
    },
    "delta": {
     "type": "string",
     "description": "Partial JSON arguments string."
    }
   }
  },
  "example": {
   "event_id": "event_mcp10",
   "type": "response.mcp_call_arguments.delta",
   "response_id": "resp_001",
   "item_id": "item_789",
   "call_id": "call_001",
   "delta": "{\"query\":"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.mcp_call_arguments.done",
  "description": "MCP call arguments finalized.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.mcp_call_arguments.done`."
    },
    "response_id": {
     "type": "string",
     "description": "ID of the response."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the MCP call item."
    },
    "call_id": {
     "type": "string",
     "description": "Unique identifier for this MCP call."
    },
    "name": {
     "type": "string",
     "description": "Name of the MCP tool to call."
    },
    "arguments": {
     "type": "string",
     "description": "JSON string of the tool arguments."
    }
   }
  },
  "example": {
   "event_id": "event_mcp11",
   "type": "response.mcp_call_arguments.done",
   "response_id": "resp_001",
   "item_id": "item_789",
   "call_id": "call_001",
   "name": "search_documents",
   "arguments": "{\"query\": \"quarterly report\"}"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.mcp_call.in_progress",
  "description": "MCP server HTTP call starting.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.mcp_call.in_progress`."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the MCP call item."
    },
    "output_index": {
     "type": "integer",
     "description": "Index of the output item in the response."
    }
   }
  },
  "example": {
   "event_id": "event_mcp12",
   "type": "response.mcp_call.in_progress",
   "item_id": "item_789",
   "output_index": 0
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.mcp_call.completed",
  "description": "MCP tool execution succeeded.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.mcp_call.completed`."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the MCP call item."
    },
    "output_index": {
     "type": "integer",
     "description": "Index of the output item in the response."
    }
   }
  },
  "example": {
   "event_id": "event_mcp13",
   "type": "response.mcp_call.completed",
   "item_id": "item_789",
   "output_index": 0
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.mcp_call.failed",
  "description": "MCP tool execution failed.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.mcp_call.failed`."
    },
    "item_id": {
     "type": "string",
     "description": "ID of the MCP call item."
    },
    "output_index": {
     "type": "integer",
     "description": "Index of the output item in the response."
    },
    "error": {
     "type": "object",
     "description": "Error details.",
     "properties": {
      "type": {
       "type": "string",
       "description": "Error type, e.g., `tool_execution_error`."
      },
      "message": {
       "type": "string",
       "description": "Human-readable error message."
      }
     }
    }
   }
  },
  "example": {
   "event_id": "event_mcp14",
   "type": "response.mcp_call.failed",
   "item_id": "item_789",
   "output_index": 0,
   "error": {
    "type": "tool_execution_error",
    "message": "Tool timed out"
   }
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.done",
  "description": "The assistant's response is completed. Sent after all audio and transcript deltas. Ready for the client to add a new conversation item.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `response.done`."
    },
    "response": {
     "type": "object",
     "description": "The completed response object.",
     "properties": {
      "id": {
       "type": "string",
       "description": "Unique response identifier."
      },
      "object": {
       "type": "string",
       "enum": [
        "realtime.response"
       ],
       "description": "Always `realtime.response`."
      },
      "status": {
       "type": "string",
       "enum": [
        "completed",
        "cancelled",
        "incomplete"
       ],
       "description": "Final status of the response. `completed` on success, `cancelled` if interrupted, `incomplete` if cut short."
      },
      "usage": {
       "type": "object",
       "description": "Token usage statistics for the response.",
       "properties": {
        "input_tokens": {
         "type": "integer",
         "description": "Total input tokens consumed."
        },
        "output_tokens": {
         "type": "integer",
         "description": "Total output tokens generated."
        },
        "total_tokens": {
         "type": "integer",
         "description": "Sum of input and output tokens."
        }
       }
      },
      "metadata": {
       "type": [
        "object",
        "null"
       ],
       "description": "Developer-provided key-value pairs from `response.create`, echoed verbatim — including when the response was cancelled or interrupted. `null` for responses not triggered by a client `response.create` (e.g. automatic responses in server-side VAD mode)."
      }
     }
    }
   }
  },
  "example": {
   "event_id": "event_3132",
   "type": "response.done",
   "response": {
    "id": "resp_001",
    "object": "realtime.response",
    "status": "completed",
    "metadata": {
     "my_trigger_id": "btn-checkout-42"
    }
   }
  },
  "observed_example": {
   "type": "response.done",
   "event_id": "39c080da-c9b2-44d7-928b-0c7fb3d4269e",
   "response": {
    "id": "5e885467-a403-43e5-8fd0-6fbbc0922035",
    "object": "realtime.response",
    "output": [
     {
      "id": "3e40d600-a8bd-445f-a206-1950d2091453",
      "object": "realtime.item",
      "type": "message",
      "status": "completed",
      "role": "assistant",
      "content": [
       {
        "type": "audio",
        "transcript": "OK"
       }
      ],
      "replayed": false
     }
    ],
    "status": "completed",
    "status_details": "unimplemented",
    "usage": {}
   },
   "response_id": "5e885467-a403-43e5-8fd0-6fbbc0922035",
   "usage": {
    "input_tokens": 4,
    "input_token_details": {
     "text_tokens": 4,
     "audio_tokens": 0,
     "grok_tokens": 0
    },
    "output_tokens": 37,
    "output_token_details": {
     "text_tokens": 1,
     "audio_tokens": 36,
     "grok_tokens": 0
    },
    "total_tokens": 41,
    "output_audio_seconds": 0.71,
    "billable_audio_seconds": 1
   },
   "previous_item_id": null
  },
  "order_hint": 17,
  "status": [
   "DOCUMENTED",
   "LIVE_VERIFIED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "error",
  "description": "Sent when an error occurs. Contains error code and message. Most errors are recoverable and the session stays open.",
  "schema": {
   "type": "object",
   "properties": {
    "event_id": {
     "type": "string",
     "description": "Unique event identifier."
    },
    "type": {
     "type": "string",
     "description": "Always `error`."
    },
    "error": {
     "type": "object",
     "description": "Error details.",
     "properties": {
      "type": {
       "type": "string",
       "enum": [
        "invalid_request_error",
        "invalid_event",
        "internal_error",
        "timeout",
        "max_duration"
       ],
       "description": "Error type. `invalid_request_error` for malformed requests, `invalid_event` for unsupported event types, `internal_error` for server failures, `timeout` for inactivity timeout, `max_duration` for exceeding maximum conversation duration."
      },
      "code": {
       "type": "string",
       "description": "Error code string (same as type)."
      },
      "message": {
       "type": "string",
       "description": "Human-readable error message."
      },
      "param": {
       "type": "string",
       "description": "Parameter that caused the error, if applicable."
      },
      "event_id": {
       "type": "string",
       "description": "ID of the client event that caused the error, if applicable."
      }
     }
    }
   }
  },
  "example": {
   "event_id": "event_err01",
   "type": "error",
   "error": {
    "type": "invalid_request_error",
    "code": "invalid_audio_format",
    "message": "Audio format not supported. Use audio/pcm, audio/pcmu, or audio/pcma."
   }
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/voice-realtime.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "tts",
  "direction": "client→server",
  "event": "text.delta",
  "description": "Send a chunk of text to be synthesized. Text is processed incrementally — audio generation begins as soon as enough text is buffered. Individual deltas are capped at 60,000 characters.",
  "schema": {
   "type": "object",
   "required": [
    "type",
    "delta"
   ],
   "properties": {
    "type": {
     "type": "string",
     "description": "Must be `text.delta`."
    },
    "delta": {
     "type": "string",
     "description": "Text chunk to synthesize. Supports speech tags like `[laugh]`, `[pause]`, `[whisper]`."
    }
   }
  },
  "example": {
   "type": "text.delta",
   "delta": "Hello! Welcome to streaming text to speech. "
  },
  "order_hint": 1,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/tts-streaming.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "tts",
  "direction": "client→server",
  "event": "text.done",
  "description": "Signal that all text for this utterance has been sent. The server will finish generating audio and send `audio.done`. After receiving `audio.done`, you can start a new utterance with another `text.delta`.",
  "schema": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "description": "Must be `text.done`."
    }
   }
  },
  "example": {
   "type": "text.done"
  },
  "order_hint": 3,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/tts-streaming.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "tts",
  "direction": "server→client",
  "event": "audio.delta",
  "description": "A chunk of base64-encoded audio data. Decode and append to your audio buffer or pipe directly to playback. The format matches the `codec` and `sample_rate` specified in the query parameters. When the connection was opened with `with_timestamps=true`, the event also carries `audio_timestamps` and `audio_duration` for the characters that fall inside this chunk.",
  "schema": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "description": "Always `audio.delta`."
    },
    "delta": {
     "type": "string",
     "description": "Base64-encoded audio data chunk."
    },
    "audio_timestamps": {
     "type": "object",
     "description": "Per-character forced-alignment timings for this chunk. Present only when the connection was opened with `with_timestamps=true`. Times are session-relative seconds, so they are directly comparable across chunks within an utterance.",
     "properties": {
      "graph_chars": {
       "type": "array",
       "description": "Each character covered by this audio chunk, in order. Includes spaces, punctuation, and any speech tag characters from the original input.",
       "items": {
        "type": "string"
       }
      },
      "graph_times": {
       "type": "array",
       "description": "Parallel array of `[start, end]` seconds for each entry in `graph_chars`.",
       "items": {
        "type": "array",
        "items": {
         "type": "number",
         "format": "double"
        },
        "minItems": 2,
        "maxItems": 2
       }
      }
     }
    },
    "audio_duration": {
     "type": "number",
     "format": "double",
     "description": "Duration of this audio chunk in seconds. Present only when the connection was opened with `with_timestamps=true`."
    }
   }
  },
  "example": {
   "type": "audio.delta",
   "delta": "<Base64EncodedAudioData>",
   "audio_timestamps": {
    "graph_chars": [
     "H",
     "e",
     "l",
     "l",
     "o"
    ],
    "graph_times": [
     [
      0.0,
      0.06
     ],
     [
      0.06,
      0.12
     ],
     [
      0.12,
      0.18
     ],
     [
      0.18,
      0.24
     ],
     [
      0.24,
      0.34
     ]
    ]
   },
   "audio_duration": 0.34
  },
  "order_hint": 4,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/tts-streaming.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "tts",
  "direction": "server→client",
  "event": "audio.done",
  "description": "Audio generation for this utterance is complete. The connection remains open for multi-utterance — send another `text.delta` to start a new synthesis, or close the connection.",
  "schema": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "description": "Always `audio.done`."
    },
    "trace_id": {
     "type": "string",
     "description": "Unique trace identifier for this utterance. Useful for debugging."
    }
   }
  },
  "example": {
   "type": "audio.done",
   "trace_id": "550e8400-e29b-41d4-a716-446655440000"
  },
  "order_hint": 7,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/tts-streaming.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "tts",
  "direction": "server→client",
  "event": "error",
  "description": "An error occurred during synthesis. The connection may be closed after this message.",
  "schema": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "description": "Always `error`."
    },
    "message": {
     "type": "string",
     "description": "Human-readable error description."
    }
   }
  },
  "example": {
   "type": "error",
   "message": "TTS failed: internal error"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/tts-streaming.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "stt",
  "direction": "client→server",
  "event": "Binary frame (audio)",
  "description": "Send raw audio as binary WebSocket frames in the encoding specified by the `encoding` query parameter. Audio should be streamed in real-time-paced chunks (e.g. 100 ms at a time). No base64 encoding — send raw bytes directly. With `encoding=opus`, each binary frame must contain exactly one raw Opus packet — never concatenate packets or split one across frames. An undecodable frame sends an `error` event and closes the session.",
  "schema": {
   "type": "string",
   "format": "binary",
   "description": "Raw audio bytes in the specified encoding (pcm, mulaw, alaw, or opus)."
  },
  "example": "(raw binary audio data)",
  "order_hint": 2,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/stt-streaming.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "stt",
  "direction": "client→server",
  "event": "finalize",
  "description": "Force the current utterance to finalize as `speech_final` immediately, without waiting for VAD endpointing or Smart Turn. The session stays open so you can continue streaming audio. Accepts `finalize` or `Finalize` as the type value. When `multichannel=true`, optional `channel` (0-based) limits the finalize to that channel; omit `channel` to finalize every channel.",
  "schema": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "enum": [
      "finalize",
      "Finalize"
     ],
     "description": "Must be `finalize` or `Finalize`."
    },
    "channel": {
     "type": "integer",
     "minimum": 0,
     "description": "Optional 0-based channel index. Only meaningful when `multichannel=true`. When omitted, all channels are finalized."
    }
   }
  },
  "example": {
   "type": "Finalize",
   "channel": 0
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/stt-streaming.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "stt",
  "direction": "client→server",
  "event": "audio.done",
  "description": "Signal that all audio has been sent. The server flushes any remaining buffered audio, emits final transcript events, and sends a `transcript.done` event. The connection closes after `transcript.done`.",
  "schema": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "audio.done",
     "description": "Must be `audio.done`."
    }
   }
  },
  "example": {
   "type": "audio.done"
  },
  "order_hint": 9,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/stt-streaming.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "stt",
  "direction": "server→client",
  "event": "transcript.created",
  "description": "Sent immediately after the WebSocket connection is established and the server is ready to receive audio. **Wait for this event before sending audio** — the server needs to initialize its ASR backend.",
  "schema": {
   "type": "object",
   "required": [
    "type",
    "id"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "transcript.created",
     "description": "Always `transcript.created`."
    },
    "id": {
     "type": "string",
     "description": "Unique session identifier (UUID)."
    }
   }
  },
  "example": {
   "type": "transcript.created",
   "id": "83f2f6fd-1cd1-4747-bc52-cebddc961c32"
  },
  "order_hint": 1,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/stt-streaming.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "stt",
  "direction": "server→client",
  "event": "transcript.partial",
  "description": "A transcript result for a portion of the audio stream. Two boolean fields convey state: interim (`is_final=false`) means text may still change, chunk final (`is_final=true`, `speech_final=false`) means the chunk is locked, and utterance final (`is_final=true`, `speech_final=true`) means the speaker stopped talking.",
  "schema": {
   "type": "object",
   "required": [
    "type",
    "text",
    "words",
    "is_final",
    "speech_final",
    "start",
    "duration"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "transcript.partial",
     "description": "Always `transcript.partial`."
    },
    "text": {
     "type": "string",
     "description": "Transcript text for this chunk."
    },
    "words": {
     "type": "array",
     "description": "Word-level details with timestamps and confidence scores.",
     "items": {
      "type": "object",
      "properties": {
       "text": {
        "type": "string",
        "description": "The word text."
       },
       "start": {
        "type": "number",
        "description": "Word start time in seconds (2 d.p.)."
       },
       "end": {
        "type": "number",
        "description": "Word end time in seconds (2 d.p.)."
       },
       "confidence": {
        "type": "number",
        "description": "Confidence score (0.0–1.0). Omitted when 0."
       },
       "speaker": {
        "type": "integer",
        "description": "Speaker index (0-based). Only present when `diarize=true`."
       }
      }
     }
    },
    "is_final": {
     "type": "boolean",
     "description": "Chunk-level finality. `false` = partial (text may change). `true` = chunk fully transcribed (text locked)."
    },
    "speech_final": {
     "type": "boolean",
     "description": "Utterance-level finality. `true` = speaker stopped talking (VAD endpointing). Only meaningful when `is_final=true`."
    },
    "start": {
     "type": "number",
     "description": "Start position in the audio stream (seconds from stream start, 2 d.p.)."
    },
    "duration": {
     "type": "number",
     "description": "Duration of audio covered by this result (seconds, 2 d.p.)."
    },
    "channel_index": {
     "type": "integer",
     "description": "Channel index. Only present when `multichannel=true`."
    },
    "end_of_turn_confidence": {
     "type": "number",
     "description": "End-of-turn confidence from the Smart Turn model (0.0–1.0). Only present when `smart_turn` is enabled. Higher values indicate the speaker has likely finished their thought. During active speech the value is `0.0`; at silence boundaries the model evaluates accumulated audio and publishes a confidence score."
    }
   }
  },
  "example": {
   "type": "transcript.partial",
   "text": "The balance is $167,983.15.",
   "words": [
    {
     "text": "The",
     "start": 0.24,
     "end": 0.48,
     "confidence": 0.95
    },
    {
     "text": "balance",
     "start": 0.48,
     "end": 0.96,
     "confidence": 0.92
    },
    {
     "text": "is",
     "start": 0.96,
     "end": 1.12,
     "confidence": 0.98
    },
    {
     "text": "$167,983.15.",
     "start": 1.12,
     "end": 3.2,
     "confidence": 0.89
    }
   ],
   "is_final": true,
   "speech_final": false,
   "start": 0.0,
   "duration": 3.2
  },
  "order_hint": 4,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/stt-streaming.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "stt",
  "direction": "server→client",
  "event": "transcript.done",
  "description": "Final transcript after `audio.done`. `duration` always present. One per channel when `multichannel=true`. Connection closes after this event.",
  "schema": {
   "type": "object",
   "required": [
    "type",
    "text",
    "words",
    "duration"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "transcript.done",
     "description": "Always `transcript.done`."
    },
    "text": {
     "type": "string",
     "description": "Final transcript text."
    },
    "words": {
     "type": "array",
     "description": "Word-level details for the final transcript.",
     "items": {
      "type": "object",
      "properties": {
       "text": {
        "type": "string"
       },
       "start": {
        "type": "number"
       },
       "end": {
        "type": "number"
       },
       "confidence": {
        "type": "number"
       },
       "speaker": {
        "type": "integer",
        "description": "Speaker index (0-based). Only present when `diarize=true`."
       }
      }
     }
    },
    "duration": {
     "type": "number",
     "description": "Total audio duration processed (seconds, 2 d.p.)."
    },
    "channel_index": {
     "type": "integer",
     "description": "Channel index. Only present when `multichannel=true`."
    }
   }
  },
  "example": {
   "type": "transcript.done",
   "text": "",
   "words": [],
   "duration": 6.43
  },
  "order_hint": 10,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/stt-streaming.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "stt",
  "direction": "server→client",
  "event": "error",
  "description": "An error occurred during the session. Most errors (pipeline failures, stream timeouts, undecodable audio frames) close the connection. Only client message parse errors keep the connection open.",
  "schema": {
   "type": "object",
   "required": [
    "type",
    "message"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "error",
     "description": "Always `error`."
    },
    "message": {
     "type": "string",
     "description": "Human-readable error description."
    }
   }
  },
  "example": {
   "type": "error",
   "message": "Invalid message: expected {\"type\": \"audio.done\"}"
  },
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/stt-streaming.ws.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "ping",
  "description": "Keep-alive / clock event sent right after conversation.created (and presumably periodically). Not in the official ws.json schema.",
  "schema": {
   "type": "object",
   "properties": {
    "type": "ping",
    "event_id": "string (uuid)",
    "timestamp": "integer (unix ms)",
    "previous_item_id": "string|null"
   }
  },
  "example": {
   "type": "ping",
   "event_id": "9434a424-1d6a-4634-8b85-081d51897b9f",
   "timestamp": 1789789363648,
   "previous_item_id": null
  },
  "order_hint": null,
  "status": [
   "LIVE_DISCOVERED"
  ],
  "source": "tmp-live/xai-media/voice-ws-session.json",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client",
  "event": "response.audio.delta",
  "description": "Legacy alias of response.output_audio.delta mentioned in the Speech-to-Speech guide (audio transport table); not emitted in the live probe (only response.output_audio.delta was).",
  "schema": null,
  "example": null,
  "order_hint": null,
  "status": [
   "DOCUMENTED",
   "UNVERIFIED"
  ],
  "source": "https://docs.x.ai/developers/model-capabilities/audio/speech-to-speech",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 },
 {
  "provider": "xai",
  "api": "realtime",
  "direction": "server→client (webhook)",
  "event": "realtime.call.incoming",
  "description": "Signed webhook (Standard Webhooks v1: webhook-id, webhook-timestamp, webhook-signature headers, HMAC-SHA256 with dispatch_signing_secret) POSTed to the phone number's webhook URL when a SIP call arrives; `data.call_id` is then used as ?call_id= on wss://api.x.ai/v1/realtime.",
  "schema": {
   "type": "object",
   "properties": {
    "type": "realtime.call.incoming",
    "data": {
     "call_id": "string",
     "…": "caller/callee SIP headers (see SIP guide)"
    }
   }
  },
  "example": null,
  "order_hint": null,
  "status": [
   "DOCUMENTED"
  ],
  "source": "https://docs.x.ai/developers/model-capabilities/audio/speech-to-speech/sip",
  "_fragment": "generated/fragments/streaming-events/xai-voice.json"
 }
]