GPT-Live
OpenAI's live voice model for continuous spoken conversations. A GPT-Live session takes a continuous audio stream, is configured once in its first event, and is billed by its duration rather than by tokens.
Setup your API Key
If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.
API Schema
The model is served over a WebSocket in the OpenAI GPT-Live protocol. The session flow, client events, billing, limits and errors are described in Realtime Sessions.
Connection URL
wss://api.aimlapi.com/v1/live/sessions (no ?model=: the model is named in session.start)
Authentication
Server: Authorization: Bearer <YOUR_AIMLAPI_KEY>. Browser: subprotocols realtime and openai-insecure-api-key.<client secret> (client secrets)
SDK base URL
https://api.aimlapi.com/v1
Session options (session.start, the first event, sent once):
model
openai/gpt-live-1 or gpt-live-1 (required)
instructions
Up to 16,384 characters
input
Up to 128 history messages to seed the conversation, text only, one part each (developer, user with input_text; assistant with output_text)
audio.format
One format for input and output: {"type": "audio/pcm", "rate": 24000}, {"type": "audio/pcm", "rate": 16000}, {"type": "audio/pcmu", "rate": 8000}, {"type": "audio/pcma", "rate": 8000}
audio.output.voice
Built-in voices: alloy, ash, ballad, beacon, bossa, brise, cedar, cinder, coral, delta, echo, flitz, gleam, harema, juni, marin, meridian, nira, noeul, nuri, quartz, ripple, sage, shida, shimmer, sillage, stone, tempo, verse, vesper, willow
delegation
{"type": "client"} only (applied automatically)
store
false only (applied automatically)
Code Example
With the official OpenAI Node.js SDK, create the client with baseURL: "https://api.aimlapi.com/v1" and open the session with its LiveWS class; the events are the same.
Last updated
Was this helpful?