Live is a long-lived WebSocket session. It does not use the async task flow of
Media Models (
https://api.modellix.ai task polling) or the HTTP request and
response model of LLM (https://llm.modellix.ai).What You Get
Native Live protocol
Frames are forwarded verbatim in both directions. Only
setup.model is
rewritten by the gateway, so official Live client code works with a URL and
key change.One API key
Authenticate with
Authorization: Bearer using a Modellix key from the
console—not a vendor credential.Per-turn billing
Each completed turn is billed from the upstream token usage, split by input
and output modality.
Multimodal input
Gemini 3.8 Live accepts text, 16 kHz PCM audio, and JPEG video frames.
Transcribe Live accepts audio and returns text.
Base URL and Auth
Supported Models
Each model has its own page with a quick start, request parameters, returned messages, formats, limits, and examples.
Session Flow
1
Open the Connection
Connect with the
Authorization header. If the handshake fails, you get an
HTTP status instead of a WebSocket (see Handshake Errors).2
Send Setup
The first frame must be a
setup message and must arrive within 30 seconds.
Configure the options supported by your model. Transcribe Live uses
responseModalities: ["TEXT"] and inputAudioTranscription.
Wait for setupComplete before sending input.3
Stream Input
Send
realtimeInput messages with the input your model supports.
Replies stream back as serverContent frames.4
Turn Complete
Gemini 3.8 Live completes a turn with
serverContent.turnComplete.
Transcribe Live completes an utterance with serverContent.generationComplete;
its final transcript carries usageMetadata. Modellix bills the completed
turn or utterance from the upstream usage without changing those frames.5
Close
Close the WebSocket normally (code
1000) when you are done.Billing
- Per turn or utterance. Gemini 3.8 Live uses
turnComplete; Transcribe Live usesgenerationComplete. Each completion produces a request record, with charges based on the upstream token usage. Interim transcription updates are previews and are not counted as additional output. - By modality. Input text, image, video, and audio, and output text, audio, and video, are priced separately. Thinking tokens are billed at the output text rate. Unit prices and invoices follow the console.
- Context depends on the model. Gemini 3.8 Live includes accumulated conversation context in each turn; see Sessions and Limits. Transcribe Live reports audio input and text output usage for each finalized utterance.
- Incomplete turns. If a connection ends in the middle of a turn, the usage received so far is billed.
- Balance. The session starts only with sufficient balance. If the balance runs out mid-session, the connection is closed with code
4402after the current turn at the latest.
Errors
Handshake Errors
Failures before the WebSocket upgrade return an HTTP status with the same JSON error body as the Media API:code(integer) equals the HTTP status code.message(string) is formatted as"<Category>: <detail>".
Close Codes
After the connection is open, the server ends a session with a WebSocket close code and a short reason.
Close codes sent by the upstream model are passed through to you.
Keepalive
The server sends a WebSocket ping every 30 seconds and closes a connection that stops answering. Standard WebSocket libraries reply with a pong automatically. Do not disable it, and keep your event loop responsive while playing audio.Limits
- Messages larger than 16 MiB are rejected with
1009. - Upload rate is limited per connection. Send video at 1 frame per second and audio in real time to stay far below the limit; exceeding it closes the connection with
1008. - Concurrent sessions are limited per team. Exceeding the limit returns
429on the handshake. - A session that is idle still counts toward the concurrent limit. Close connections you no longer use.
Next Steps
Gemini 3.8 Live
Quick start, request parameters, returned messages, and examples.
Gemini 3.5 Transcribe Live
Stream audio and receive interim and final text transcripts.
Get an API Key
Create a Modellix API key in the console.