Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Theme

Create session

POST
/live/sessions

Create a Live WebRTC session or place an outbound SIP call. Start with the Live prompting guide for session configuration and Telephony and SIP for trunk setup and call monitoring.

Set transport.type to webrtc and supply an SDP offer, or set it to sip and supply an E.164 destination and trunk credentials. Ringing is limited to 3 minutes and connected calls to 2 hours; these limits are not configurable in the request.

Returns 201 Created after session initialization. WebRTC responses include an SDP answer. SIP responses do not wait for the callee to answer. Attach a sideband connection using session.id to monitor SIP call progress.

Each SIP request creates a new call. If a request times out or the connection fails, retry with caution: the original request may have succeeded, and a retry can place another call.

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>"}}'
Response example
{"session":{"id":"live_123"},"transport":{"type":"webrtc","sdp":"<SDP answer>"}}
Body Parameters
JSON
session: MediaSessionConfig { model, audio, client, 6 more }

Startup configuration for the Live session.

transport: Webrtc { sdp, type } or Sip { destination, trunk, type }

WebRTC transport with an SDP offer, or SIP transport with a destination and per-call trunk credentials.

Returns
session: object { id }

The newly created Live session. Use its ID for session controls and sideband connections.

id: string

Opaque session identifier. Preserve the returned value unchanged, including its prefix.

transport: Webrtc { sdp, type } or Sip { type }

WebRTC transport with an SDP answer, or SIP transport without SDP or trunk credentials. For SIP, attach a sideband using session.id to receive transport.ringing, transport.answered, and transport.failed notifications.

Returns Examples
{
  "session": {
    "id": "live_123"
  },
  "transport": {
    "type": "webrtc",
    "sdp": "<SDP answer>"
  }
}