Skip to main content
Modellix Live is a WebSocket passthrough for real-time models such as Gemini Live and GPT Realtime. Open one connection and stream the input supported by your model: voice and vision models return spoken replies, transcription models return text, and translation models return translated speech and text. Authentication, balance checks, and billing are handled by Modellix; each model keeps the message format of its upstream Live API.
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. The gateway rewrites only the model identifier: setup.model on Gemini models, and session.model or the transcription model on OpenAI models. 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.

Usage-based billing

Gemini and GPT Realtime conversation models are billed from upstream token usage. GPT Live 1 and OpenAI transcription models use reported seconds; translation uses the audio seconds you send.

Multimodal input

Gemini 3.8 Live accepts text, 16 kHz PCM audio, and JPEG video frames. GPT Realtime 2.1 accepts text, audio, and images. Transcription and translation models accept audio.

Base URL and Auth

Only the Authorization header is accepted. Do not pass the key in the URL query string.
Browsers cannot set custom headers on a WebSocket handshake. Connect from your backend, or from a client runtime that supports request headers.

Supported Models

Each model has its own page with a quick start, request parameters, returned messages, formats, limits, and examples.

Session Flow

The session flow depends on the model’s upstream protocol.

Gemini Models

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.

OpenAI Models

Connect with the Authorization header, then follow the flow for your model.

Billing

  • Gemini: per turn or utterance. Gemini 3.8 Live uses turnComplete; Transcribe Live uses generationComplete. 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.
  • Gemini: 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.
  • Gemini: 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.
  • GPT Realtime 2.1 and Mini: per response. Each response is billed from the token usage in response.done. See GPT Realtime 2.1 Billing.
  • GPT Live 1: by session seconds. Duration comes from the upstream usage.seconds and includes silence and waiting time. A session can produce several request records. See GPT Live 1 Billing.
  • GPT Live Transcribe: by transcribed seconds. Each completed turn is billed from its reported usage.seconds. See GPT Live Transcribe Billing.
  • GPT Realtime Whisper: by input audio seconds. Each completed turn produces one request record. See GPT Realtime Whisper Billing.
  • GPT Realtime Translate: by input audio seconds. Seconds are the decoded audio bytes successfully forwarded, divided by 48,000. Silence you send counts; gaps with nothing sent do not. See GPT Realtime Translate Billing.
  • Incomplete sessions. If a connection ends in the middle of a turn or response, the usage received so far is billed. Modellix does not estimate missing usage. GPT Realtime Translate bills the audio already forwarded.
  • Balance. The session starts only with sufficient balance. If the balance runs out mid-session, the connection is closed with code 4402 after the current turn or billing batch 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 429 on the handshake.
  • A session that is idle still counts toward the concurrent limit. Close connections you no longer use.
  • After you disconnect from a GPT Realtime conversation, GPT Live Transcribe, or GPT Realtime Whisper session, Modellix waits up to 2 seconds for final usage. When the service restarts or one of these connections reaches its maximum duration, it stops accepting new input and forwards current output for up to 30 seconds while you remain connected.

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.

GPT Realtime 2.1

Real-time conversations with text, audio, and image input.

GPT Realtime 2.1 Mini

The Mini variant, with the same protocol as GPT Realtime 2.1.

GPT Live 1

Continuous voice sessions billed by session seconds.

GPT Live Transcribe

Stream audio and receive partial and final text transcripts.

GPT Realtime Whisper

Stream audio and receive transcripts, billed by input audio seconds.

GPT Realtime Translate

Stream speech and receive translated audio and text.

Get an API Key

Create a Modellix API key in the console.