Fork WebSocket
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending
.mdto the page URL.
Start a new Live session from stored conversation state. Send and receive audio and control events on the new WebSocket connection.
WS /v1/live/sessions/\{session_id\}/fork
Connection
wss://api.openai.com/v1/live/sessions/\{session_id\}/fork
Authenticate from your backend with your OpenAI API key in the Authorization: Bearer $OPENAI_API_KEY header. Keep the key on your server.
session_id (required path parameter): The ID of the stored source session to fork. The fork receives a new session ID.
No query parameters. After connecting, send session.start with a session overrides object. An empty object inherits the stored configuration. Do not supply a new model. Wait for session.started before sending audio or other commands.
Inputs
Required once after connecting. Omitted settings are inherited, including store. You may override Responses delegation settings, storage, and the new WebSocket audio format. Frontend client permissions apply only to WebRTC forks.
First message: session.start
{
"type": "session.start",
"session": {}
}Outputs
The server confirms the new session is ready. Use its new ID for subsequent sideband connections and session controls.
Fork ready · excerpt: session.started
{
"type": "session.started",
"event_id": "event_started_1",
"session": {
"id": "live_fork_123",
"expires_at": 1788307200,
"status": "active",
"model": "gpt-live-1"
}
}Learn how to store a session and fork its conversation.
Client events
session.start
Start a Live session after connecting to a stored session’s fork WebSocket. Send an empty session object to use the stored configuration.
本篇目录
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example
- Schema
- Example