openapi: 3.2.0 info: title: OpenAI Live API description: The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details. version: 2.3.0 termsOfService: https://openai.com/policies/terms-of-use contact: name: OpenAI Support url: https://help.openai.com/ license: name: MIT identifier: MIT servers: - url: https://api.openai.com/v1 security: - ApiKeyAuth: [] tags: - name: Live paths: /live/sessions: post: operationId: create-live summary: Create session description: Create a Live WebRTC session. Start with the Live prompting guide. tags: - Live requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LiveCreateRequest' responses: '201': description: Live session created with a WebRTC answer. content: application/json: schema: $ref: '#/components/schemas/LiveCreateResponse' example: session: id: live_123 transport: type: webrtc sdp: x-oaiMeta: group: live returns: Returns 201 Created with the session identifier in session.id and SDP answer in transport.sdp. examples: request: curl: "curl https://api.openai.com/v1/live/sessions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"session\":{\"model\":\"gpt-live-1\",\"instructions\":\"Be concise. Ask for clarification when needed.\"},\"transport\":{\"type\":\"webrtc\",\"sdp\":\"\"}}'" /live/sessions/{session_id}/accept: post: operationId: accept-live-session summary: Accept call description: Accept an incoming SIP call. Supply session with type live, the model, and startup configuration. Before accepting calls, follow the Live prompting guide to write frontend conversation instructions and a separate backend prompt. SIP media format is negotiated; omit audio.format. tags: - Live parameters: - in: path name: session_id required: true description: Opaque Live session identifier from the creation response or incoming-call webhook. Preserve the returned value unchanged, including its prefix. schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LiveCallAcceptRequest' responses: '200': description: Session accept request accepted. x-oaiMeta: group: live-sessions returns: Returns 200 OK when the control request succeeds. /live/sessions/{session_id}/fork: post: operationId: fork-live-session summary: Fork session description: Fork a stored Live session onto a new WebRTC connection. tags: - Live parameters: - in: path name: session_id required: true schema: type: string description: The ID of the stored Live session to fork. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LiveForkRequest' responses: '201': description: Forked Live session created with a WebRTC answer. content: application/json: schema: $ref: '#/components/schemas/LiveCreateResponse' x-oaiMeta: group: live returns: The new session identifier in session.id and SDP answer in transport.sdp. examples: request: curl: "curl https://api.openai.com/v1/live/sessions/live_123/fork \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"session\":{},\"transport\":{\"type\":\"webrtc\",\"sdp\":\"\"}}'" /live/sessions/{session_id}/hangup: post: operationId: hangup-live-session summary: Hang up session description: End a SIP call identified by session_id. tags: - Live parameters: - in: path name: session_id required: true description: Opaque Live session identifier from the creation response or incoming-call webhook. Preserve the returned value unchanged, including its prefix. schema: type: string responses: '200': description: Session hangup request accepted. x-oaiMeta: group: live-sessions returns: Returns 200 OK when the control request succeeds. /live/sessions/{session_id}/refer: post: operationId: refer-live-session summary: Transfer call description: Transfer a SIP call to another destination. Supply a nonblank target_uri for the SIP Refer-To header. tags: - Live parameters: - in: path name: session_id required: true description: Opaque Live session identifier from the creation response or incoming-call webhook. Preserve the returned value unchanged, including its prefix. schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LiveCallReferRequest' responses: '200': description: Session refer request accepted. x-oaiMeta: group: live-sessions returns: Returns 200 OK when the control request succeeds. /live/sessions/{session_id}/reject: post: operationId: reject-live-session summary: Reject call description: Reject an incoming SIP call. Send a required SIP rejection status_code between 300 and 699. tags: - Live parameters: - in: path name: session_id required: true description: Opaque Live session identifier from the creation response or incoming-call webhook. Preserve the returned value unchanged, including its prefix. schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LiveCallRejectRequest' responses: '200': description: Session reject request accepted. x-oaiMeta: group: live-sessions returns: Returns 200 OK when the control request succeeds. /live/sessions/{session_id}/content: get: tags: - Live summary: Download recording description: Get Live session content operationId: download-live-recording parameters: - name: session_id in: path description: The ID of the stored Live session to download. Use the session ID returned when the session started with storage enabled. required: true schema: description: The ID of the stored Live session to download. Use the session ID returned when the session started with storage enabled. type: string pattern: ^live_[A-Za-z0-9_-]{1,128}$ responses: '200': description: Stored session recording. Input audio is in the left channel and output audio is in the right channel. content: audio/wav: schema: description: The Live session recording as a stereo WAV file, with input audio in the left channel and output audio in the right channel. type: string format: binary x-oaiMeta: group: live returns: The stored session recording as binary stereo WAV audio. components: schemas: delegation: anyOf: - 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. discriminator: propertyName: type oneOf: - $ref: '#/components/schemas/LiveClientDelegationParam' - $ref: '#/components/schemas/LiveResponsesDelegationParam' - type: 'null' LiveWebSearchToolInputParam: description: A web search tool available to the Live session’s Responses backend. type: object properties: type: description: The tool type. Always `web_search`. default: web_search x-stainless-const: true type: string enum: - web_search required: - type target_uri: type: string description: 'URI that should appear in the SIP Refer-To header. Supports values like `tel:+14155550123` or `sip:agent@example.com`.' example: tel:+14155550123 LiveClientConfigParam: description: Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session. Trusted sideband connections are unaffected. type: object properties: data_channel: description: Client and server event permissions for the WebRTC frontend data channel. $ref: '#/components/schemas/LiveDataChannelConfigParam' required: - data_channel LiveInitialSessionAudioOutputParam: description: Settings for speech generated by the Live model. Choose the voice before starting the session. type: object properties: voice: description: The voice used for Live speech, as a built-in voice name or a custom voice object containing its ID. Defaults to `marin` and cannot change after startup. oneOf: - anyOf: - type: string - type: string enum: - alloy - ash - ballad - beacon - bossa - cedar - cinder - coral - delta - echo - gleam - marin - meridian - quartz - ripple - sage - shimmer - stone - tempo - verse - vesper - willow - $ref: '#/components/schemas/LiveCustomVoiceParam' required: [] LiveCallAcceptRequest: type: object description: Accept an incoming SIP call with Live startup configuration. properties: session: $ref: '#/components/schemas/LiveCallAcceptSession' description: Model and startup configuration for the Live session that answers the incoming SIP call. required: - session additionalProperties: false LiveReasoningEffort: type: string enum: - none - minimal - low - medium - high - xhigh LiveCreateRequest: type: object description: Create a Live WebRTC session with JSON session configuration and an SDP offer. Follow the [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting) before choosing frontend and backend instructions. The request starts the session; do not send session.start on the data channel. properties: session: $ref: '#/components/schemas/LiveMediaSessionCreateParams' description: Startup configuration for the Live session. transport: $ref: '#/components/schemas/LiveWebRTCTransport' description: WebRTC transport with the browser's SDP offer. required: - session - transport additionalProperties: false LiveForkRequest: type: object description: Fork a stored Live session onto a new WebRTC connection. Omit session or send an empty object to inherit its configuration. properties: session: $ref: '#/components/schemas/LiveMediaSessionForkParams' description: Optional configuration overrides for the new Live session. Omit this object or send an empty object to inherit the stored session's settings. transport: $ref: '#/components/schemas/LiveWebRTCTransport' description: WebRTC transport with an SDP offer for the new connection to the forked session. required: - transport additionalProperties: false LiveInitialMessageStatus: type: string enum: - incomplete - completed LiveInitialInputTextContentPartParam: description: Text supplied in a developer or user message when starting a Live session. type: object properties: type: description: The text content type. Always `input_text`. default: input_text x-stainless-const: true type: string enum: - input_text text: description: The message text to include in the Live session’s initial conversation history. type: string required: - text LiveCallReferRequest: type: object description: Parameters used to transfer a Live SIP call to another destination. properties: target_uri: $ref: '#/components/schemas/target_uri' minLength: 1 pattern: \S description: Nonblank URI for the SIP Refer-To header, such as tel:+14155550123 or sip:agent@example.com. required: - target_uri additionalProperties: false LiveDelegationReasoningInputParam: description: Reasoning options for Responses requests made on behalf of the Live session. type: object properties: effort: anyOf: - description: How much reasoning effort the delegated Responses model should use. Supported values depend on the backend model. $ref: '#/components/schemas/LiveReasoningEffort' - type: 'null' summary: anyOf: - description: The reasoning summary to request from the delegated Responses model, when supported. $ref: '#/components/schemas/LiveReasoningSummary' - type: 'null' required: [] input: 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. type: array items: $ref: '#/components/schemas/LiveInitialItem' maxItems: 128 LiveDelegationTextInputParam: description: Text generation options for the Live session’s Responses backend. type: object properties: verbosity: anyOf: - description: The amount of detail in text generated by the Responses backend. This does not configure the Live model’s spoken delivery. $ref: '#/components/schemas/LiveTextVerbosity' - type: 'null' required: [] LiveMediaSessionAudioParam: type: object description: Startup audio output configuration. WebRTC and SIP negotiate the media format; audio.format is only accepted for primary WebSockets. Voice cannot change after startup. properties: output: $ref: '#/components/schemas/LiveInitialSessionAudioOutputParam' additionalProperties: false LiveToolChoiceEnum: type: string enum: - auto - none - required LiveMCPToolChoiceParam: type: object properties: type: default: mcp x-stainless-const: true type: string enum: - mcp server_label: type: string minLength: 1 maxLength: 64 pattern: ^[a-zA-Z0-9_-]+$ name: type: string minLength: 1 maxLength: 64 pattern: ^[a-zA-Z0-9_-]+$ required: - type - server_label - name LiveResponsesServiceTier: type: string enum: - auto - default - fast_tier_temp_pilot - flex - priority - ultrafast LiveFunctionToolInputParam: description: A function tool available to the Responses backend when the Live model delegates a task. type: object properties: type: description: The tool type. Always `function`. default: function x-stainless-const: true type: string enum: - function name: description: The name the delegated Responses model uses when calling this function. type: string description: anyOf: - description: What the function does and when the delegated Responses model should call it. type: string - type: 'null' parameters: anyOf: - description: A JSON Schema object describing the arguments accepted by the function. type: object additionalProperties: {} - type: 'null' strict: anyOf: - description: Whether the delegated Responses model must follow the function’s parameter schema exactly. type: boolean - type: 'null' required: - type - name LiveResponsesDelegationParam: description: Delegate tasks to a Responses model managed by the Live session. type: object properties: type: description: The delegation owner. Always `responses` for tasks handled by the Responses API. default: responses x-stainless-const: true type: string enum: - responses responses: description: Backend model, prompt, and tools used when the Live session delegates a task to Responses. $ref: '#/components/schemas/LiveResponsesDelegationSettingsInputParam' required: - type - responses LiveMediaSessionForkParams: type: object description: Optional overrides for a stored Live session. Omitted settings are inherited. The model, voice, frontend instructions, and prior conversation come from the stored session. WebRTC negotiates its audio format; audio.format is only supported on WebSocket forks. properties: store: $ref: '#/components/schemas/properties-store' delegation: $ref: '#/components/schemas/LiveResponsesDelegationUpdateParam' client: $ref: '#/components/schemas/LiveClientConfigParam' additionalProperties: false LiveResponsesDelegationSettingsInputParam: description: Model, prompt, and tool settings for tasks delegated by the Live session to a Responses backend. type: object properties: model: description: The model used for server-owned Responses delegations. type: string instructions: anyOf: - description: Instructions for the delegated Responses model, separate from Live instructions. See [backend prompting](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt). type: string - type: 'null' max_output_tokens: anyOf: - description: Maximum number of output tokens for each delegated response. type: integer minimum: 16 - type: 'null' service_tier: anyOf: - description: Service tier for delegated Responses requests. $ref: '#/components/schemas/LiveResponsesServiceTier' - type: 'null' reasoning: anyOf: - description: Reasoning settings passed to each delegated Responses request. $ref: '#/components/schemas/LiveDelegationReasoningInputParam' - type: 'null' text: anyOf: - description: Text generation settings passed to each delegated Responses request. $ref: '#/components/schemas/LiveDelegationTextInputParam' - type: 'null' tools: description: Tools available to the Responses backend while it handles tasks delegated by the Live model. type: array items: discriminator: propertyName: type oneOf: - $ref: '#/components/schemas/LiveFunctionToolInputParam' - $ref: '#/components/schemas/LiveWebSearchToolInputParam' tool_choice: description: Controls which tool the Responses backend uses when handling a task delegated by the Live model. oneOf: - $ref: '#/components/schemas/LiveToolChoiceEnum' - $ref: '#/components/schemas/LiveFunctionToolChoiceParam' - $ref: '#/components/schemas/LiveMCPToolChoiceParam' parallel_tool_calls: anyOf: - description: Whether the delegated Responses model may request multiple tool calls in a single response. type: boolean - type: 'null' required: - model instructions: anyOf: - 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. type: string - type: 'null' LiveInitialUserMessageItemParam: description: A user message included in the initial text history of a Live session. type: object properties: id: anyOf: - description: An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation. type: string - type: 'null' type: description: The history item type. Always `message`. default: message x-stainless-const: true type: string enum: - message status: anyOf: - description: The supplied message’s status. Live uses its text as history and does not resume an incomplete message. $ref: '#/components/schemas/LiveInitialMessageStatus' - type: 'null' role: description: The author of this history message. Always `user`. default: user x-stainless-const: true type: string enum: - user content: description: The message content. Supply exactly one text part for the initial Live conversation history. type: array items: $ref: '#/components/schemas/LiveInitialInputTextContentPartParam' minItems: 1 maxItems: 1 required: - role - content store: description: Whether to store the session for later forking and recording download. Defaults to false for new sessions. type: boolean LiveReasoningSummary: type: string enum: - concise - detailed - auto LiveInitialDeveloperMessageItemParam: description: A developer message included in the initial text history of a Live session. type: object properties: id: anyOf: - description: An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation. type: string - type: 'null' type: description: The history item type. Always `message`. default: message x-stainless-const: true type: string enum: - message status: anyOf: - description: The supplied message’s status. Live uses its text as history and does not resume an incomplete message. $ref: '#/components/schemas/LiveInitialMessageStatus' - type: 'null' role: description: The author of this history message. Always `developer`. default: developer x-stainless-const: true type: string enum: - developer content: description: The message content. Supply exactly one text part for the initial Live conversation history. type: array items: $ref: '#/components/schemas/LiveInitialInputTextContentPartParam' minItems: 1 maxItems: 1 required: - role - content LiveAllowedServerEventParam: description: A Live server event selector for the WebRTC frontend data channel. example: type: session.started type: object properties: type: description: The outer Live server event type. Use 'response.event' for Responses events. type: string minLength: 1 maxLength: 256 response_event: description: The nested Responses event type. Required when type is 'response.event'; forbidden for other event types. type: string minLength: 1 maxLength: 256 required: - type additionalProperties: false x-oaiMeta: example: type: session.started LiveResponsesDelegationUpdateParam: description: Update the Responses backend for an existing Live session without changing delegation ownership. type: object properties: type: description: The delegation owner. Always `responses` for tasks handled by the Responses API. default: responses x-stainless-const: true type: string enum: - responses responses: description: Responses backend settings to update. Omitted settings keep their existing values. $ref: '#/components/schemas/LiveResponsesDelegationSettingsUpdateInputParam' required: - type LiveTextVerbosity: type: string enum: - low - medium - high LiveInitialTextContentPartParam: description: Assistant text supplied as conversation history when starting a Live session. type: object properties: type: description: The text content type. Always `text`. default: text x-stainless-const: true type: string enum: - text text: description: The message text to include in the Live session’s initial conversation history. type: string required: - text LiveCreateResponse: type: object description: The created Live session identifier and WebRTC answer. Apply transport.sdp as the peer's remote answer and wait for session.started on the data channel before sending commands. properties: session: type: object description: The newly created Live session. Use its ID for session controls and sideband connections. properties: id: type: string description: Opaque session identifier. Preserve the returned value unchanged, including its prefix. required: - id transport: $ref: '#/components/schemas/LiveWebRTCTransport' description: WebRTC transport with the SDP answer. required: - session - transport LiveDataChannelConfigParam: description: Control which Live events an untrusted WebRTC frontend can send and receive over its data channel. These restrictions do not apply to trusted sideband connections. type: object properties: allowed_client_events: description: Client event types that the frontend data channel may send. Use 'all' to allow every client event; an empty array allows none. Omission preserves the existing allow-all behavior. oneOf: - default: all x-stainless-const: true type: string enum: - all - type: array items: description: A Live client event type allowed on the frontend data channel, such as `session.input_audio.mute`. type: string minLength: 1 maxLength: 256 pattern: ^(?:error|info|[a-z][a-z0-9_-]*(?:\.[a-z0-9_-]+)+)$ maxItems: 256 allowed_server_events: description: Server events that may be sent to the frontend data channel. Use 'all' to allow every server event; an empty array allows none. Omission preserves the existing allow-all behavior. Responses events use an object with type 'response.event' and a response_event selector. oneOf: - default: all x-stainless-const: true type: string enum: - all - type: array items: $ref: '#/components/schemas/LiveAllowedServerEventParam' maxItems: 256 required: [] LiveCustomVoiceParam: type: object properties: id: type: string minLength: 1 maxLength: 128 required: - id LiveResponsesDelegationSettingsUpdateInputParam: description: Updates to the Responses backend of an existing Live session. Omitted settings retain their current values. type: object properties: model: description: The Responses backend model to use for subsequent delegated requests. Omit to keep the current backend model. type: string instructions: anyOf: - description: Instructions for the delegated Responses model, separate from Live instructions. See [backend prompting](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt). type: string - type: 'null' max_output_tokens: anyOf: - description: Maximum number of output tokens for each delegated response. type: integer minimum: 16 - type: 'null' service_tier: anyOf: - description: Service tier for delegated Responses requests. $ref: '#/components/schemas/LiveResponsesServiceTier' - type: 'null' reasoning: anyOf: - description: Reasoning settings passed to each delegated Responses request. $ref: '#/components/schemas/LiveDelegationReasoningInputParam' - type: 'null' text: anyOf: - description: Text generation settings passed to each delegated Responses request. $ref: '#/components/schemas/LiveDelegationTextInputParam' - type: 'null' tools: description: Tools available to the Responses backend while it handles tasks delegated by the Live model. type: array items: discriminator: propertyName: type oneOf: - $ref: '#/components/schemas/LiveFunctionToolInputParam' - $ref: '#/components/schemas/LiveWebSearchToolInputParam' tool_choice: description: Controls which tool the Responses backend uses when handling a task delegated by the Live model. oneOf: - $ref: '#/components/schemas/LiveToolChoiceEnum' - $ref: '#/components/schemas/LiveFunctionToolChoiceParam' - $ref: '#/components/schemas/LiveMCPToolChoiceParam' parallel_tool_calls: anyOf: - description: Whether the delegated Responses model may request multiple tool calls in a single response. type: boolean - type: 'null' required: [] LiveInitialItem: description: A developer, user, or assistant message supplied as text history before the Live session starts. discriminator: propertyName: role oneOf: - $ref: '#/components/schemas/LiveInitialDeveloperMessageItemParam' - $ref: '#/components/schemas/LiveInitialUserMessageItemParam' - $ref: '#/components/schemas/LiveInitialAssistantMessageItemParam' properties-store: description: Whether to store the forked session. Omission inherits the stored session's setting. type: boolean LiveWebRTCTransport: type: object description: WebRTC transport carrying the offer SDP in a creation request or answer SDP in its response. properties: type: type: string description: The transport used for the Live session. Always `webrtc`. enum: - webrtc x-stainless-const: true sdp: type: string minLength: 1 description: Session Description Protocol message for the WebRTC connection. required: - type - sdp additionalProperties: false LiveMediaSessionCreateParams: type: object description: Startup configuration for a Live media session. Follow the [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting) when writing frontend instructions and the backend prompt under delegation.responses.instructions. properties: model: $ref: '#/components/schemas/ModelIdsLive' instructions: $ref: '#/components/schemas/instructions' audio: $ref: '#/components/schemas/LiveMediaSessionAudioParam' description: Startup audio configuration. WebRTC and SIP negotiate their audio format on the media transport. delegation: $ref: '#/components/schemas/delegation' store: $ref: '#/components/schemas/store' input: $ref: '#/components/schemas/input' client: $ref: '#/components/schemas/LiveClientConfigParam' required: - model additionalProperties: false LiveInitialOutputTextContentPartParam: description: Assistant output text supplied as conversation history when starting a Live session. type: object properties: type: description: The text content type. Always `output_text`. default: output_text x-stainless-const: true type: string enum: - output_text text: description: The message text to include in the Live session’s initial conversation history. type: string required: - type - text LiveCallRejectRequest: type: object description: Parameters used to reject an incoming Live SIP call. properties: status_code: type: integer minimum: 300 maximum: 699 description: SIP rejection status sent to the caller. This field is required. example: 486 required: - status_code additionalProperties: false ModelIdsLive: description: The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter. example: gpt-live-1 anyOf: - type: string minLength: 1 - type: string enum: - gpt-live-1 LiveCallAcceptSession: type: object description: Startup configuration for accepting an incoming Live SIP call. Follow the [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting) when writing frontend and backend instructions. properties: model: $ref: '#/components/schemas/ModelIdsLive' description: The Live model to use for the accepted call. minLength: 1 instructions: $ref: '#/components/schemas/instructions' audio: $ref: '#/components/schemas/LiveMediaSessionAudioParam' description: Startup audio output configuration. SIP negotiates the media format; audio.format is only accepted for primary WebSockets. Voice cannot change after startup. delegation: $ref: '#/components/schemas/delegation' store: $ref: '#/components/schemas/store' input: $ref: '#/components/schemas/input' type: type: string enum: - live default: live x-stainless-const: true description: The session type. Always `live`. required: - model - type additionalProperties: false LiveClientDelegationParam: description: Delegate tasks to your application. The Live session emits delegation events that your backend handles. type: object properties: type: description: The delegation owner. Always `client` for tasks handled by your application. default: client x-stainless-const: true type: string enum: - client required: - type LiveFunctionToolChoiceParam: type: object properties: type: default: function x-stainless-const: true type: string enum: - function name: type: string minLength: 1 maxLength: 64 pattern: ^[a-zA-Z0-9_-]+$ required: - type - name LiveInitialAssistantMessageItemParam: description: An assistant message included in the initial text history of a Live session. type: object properties: id: anyOf: - description: An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation. type: string - type: 'null' type: description: The history item type. Always `message`. default: message x-stainless-const: true type: string enum: - message status: anyOf: - description: The supplied message’s status. Live uses its text as history and does not resume an incomplete message. $ref: '#/components/schemas/LiveInitialMessageStatus' - type: 'null' role: description: The author of this history message. Always `assistant`. default: assistant x-stainless-const: true type: string enum: - assistant content: description: The message content. Supply exactly one text part for the initial Live conversation history. type: array items: discriminator: propertyName: type oneOf: - $ref: '#/components/schemas/LiveInitialTextContentPartParam' - $ref: '#/components/schemas/LiveInitialOutputTextContentPartParam' x-oai-default-discriminator-value: text minItems: 1 maxItems: 1 required: - role - content securitySchemes: ApiKeyAuth: type: http scheme: bearer AdminApiKeyAuth: type: http scheme: bearer x-oaiMeta: navigationGroups: - id: responses title: Responses API - id: webhooks title: Webhooks - id: endpoints title: Platform APIs - id: vector_stores title: Vector stores - id: chatkit title: ChatKit beta: true - id: containers title: Containers - id: live title: Live (alpha) - id: realtime title: Realtime - id: chat title: Chat Completions - id: assistants title: Assistants deprecated: true - id: administration title: Administration - id: legacy title: Legacy groups: - id: responses-streaming title: Streaming events description: 'When you [create a Response](https://developers.openai.com/api/reference/resources/responses/methods/create) with `stream` set to `true`, the server will emit server-sent events to the client as the Response is generated. This section contains the events that are emitted by the server. When processing a `compaction_trigger`, `response.compaction.compacting` reports newly sampled summary output at most once every 30 seconds. It carries no summary content and does not modify the compaction output item. The existing `response.output_item.added` and `response.output_item.done` events mark that item''s lifecycle; `response.output_item.done` carries its final encrypted content. A short compaction may finish without emitting a progress event. [Learn more about streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses). ' navigationGroup: responses sections: - type: object key: ResponseCreatedEvent path: - type: object key: ResponseInProgressEvent path: - type: object key: ResponseCompletedEvent path: - type: object key: ResponseFailedEvent path: - type: object key: ResponseIncompleteEvent path: - type: object key: ResponseOutputItemAddedEvent path: - type: object key: ResponseOutputItemDoneEvent path: - type: object key: ResponseCompactionCompactingEvent path: - type: object key: ResponseContentPartAddedEvent path: - type: object key: ResponseContentPartDoneEvent path: - type: object key: ResponseTextDeltaEvent path: response/output_text/delta - type: object key: ResponseTextDoneEvent path: response/output_text/done - type: object key: ResponseRefusalDeltaEvent path: - type: object key: ResponseRefusalDoneEvent path: - type: object key: ResponseFunctionCallArgumentsDeltaEvent path: - type: object key: ResponseFunctionCallArgumentsDoneEvent path: - type: object key: ResponseFileSearchCallInProgressEvent path: - type: object key: ResponseFileSearchCallSearchingEvent path: - type: object key: ResponseFileSearchCallCompletedEvent path: - type: object key: ResponseWebSearchCallInProgressEvent path: - type: object key: ResponseWebSearchCallSearchingEvent path: - type: object key: ResponseWebSearchCallCompletedEvent path: - type: object key: ResponseReasoningSummaryPartAddedEvent path: - type: object key: ResponseReasoningSummaryPartDoneEvent path: - type: object key: ResponseReasoningSummaryTextDeltaEvent path: - type: object key: ResponseReasoningSummaryTextDoneEvent path: - type: object key: ResponseReasoningTextDeltaEvent path: - type: object key: ResponseReasoningTextDoneEvent path: - type: object key: ResponseImageGenCallCompletedEvent path: - type: object key: ResponseImageGenCallGeneratingEvent path: - type: object key: ResponseImageGenCallInProgressEvent path: - type: object key: ResponseImageGenCallPartialImageEvent path: - type: object key: ResponseMCPCallArgumentsDeltaEvent path: - type: object key: ResponseMCPCallArgumentsDoneEvent path: - type: object key: ResponseMCPCallCompletedEvent path: - type: object key: ResponseMCPCallFailedEvent path: - type: object key: ResponseMCPCallInProgressEvent path: - type: object key: ResponseMCPListToolsCompletedEvent path: - type: object key: ResponseMCPListToolsFailedEvent path: - type: object key: ResponseMCPListToolsInProgressEvent path: - type: object key: ResponseCodeInterpreterCallInProgressEvent path: - type: object key: ResponseCodeInterpreterCallInterpretingEvent path: - type: object key: ResponseCodeInterpreterCallCompletedEvent path: - type: object key: ResponseCodeInterpreterCallCodeDeltaEvent path: - type: object key: ResponseCodeInterpreterCallCodeDoneEvent path: - type: object key: ResponseOutputTextAnnotationAddedEvent path: - type: object key: ResponseQueuedEvent path: - type: object key: ResponseCustomToolCallInputDeltaEvent path: - type: object key: ResponseCustomToolCallInputDoneEvent path: - type: object key: ResponseErrorEvent path: - id: responses-websocket-client-events title: Client events description: 'Events sent by the client over a Responses API WebSocket connection. ' navigationGroup: responses sections: - type: object key: ResponsesClientEventResponseCreate path: - type: object key: ResponseSteerEvent path: - id: responses-websocket-server-events title: Server events (WebSocket only) description: 'Events emitted only over a Responses API WebSocket connection. ' navigationGroup: responses sections: - type: object key: ResponseSteerAcceptedEvent path: - type: object key: ResponseSteerPendingEvent path: - type: object key: ResponseSteerFailedEvent path: - id: responses-websocket-shared-events title: Server events description: 'These events use the same payloads over WebSocket and [HTTP streaming](https://developers.openai.com/api/reference/resources/responses/streaming-events). Compaction progress follows the same cadence and output-item lifecycle described in HTTP streaming. ' navigationGroup: responses sections: - type: object key: ResponseCreatedEvent path: - type: object key: ResponseInProgressEvent path: - type: object key: ResponseCompletedEvent path: - type: object key: ResponseFailedEvent path: - type: object key: ResponseIncompleteEvent path: - type: object key: ResponseOutputItemAddedEvent path: - type: object key: ResponseOutputItemDoneEvent path: - type: object key: ResponseCompactionCompactingEvent path: - type: object key: ResponseContentPartAddedEvent path: - type: object key: ResponseContentPartDoneEvent path: - type: object key: ResponseTextDeltaEvent path: response/output_text/delta - type: object key: ResponseTextDoneEvent path: response/output_text/done - type: object key: ResponseRefusalDeltaEvent path: - type: object key: ResponseRefusalDoneEvent path: - type: object key: ResponseFunctionCallArgumentsDeltaEvent path: - type: object key: ResponseFunctionCallArgumentsDoneEvent path: - type: object key: ResponseFileSearchCallInProgressEvent path: - type: object key: ResponseFileSearchCallSearchingEvent path: - type: object key: ResponseFileSearchCallCompletedEvent path: - type: object key: ResponseWebSearchCallInProgressEvent path: - type: object key: ResponseWebSearchCallSearchingEvent path: - type: object key: ResponseWebSearchCallCompletedEvent path: - type: object key: ResponseReasoningSummaryPartAddedEvent path: - type: object key: ResponseReasoningSummaryPartDoneEvent path: - type: object key: ResponseReasoningSummaryTextDeltaEvent path: - type: object key: ResponseReasoningSummaryTextDoneEvent path: - type: object key: ResponseReasoningTextDeltaEvent path: - type: object key: ResponseReasoningTextDoneEvent path: - type: object key: ResponseImageGenCallCompletedEvent path: - type: object key: ResponseImageGenCallGeneratingEvent path: - type: object key: ResponseImageGenCallInProgressEvent path: - type: object key: ResponseImageGenCallPartialImageEvent path: - type: object key: ResponseMCPCallArgumentsDeltaEvent path: - type: object key: ResponseMCPCallArgumentsDoneEvent path: - type: object key: ResponseMCPCallCompletedEvent path: - type: object key: ResponseMCPCallFailedEvent path: - type: object key: ResponseMCPCallInProgressEvent path: - type: object key: ResponseMCPListToolsCompletedEvent path: - type: object key: ResponseMCPListToolsFailedEvent path: - type: object key: ResponseMCPListToolsInProgressEvent path: - type: object key: ResponseCodeInterpreterCallInProgressEvent path: - type: object key: ResponseCodeInterpreterCallInterpretingEvent path: - type: object key: ResponseCodeInterpreterCallCompletedEvent path: - type: object key: ResponseCodeInterpreterCallCodeDeltaEvent path: - type: object key: ResponseCodeInterpreterCallCodeDoneEvent path: - type: object key: ResponseOutputTextAnnotationAddedEvent path: - type: object key: ResponseQueuedEvent path: - type: object key: ResponseCustomToolCallInputDeltaEvent path: - type: object key: ResponseCustomToolCallInputDoneEvent path: - type: object key: ResponseErrorEvent path: - id: safety-cases title: Safety Cases description: 'Retrieve details about a safety warning or deactivation using the case ID from a `safety.warning_issued` or `safety.deactivation_issued` webhook event. Cases belong to an organization and require an API key with `api.safety.read`. ' navigationGroup: endpoints sections: - type: endpoint key: Getsafetycase path: retrieve - type: object key: SafetyCaseResource path: object - id: safety-alerts title: Safety Alerts description: 'Retrieve approved safety alerts with an API key. Project keys require `api.safety.alerts.read` and can read alerts from their project. ' navigationGroup: endpoints sections: - type: endpoint key: Getprojectsafetyalert path: retrieve - type: object key: SafetyAlertResource path: object - id: webhook-events title: Webhook Events description: 'Webhooks are HTTP requests sent by OpenAI to a URL you specify when certain events happen during the course of API usage. [Learn more about webhooks](https://developers.openai.com/api/docs/guides/webhooks). ' navigationGroup: webhooks sections: - type: object key: WebhookResponseCompleted path: - type: object key: WebhookResponseCancelled path: - type: object key: WebhookResponseFailed path: - type: object key: WebhookResponseIncomplete path: - type: object key: WebhookBatchCompleted path: - type: object key: WebhookBatchCancelled path: - type: object key: WebhookBatchExpired path: - type: object key: WebhookBatchFailed path: - type: object key: WebhookFineTuningJobSucceeded path: - type: object key: WebhookFineTuningJobFailed path: - type: object key: WebhookFineTuningJobCancelled path: - type: object key: WebhookEvalRunSucceeded path: - type: object key: WebhookEvalRunFailed path: - type: object key: WebhookEvalRunCanceled path: - type: object key: WebhookRealtimeCallIncoming path: - type: object key: WebhookLiveCallIncoming path: - type: object key: WebhookLiveTransportIncoming path: - type: object key: WebhookSafetyWarningIssued path: - type: object key: WebhookSafetyDeactivationIssued path: - type: object key: WebhookSafetyAlertCreated path: - type: object key: WebhookSafetyOrgAlertCreated path: - id: images-streaming title: Image Streaming description: 'Stream image generation and editing in real time with server-sent events. [Learn more about image streaming](https://developers.openai.com/api/docs/guides/image-generation). ' navigationGroup: endpoints sections: - type: object key: ImageGenPartialImageEvent path: - type: object key: ImageGenCompletedEvent path: - type: object key: ImageEditPartialImageEvent path: - type: object key: ImageEditCompletedEvent path: - id: realtime-client-events title: Client events description: 'These are events that the OpenAI Realtime WebSocket server will accept from the client. ' navigationGroup: realtime sections: - type: object key: RealtimeClientEventSessionUpdate path: - type: object key: RealtimeClientEventInputAudioBufferAppend path: - type: object key: RealtimeClientEventInputAudioBufferCommit path: - type: object key: RealtimeClientEventInputAudioBufferClear path: - type: object key: RealtimeClientEventConversationItemCreate path: - type: object key: RealtimeClientEventConversationItemRetrieve path: - type: object key: RealtimeClientEventConversationItemTruncate path: - type: object key: RealtimeClientEventConversationItemDelete path: - type: object key: RealtimeClientEventResponseCreate path: - type: object key: RealtimeClientEventResponseCancel path: - type: object key: RealtimeClientEventOutputAudioBufferClear path: - id: realtime-server-events title: Server events description: 'These are events emitted from the OpenAI Realtime WebSocket server to the client. ' navigationGroup: realtime sections: - type: object key: RealtimeServerEventError path: - type: object key: RealtimeServerEventSessionCreated path: - type: object key: RealtimeServerEventSessionUpdated path: - type: object key: RealtimeServerEventConversationItemAdded path: - type: object key: RealtimeServerEventConversationItemDone path: - type: object key: RealtimeServerEventConversationItemRetrieved path: - type: object key: RealtimeServerEventConversationItemInputAudioTranscriptionCompleted path: - type: object key: RealtimeServerEventConversationItemInputAudioTranscriptionDelta path: - type: object key: RealtimeServerEventConversationItemInputAudioTranscriptionSegment path: - type: object key: RealtimeServerEventConversationItemInputAudioTranscriptionFailed path: - type: object key: RealtimeServerEventConversationItemTruncated path: - type: object key: RealtimeServerEventConversationItemDeleted path: - type: object key: RealtimeServerEventInputAudioBufferCommitted path: - type: object key: RealtimeServerEventInputAudioBufferDtmfEventReceived path: - type: object key: RealtimeServerEventInputAudioBufferCleared path: - type: object key: RealtimeServerEventInputAudioBufferSpeechStarted path: - type: object key: RealtimeServerEventInputAudioBufferSpeechStopped path: - type: object key: RealtimeServerEventInputAudioBufferTimeoutTriggered path: - type: object key: RealtimeServerEventOutputAudioBufferStarted path: - type: object key: RealtimeServerEventOutputAudioBufferStopped path: - type: object key: RealtimeServerEventOutputAudioBufferCleared path: - type: object key: RealtimeServerEventResponseCreated path: - type: object key: RealtimeServerEventResponseDone path: - type: object key: RealtimeServerEventResponseOutputItemAdded path: - type: object key: RealtimeServerEventResponseOutputItemDone path: - type: object key: RealtimeServerEventResponseContentPartAdded path: - type: object key: RealtimeServerEventResponseContentPartDone path: - type: object key: RealtimeServerEventResponseTextDelta path: - type: object key: RealtimeServerEventResponseTextDone path: - type: object key: RealtimeServerEventResponseAudioTranscriptDelta path: - type: object key: RealtimeServerEventResponseAudioTranscriptDone path: - type: object key: RealtimeServerEventResponseAudioDelta path: - type: object key: RealtimeServerEventResponseAudioDone path: - type: object key: RealtimeServerEventResponseFunctionCallArgumentsDelta path: - type: object key: RealtimeServerEventResponseFunctionCallArgumentsDone path: - type: object key: RealtimeServerEventResponseMCPCallArgumentsDelta path: - type: object key: RealtimeServerEventResponseMCPCallArgumentsDone path: - type: object key: RealtimeServerEventResponseMCPCallInProgress path: - type: object key: RealtimeServerEventResponseMCPCallCompleted path: - type: object key: RealtimeServerEventResponseMCPCallFailed path: - type: object key: RealtimeServerEventMCPListToolsInProgress path: - type: object key: RealtimeServerEventMCPListToolsCompleted path: - type: object key: RealtimeServerEventMCPListToolsFailed path: - type: object key: RealtimeServerEventRateLimitsUpdated path: - id: realtime-translation-client-events title: Translation client events description: 'These are events that the OpenAI Realtime Translation WebSocket server will accept from the client. ' navigationGroup: realtime sections: - type: object key: RealtimeTranslationClientEventSessionUpdate path: - type: object key: RealtimeTranslationClientEventInputAudioBufferAppend path: - type: object key: RealtimeTranslationClientEventSessionClose path: - id: realtime-translation-server-events title: Translation server events description: 'These are events emitted from the OpenAI Realtime Translation WebSocket server to the client. ' navigationGroup: realtime sections: - type: object key: RealtimeServerEventError path: - type: object key: RealtimeTranslationServerEventSessionCreated path: - type: object key: RealtimeTranslationServerEventSessionUpdated path: - type: object key: RealtimeTranslationServerEventSessionClosed path: - type: object key: RealtimeTranslationServerEventSessionInputTranscriptDelta path: - type: object key: RealtimeTranslationServerEventSessionOutputTranscriptDelta path: - type: object key: RealtimeTranslationServerEventSessionOutputAudioDelta path: - id: chat-streaming title: Streaming description: 'Stream Chat Completions in real time. Receive chunks of completions returned from the model using server-sent events. [Learn more](https://developers.openai.com/api/docs/guides/streaming-responses). ' navigationGroup: chat sections: - type: object key: CreateChatCompletionStreamResponse path: streaming - id: assistants-streaming title: Streaming beta: true description: 'Stream the result of executing a Run or resuming a Run after submitting tool outputs. You can stream events from the [Create Thread and Run](https://developers.openai.com/api/docs/assistants/migration), [Create Run](https://developers.openai.com/api/docs/assistants/migration), and [Submit Tool Outputs](https://developers.openai.com/api/docs/assistants/migration) endpoints by passing `"stream": true`. The response will be a [Server-Sent events](https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events) stream. Our Node and Python SDKs provide helpful utilities to make streaming easy. Reference the [Assistants API quickstart](https://developers.openai.com/api/docs/assistants/migration) to learn more. ' navigationGroup: assistants sections: - type: object key: AssistantStreamEvent path: events - id: realtime-beta-client-events title: Realtime Beta client events description: 'These are events that the OpenAI Realtime WebSocket server will accept from the client. ' navigationGroup: legacy sections: - type: object key: RealtimeBetaClientEventSessionUpdate path: - type: object key: RealtimeBetaClientEventInputAudioBufferAppend path: - type: object key: RealtimeBetaClientEventInputAudioBufferCommit path: - type: object key: RealtimeBetaClientEventInputAudioBufferClear path: - type: object key: RealtimeBetaClientEventConversationItemCreate path: - type: object key: RealtimeBetaClientEventConversationItemRetrieve path: - type: object key: RealtimeBetaClientEventConversationItemTruncate path: - type: object key: RealtimeBetaClientEventConversationItemDelete path: - type: object key: RealtimeBetaClientEventResponseCreate path: - type: object key: RealtimeBetaClientEventResponseCancel path: - type: object key: RealtimeBetaClientEventTranscriptionSessionUpdate path: - type: object key: RealtimeBetaClientEventOutputAudioBufferClear path: - id: realtime-beta-server-events title: Realtime Beta server events description: 'These are events emitted from the OpenAI Realtime WebSocket server to the client. ' navigationGroup: legacy sections: - type: object key: RealtimeBetaServerEventError path: - type: object key: RealtimeBetaServerEventSessionCreated path: - type: object key: RealtimeBetaServerEventSessionUpdated path: - type: object key: RealtimeBetaServerEventTranscriptionSessionCreated path: - type: object key: RealtimeBetaServerEventTranscriptionSessionUpdated path: - type: object key: RealtimeBetaServerEventConversationItemCreated path: - type: object key: RealtimeBetaServerEventConversationItemRetrieved path: - type: object key: RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompleted path: - type: object key: RealtimeBetaServerEventConversationItemInputAudioTranscriptionDelta path: - type: object key: RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegment path: - type: object key: RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailed path: - type: object key: RealtimeBetaServerEventConversationItemTruncated path: - type: object key: RealtimeBetaServerEventConversationItemDeleted path: - type: object key: RealtimeBetaServerEventInputAudioBufferCommitted path: - type: object key: RealtimeBetaServerEventInputAudioBufferCleared path: - type: object key: RealtimeBetaServerEventInputAudioBufferSpeechStarted path: - type: object key: RealtimeBetaServerEventInputAudioBufferSpeechStopped path: - type: object key: RealtimeServerEventInputAudioBufferTimeoutTriggered path: - type: object key: RealtimeBetaServerEventResponseCreated path: - type: object key: RealtimeBetaServerEventResponseDone path: - type: object key: RealtimeBetaServerEventResponseOutputItemAdded path: - type: object key: RealtimeBetaServerEventResponseOutputItemDone path: - type: object key: RealtimeBetaServerEventResponseContentPartAdded path: - type: object key: RealtimeBetaServerEventResponseContentPartDone path: - type: object key: RealtimeBetaServerEventResponseTextDelta path: - type: object key: RealtimeBetaServerEventResponseTextDone path: - type: object key: RealtimeBetaServerEventResponseAudioTranscriptDelta path: - type: object key: RealtimeBetaServerEventResponseAudioTranscriptDone path: - type: object key: RealtimeBetaServerEventResponseAudioDelta path: - type: object key: RealtimeBetaServerEventResponseAudioDone path: - type: object key: RealtimeBetaServerEventResponseFunctionCallArgumentsDelta path: - type: object key: RealtimeBetaServerEventResponseFunctionCallArgumentsDone path: - type: object key: RealtimeBetaServerEventResponseMCPCallArgumentsDelta path: - type: object key: RealtimeBetaServerEventResponseMCPCallArgumentsDone path: - type: object key: RealtimeBetaServerEventResponseMCPCallInProgress path: - type: object key: RealtimeBetaServerEventResponseMCPCallCompleted path: - type: object key: RealtimeBetaServerEventResponseMCPCallFailed path: - type: object key: RealtimeBetaServerEventMCPListToolsInProgress path: - type: object key: RealtimeBetaServerEventMCPListToolsCompleted path: - type: object key: RealtimeBetaServerEventMCPListToolsFailed path: - type: object key: RealtimeBetaServerEventRateLimitsUpdated path: - id: live-client-events title: Client events description: Initialize a primary WebSocket with session.start and wait for session.started before sending other events. WebRTC creation starts the session for you. Start with the [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting) to design frontend instructions and delegation policy; see [backend prompting](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt) for tools and business rules. navigationGroup: live sections: - type: object key: LiveSessionStartEvent path: - type: object key: LiveForkSessionStartEvent path: - type: object key: LiveSessionUpdateParam path: - type: object key: LiveInputAudioAppendEvent path: - type: object key: LiveInputAudioMuteParam path: - type: object key: LiveInputAudioUnmuteParam path: - type: object key: LiveInstructionsAppendParam path: - type: object key: LiveThinkingAppendParam path: - type: object key: LiveCommentaryAppendParam path: - type: object key: LiveResponseItemCreateParam path: - type: object key: LiveResponseCreateParam path: - type: object key: LiveSessionCloseParam path: - id: live-server-events title: Server events description: Live server events. Responses delegation lifecycle events arrive inside response.event, not as top-level response events. Start with the [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting) to design frontend instructions and delegation policy; see [backend prompting](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt) for tools and business rules. navigationGroup: live sections: - type: object key: LiveSessionStarted path: - type: object key: LiveSessionUpdated path: - type: object key: LiveInputAudioMuted path: - type: object key: LiveInputAudioUnmuted path: - type: object key: LiveInstructionsAppended path: - type: object key: LiveThinkingAppended path: - type: object key: LiveCommentaryAppended path: - type: object key: LiveOutputAudioDelta path: - type: object key: LiveInputTranscriptDelta path: - type: object key: LiveOutputTranscriptDelta path: - type: object key: LiveDelegationCreated path: - type: object key: LiveResponseEvent path: - type: object key: LiveSessionUsageUpdated path: - type: object key: LiveSessionClosed path: - type: object key: LiveErrorEvent path: - type: object key: LiveInfoEvent path: