Create session
Create a Live WebRTC session. Start with the Live prompting guide.
Body ParametersJSONExpand Collapse
Startup configuration for the Live session.
Startup configuration for the Live session.
model: string or "gpt-live-1"The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.
The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.
audio: optional object { output } Startup audio configuration. WebRTC and SIP negotiate their audio format on the media transport.
Startup audio configuration. WebRTC and SIP negotiate their audio format on the media transport.
output: optional object { voice } Settings for speech generated by the Live model. Choose the voice before starting the session.
Settings for speech generated by the Live model. Choose the voice before starting the session.
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.
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.
Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session. Trusted sideband connections are unaffected.
Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session. Trusted sideband connections are unaffected.
Client and server event permissions for the WebRTC frontend data channel.
Client and server event permissions for the WebRTC frontend data channel.
allowed_client_events: optional "all" or array of stringClient 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.
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.
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.
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.
array of ServerEventSelector { type, response_event }
Who handles tasks delegated by the Live model. Omitted or null selects your application; use responses to let the API manage a Responses backend.
Who handles tasks delegated by the Live model. Omitted or null selects your application; use responses to let the API manage a Responses backend.
ClientDelegation object { type } Delegate tasks to your application. The Live session emits delegation events that your backend handles.
Delegate tasks to your application. The Live session emits delegation events that your backend handles.
Responses object { responses, type } Delegate tasks to a Responses model managed by the Live session.
Delegate tasks to a Responses model managed by the Live session.
Backend model, prompt, and tools used when the Live session delegates a task to Responses.
Backend model, prompt, and tools used when the Live session delegates a task to Responses.
Instructions for the delegated Responses model, separate from Live instructions. See backend prompting.
Maximum number of output tokens for each delegated response.
Whether the delegated Responses model may request multiple tool calls in a single response.
reasoning: optional object { effort, summary } or nullReasoning settings passed to each delegated Responses request.
Reasoning settings passed to each delegated Responses request.
service_tier: optional "auto" or "default" or "fast_tier_temp_pilot" or 3 more or nullService tier for delegated Responses requests.
Service tier for delegated Responses requests.
text: optional object { verbosity } or nullText generation settings passed to each delegated Responses request.
Text generation settings passed to each delegated Responses request.
tool_choice: optional "auto" or "none" or "required" or object { name, type } or object { name, server_label, type } Controls which tool the Responses backend uses when handling a task delegated by the Live model.
Controls which tool the Responses backend uses when handling a task delegated by the Live model.
Tools available to the Responses backend while it handles tasks delegated by the Live model.
Tools available to the Responses backend while it handles tasks delegated by the Live model.
FunctionTool object { name, type, description, 2 more } A function tool available to the Responses backend when the Live model delegates a task.
A function tool available to the Responses backend when the Live model delegates a task.
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.
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.
Developer object { content, role, id, 2 more } A developer message included in the initial text history of a Live session.
A developer message included in the initial text history of a Live session.
content: array of object { text, type } The message content. Supply exactly one text part for the initial Live conversation history.
The message content. Supply exactly one text part for the initial Live conversation history.
An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.
User object { content, role, id, 2 more } A user message included in the initial text history of a Live session.
A user message included in the initial text history of a Live session.
content: array of object { text, type } The message content. Supply exactly one text part for the initial Live conversation history.
The message content. Supply exactly one text part for the initial Live conversation history.
An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.
Assistant object { content, role, id, 2 more } An assistant message included in the initial text history of a Live session.
An assistant message included in the initial text history of a Live session.
content: array of object { text, type } or object { text, type } The message content. Supply exactly one text part for the initial Live conversation history.
The message content. Supply exactly one text part for the initial Live conversation history.
An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.
Frontend instructions for voice, conversation, interruptions, and when to delegate. Start with the Live prompting guide; put business rules and tool workflows in a separate backend prompt. Limited to 16,384 client-supplied tokens. Omitted or blank instructions use server defaults. Immutable after startup.
Create session
curl https://api.openai.com/v1/live/sessions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"session":{"model":"gpt-live-1","instructions":"Be concise. Ask for clarification when needed."},"transport":{"type":"webrtc","sdp":"<SDP offer>"}}'{
"session": {
"id": "live_123"
},
"transport": {
"type": "webrtc",
"sdp": "<SDP answer>"
}
}Returns Examples
{
"session": {
"id": "live_123"
},
"transport": {
"type": "webrtc",
"sdp": "<SDP answer>"
}
}