Skip to main content

Fork Live Session

GET 

wss://api.knox.chat/v1/live/sessions/:session_id/fork

POST 

https://api.knox.chat/v1/live/sessions/:session_id/fork

Fork a stored Live session (store: true at create time) into a new conversation that inherits history. Only the owner can fork. The fork uses the same upstream OpenAI channel as the source session.

  • GET upgrades to WebSocket. First message must still be session.start. Fork overrides are limited to store, Responses delegation, and audio.format.
  • POST creates a WebRTC fork from an SDP offer (JSON { "sdp", "session" } or raw application/sdp).

Inherited settings (voice, instructions, delegation mode) stay unless you send an allowed override. You cannot change model; forks stay on gpt-live-1.

See the GPT-Live guide.

Path Parameters​

NameTypeRequiredDescription
session_idStringYesId of the stored source session.

WebSocket fork​

import WebSocket from "ws";

const sourceId = "sess_…";
const ws = new WebSocket(
`wss://api.knox.chat/v1/live/sessions/${sourceId}/fork`,
{ headers: { Authorization: "Bearer " + process.env.KNOX_API_KEY } }
);

ws.on("open", () => {
ws.send(JSON.stringify({
type: "session.start",
session: { store: true },
}));
});

A non-WebSocket GET returns 400: connect to /v1/live/sessions/{id}/fork over WebSocket, or POST an SDP offer for WebRTC.

WebRTC fork​

curl -s https://api.knox.chat/v1/live/sessions/sess_…/fork \
-H "Authorization: Bearer $KNOXCHAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sdp": "v=0\r\n…",
"session": { "store": true }
}'

Same 15-second WebRTC init charge as create.

Error Responses​

StatusWhen
400Not a WebSocket (GET), missing SDP (POST), or invalid fork session.
401Missing or invalid Knox API key.
402Account balance is not greater than $0.01.
403Token is not authorized for gpt-live-1.
404Source session not found, not stored, or owned by another user.
502Upstream fork failed.