Fork Live Session
GETwss://api.knox.chat/v1/live/sessions/:session_id/fork
POSThttps://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 tostore, Responses delegation, andaudio.format. - POST creates a WebRTC fork from an SDP offer (JSON
{ "sdp", "session" }or rawapplication/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
| Name | Type | Required | Description |
|---|---|---|---|
| session_id | String | Yes | Id 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
| Status | When |
|---|---|
400 | Not a WebSocket (GET), missing SDP (POST), or invalid fork session. |
401 | Missing or invalid Knox API key. |
402 | Account balance is not greater than $0.01. |
403 | Token is not authorized for gpt-live-1. |
404 | Source session not found, not stored, or owned by another user. |
502 | Upstream fork failed. |