Skip to main content
GPT Live 1 is OpenAI’s continuous voice model. You keep one audio stream open, the model listens and speaks on the same timeline, and billing follows session duration instead of tokens. Your application handles any backend work the model delegates.

WSS

wss://api.modellix.ai/api/v1/live/openai/gpt-live-1
For authentication, handshake errors, and close codes shared by all Live models, see the Live Overview.

Quick Start

Prepare a short mono, 16-bit PCM WAV file at 24 kHz and set MODELLIX_API_KEY. Save the following code as gpt_live.py and run python gpt_live.py question.wav. The script streams the file followed by 5 seconds of silence so the model has time to answer, then closes the session and saves the reply as raw PCM in reply.pcm.
Python

Client Messages

session.start

The first frame must be session.start and must arrive within 30 seconds. Wait for session.started before sending audio. The following fields belong inside session, which is required even when empty.
string
Optional. The URL selects the model, and Modellix sets this field to the upstream model identifier.
string
System instructions, up to 16,384 tokens. They cannot be replaced after startup; add more with session.instructions.append.
object[]
default:[]
Starting conversation messages, up to 128 messages and 8,192 combined tokens. Roles: developer, user, assistant. Developer and user messages use input_text; assistant messages use text or output_text.
string
default:"marin"
Output voice. It cannot change after startup. See the OpenAI voice list for voice names.
object | null
Allowed: omit it, null, or {"type": "client"}. All three select client delegation. {"type": "responses"} closes the connection with 1008 and is not forwarded.

Other Client Events

event
Appends raw base64-encoded audio in the audio field, with no WAV or other container header. The decoded length must be even. Keep sending during silence so the stream stays continuous. Appends are not acknowledged.
event
Mutes input. The session continues, and the model can still speak. Pair it with session.input_audio.unmute.
event
Adds trusted instructions. content holds up to 500 tokens, and delegation_id is required: use null for session-wide context, or a client delegation ID for that task.
event
Adds context the model should know but not say immediately. Takes the same content and delegation_id fields.
event
Adds information the model may say aloud, possibly paraphrased. Takes the same content and delegation_id fields.
event
Starts a graceful close. Keep reading until session.closed.

Server Messages

Server events are forwarded unchanged.
event
The session is ready. session holds the startup configuration, including id.
event
A base64-encoded audio chunk in delta.
event
A fragment of the caller’s transcript in delta, with start_ms and end_ms. Fragments have no item ID or turn marker, so your application groups them for display.
event
A fragment of the model’s transcript. It has the same fields and grouping rules as the input transcript. User and model fragments can interleave.
event
The model created a unit of delegated work. For client delegation, run the work in your application and report back with delegation.id as delegation_id on session.commentary.append or session.thinking.append.
event
A cumulative snapshot, about once per minute. usage.seconds is the running total, not an increment, and context_window.usage_ratio reports context use.
event
The final event. usage.seconds is the final session duration. reason is one of close_requested, expired, content, remote_hangup, or connection_lost.
event
An upstream error with error.type, error.code, error.message, error.param, and error.client_event_id. A startup error prevents session.started. A command error does not always close a session.
See the OpenAI GPT-Live guide for session design and the delegation guide for the client delegation workflow.

Billing

GPT Live 1 is billed by voice session duration, using the upstream usage.seconds. Seconds are charged from the per-minute price without rounding up to a whole minute. Unit prices and invoices follow the console.
  • Silence and waiting count. The upstream duration includes silence and waiting time, so close sessions you no longer use.
  • Multiple records per session. Each increase in session.usage.updated and the final session.closed usage produce a request record for the seconds added since the previous one. Cumulative values are never summed.
  • Empty sessions. A session that ends with no reported duration has no charge.
  • Missing final usage. If the connection ends before session.closed, only usage already received is billed. Send session.close and read session.closed so the final seconds are recorded.
  • Your own backend work. Models and tools your application calls while handling a delegation are outside this session and are billed by whichever service you call.

Sessions and Limits

  • Audio is fixed at 24 kHz PCM16 mono on Modellix.
  • Selecting {"type": "responses"} in session.start or session.update closes the connection with 1008. The frame is not forwarded.
  • WebRTC, session forking, recording retrieval, sideband connections, and other upstream HTTP endpoints are not available through Modellix.
  • When context use passes 90%, the upstream starts a replacement voice engine in the same session with your original instructions and up to 8,192 tokens of history.
  • Modellix closes any connection at its maximum connection duration with code 4408.