Realtime API for Voice Agents: GPT-Live-1, Grok and Gemini

Compare five realtime voice models on AI/ML API. See GPT-Live-1, Grok and Gemini pricing, function calling, session limits and Python setup.
A person and a robot wearing headsets exchange voice messages beside OpenAI, Grok and Gemini logos on a lavender AI/ML API cover.

With a realtime API, your app holds a live voice conversation with users: the user speaks, the model answers by voice right away, and the user can interrupt it at any moment. The answer starts in about a second. Support lines, sales calls, voice assistants and language tutors run on realtime models.

On AI/ML API, five voice models from OpenAI, xAI and Google work with one key and one balance: GPT-Live-1, GPT Realtime 2.1, GPT Realtime 2.1 Mini, Grok Voice Think Fast 2.0 and Gemini 3.8 Live. GPT-Live-1 costs $0.05 per minute, and by our estimate, a one-minute call on GPT Realtime 2.1 Mini comes to about $0.015. In the Playground, you can try all five and hear how each one handles pauses and interruptions before you connect it.

Prices and limits checked on November 10, 2026.

How does a realtime API work?

A realtime API keeps a connection open between your app and a voice model. Your app streams the user's audio and plays the response. Speech-to-speech models process audio input and generate spoken replies without separate transcription and speech synthesis models.

Audio flows between your app and a realtime model through AI/ML API. Your app sends microphone audio and plays the model response.

Your app also carries out actions such as looking up an order and handles playback when the user interrupts. A session lasts up to an hour on most models here, or 10 minutes on Gemini 3.8 Live.

Compare the realtime models

Compare function calling, session length, billing and SDK support. Realtime 2.1 and Mini expose the same turn-detection settings; test both on the same conversations before paying the higher token rates.

Which realtime model should you pick?
GPT-Live-1GPT Realtime 2.1GPT Realtime 2.1 MiniGrok Voice Think Fast 2.0Gemini 3.8 Live
Consider it forNatural back-and-forth talkAn alternative to test when Mini misses your requirementsLower-cost agents with functionsScripted lines and pronunciationApps on Google's SDK
Published speed0.80 s1.41 sNot published0.70 sNot published
ToolsHands tasks to your backendStructured function callsStructured function callsStructured function callsStructured function calls
Longest session60 min60 min60 min60 min10 min
BillingPer secondPer tokenPer tokenPer secondPer token

Voice AI latency was measured in different ways: OpenAI timed how fast each model takes its turn, and Artificial Analysis timed Grok's first sound.

GPT-Live-1 API

GPT-Live-1 is OpenAI's live voice model for natural conversation: it hears the user even while it's talking, which OpenAI's GPT-Live guide calls full duplex. In OpenAI's evaluation, it took its turn about 1.8 times faster than GPT Realtime 2.1. It doesn't make function calls itself and hands lookups and other tasks to your backend instead. Your app can run any model or service there, for example one of the models built for tool use in our catalog, and return the result for GPT-Live-1 to say. OpenAI made it generally available in the API on September 10, 2026.

OpenAI Realtime API: GPT Realtime 2.1 and GPT Realtime 2.1 Mini

GPT Realtime 2.1 is OpenAI's speech-to-speech model for voice agents that call your functions, up to 32 of them. You choose when it answers: after a short silence with server_vad, or when the user's words show they're done with semantic_vad. For quicker replies, lower silence_duration_ms or set a high eagerness, and the model may then cut off a user who stops to think. GPT Realtime 2.1 Mini has the same settings at a lower price.

Grok Voice API

Grok Voice Think Fast 2.0 is xAI's voice agent model for support calls. With force_message, it says a line of up to 1,000 characters word for word, and up to 100 pronunciation replacements fix how it says brand names. On AI/ML API, it works only with server-side turn detection and calls your own functions. To turn reasoning off for faster answers, set reasoning.effort to none. xAI released it on July 29, 2026 as Grok Voice 2.0.

Gemini Live API: Gemini 3.8 Live

Gemini 3.8 Live is Google's Live API model, and it calls your functions, up to 32 of them. In Google's announcement, the CEO of Equal AI says its voice agents take more than a million live calls a day, and Gemini 3.8 Live made them better at handling interruptions. A session lasts up to 10 minutes. After that, your app opens a new session and passes in the context it needs, because a new session doesn't remember the old one. Google released it on September 15, 2026.

Realtime API pricing

On AI/ML API, GPT-Live-1 and Grok Voice Think Fast 2.0 charge for every second of an open session, silence included, and the other three models charge per token. Close a per-second session as soon as the call ends.

What is realtime API pricing on AI/ML API?
ModelPrice on AI/ML API
GPT-Live-1$0.05 per minute
GPT Realtime 2.1$32 per 1M input audio tokens ($0.40 cached), $64 per 1M output audio tokens
GPT Realtime 2.1 Mini$10 per 1M input audio tokens ($0.30 cached), $20 per 1M output audio tokens
Grok Voice Think Fast 2.0$0.08 per minute, plus $0.004 per text message you send
Gemini 3.8 Live$3 per 1M input audio tokens, $12 per 1M output audio tokens

On token models, every answer re-reads the whole conversation, your instructions and your function list, so a long call costs more per minute than a short one. The instructions and functions are billed as text tokens, $4 per 1M on GPT Realtime 2.1, and Gemini 3.8 Live has no discount for cached input.

To compare the two kinds of pricing, we estimated the cost of one example call: one minute, with 30 seconds of user speech and 30 seconds of model speech. For token models, we counted tokens the way our billing docs estimate them. That's 10 tokens per second of user audio and 20 per second of model audio on GPT Realtime models, and 25 per second each way on Gemini 3.8 Live.

Estimated cost of an example one-minute call on AI/ML API, with 30 seconds of user speech and 30 seconds of model speech: about $0.011 on Gemini 3.8 Live, $0.015 on GPT Realtime 2.1 Mini and $0.048 on GPT Realtime 2.1, against $0.05 per minute on GPT-Live-1 and $0.08 per minute on Grok Voice Think Fast 2.0

GET https://api.aimlapi.com/v1/realtime/models returns the five with their current prices and limits for your key.

What AI/ML API handles

Control when the agent replies. On GPT Realtime 2.1 and Mini, turn detection settings let you choose between quicker replies and more time for the user to finish speaking. Grok Voice Think Fast 2.0 answers faster with reasoning turned off.

Your voice agent can use the whole catalog. During a call, the realtime model asks your app to run a function, and inside that function your app can use any of our models with the same key. A user asks for a picture of a new kitchen. Your app makes it with an image model and shows it while the agent keeps talking. The same way, the agent can start a short video or search the web with our MCP tools.

One key, provider list prices. You pay what OpenAI, xAI and Google charge, for example the prices on OpenAI's pricing page, from one balance for all five models.

Connect with the OpenAI and Google SDKs. In the official SDKs, you change only the base URL and the key.

Short-lived keys in the browser. For a voice assistant on your site, the browser gets a one-time key instead of yours, and you can cap what each session spends. AI/ML API sets money aside before each answer or billing interval, so a call never runs past your balance.

Speech-to-speech or a voice pipeline?

A voice pipeline combines speech-to-text, a language model and text-to-speech. A speech-to-speech model handles audio input and output in one model. Either architecture can use services from one provider or several; it does not determine how many accounts or API keys you need.

Voice architecture comparison
DecisionSpeech-to-text → LLM → text-to-speechSpeech-to-speech model
ComponentsSeparate speech and language stagesOne model processes audio and generates speech
ControlChoose the model used at each stageUse the voice model’s supported tools and turn settings
InterruptionsCoordinate turn detection and playback across stagesUse model interruption events and stop playback in your app
CostAdd the charges for the selected stagesCheck session-duration or token billing

Direct provider access or AI/ML API?

With direct access, your app uses the account and supported models of the provider you connect to. AI/ML API gives access to the five models in this guide through one account and balance at provider list prices. Each model family retains its own protocol and SDK. Moving from GPT Realtime 2.1 to Mini requires changing the model name; switching model families can require different integration code.

Voice agent use cases

With a realtime API, you can build phone agents for support and sales or add voice to an app you already have.

Support and sales calls

A phone agent picks up a support call, finds the caller's order in your system and reads the answer out loud. It can also call customers to confirm an appointment or a payment. A phone service such as Twilio passes the call audio to your server, and your server streams it into a realtime session. On GPT-Live-1, the voice part of 1,000 five-minute calls costs $250, and telephony and any other services are billed separately.

Voice for your app or AI agent

A realtime model can be the voice of a product you already have, while your backend or text agent does the work. A user asks to move a meeting to Friday. The model asks your app to run a function, your app checks the calendar and saves the new time, and the agent confirms the change out loud.

More AI voice agent ideas

  • A language tutor. It's a speaking partner like Duolingo's Video Call, built into your own app. An hour of practice on GPT-Live-1 costs $3.
  • A voice assistant on your site. Visitors ask about products out loud instead of searching the site.
  • Hands-free help. A driver or a warehouse worker asks questions and gets spoken answers without touching a screen.
  • A tester for your agent. A second realtime model plays the customer, so you can test your agent before real users call.

Connect your app

Create a key on the API keys page. Realtime access becomes available 24 hours after your first top-up. To start a session, your balance must be at least $1 and cover the first reservation. See the current access and billing rules.

Try the realtime API in the Playground

Open the AI/ML API Playground, sign in, open the model picker and choose the Realtime tab.

Connect to the realtime API from your server

For GPT Realtime 2.1 and GPT Realtime 2.1 Mini, use the OpenAI SDK for Python with realtime support (pip install "openai[realtime]", Python 3.10 or later). Save your key in the AIMLAPI_KEY environment variable. This code opens a session and asks for a short text answer:

import asyncio
import os

from openai import AsyncOpenAI

client = AsyncOpenAI(
    api_key=os.environ["AIMLAPI_KEY"],
    base_url="https://api.aimlapi.com/v1",
)


async def main():
    async with client.realtime.connect(model="openai/gpt-realtime-2.1-mini") as connection:
        await connection.conversation.item.create(
            item={
                "type": "message",
                "role": "user",
                "content": [{"type": "input_text", "text": "Say hi in two words."}],
            }
        )
        await connection.response.create(response={"output_modalities": ["text"]})

        async for event in connection:
            if event.type == "response.output_text.delta":
                print(event.delta, end="", flush=True)
            elif event.type == "response.done":
                print("\nUsage:", event.response.usage)
                break
            elif event.type == "error":
                print("Error:", event.error)
                break


asyncio.run(main())

For voice, set output_modalities to ["audio"], stream microphone audio as base64 PCM16 chunks with input_audio_buffer.append, and play the response.output_audio.delta events the model sends back. When the user interrupts, stop playing the audio you've already received and clear the playback queue. On GPT Realtime models, also send conversation.item.truncate, so the conversation keeps only the part of the answer the user heard.

GPT-Live-1, Gemini 3.8 Live and Grok Voice Think Fast 2.0 connect through other SDKs or directly:

Connect to the realtime API from your server
ModelSDKURL
GPT-Live-1OpenAI SDK for Node.js, LiveWS classhttps://api.aimlapi.com/v1
Gemini 3.8 LiveGoogle GenAI SDK, with a client secret and apiVersion: "v1alpha" in JavaScripthttps://api.aimlapi.com
Grok Voice Think Fast 2.0No SDKwss://api.aimlapi.com/v1/realtime

Each model's page in our realtime docs has full Python and JavaScript examples, voice included.

Connect a browser client to the realtime API

Your server creates a short-lived client secret and passes it to the browser. The browser uses it to connect directly to AI/ML API. The secret can open one session before it expires: set its lifetime from 10 to 600 seconds, with a maximum of 60 seconds for Gemini 3.8 Live.

curl https://api.aimlapi.com/v1/realtime/client_secrets \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "session": {"model": "openai/gpt-realtime-2.1"},
    "expires_after": {"anchor": "created_at", "seconds": 60},
    "max_session_seconds": 900,
    "max_spend_usd": 2
  }'

The response has the secret in its value field, and the page opens the session with it:

const ws = new WebSocket(
  "wss://api.aimlapi.com/v1/realtime?model=openai/gpt-realtime-2.1",
  ["realtime", `openai-insecure-api-key.${secret}`],
);

max_session_seconds sets how long the session itself can last, from 10 seconds up to the model's limit, and it's 15 minutes if you leave it out. max_spend_usd caps what the session can spend, up to $50, with $2 by default. Add origin to make the secret work only on your site.

FAQ

Is the realtime API free?

No. Sessions are paid from your AI/ML API balance. Realtime access becomes available 24 hours after your first top-up. Your balance must be at least $1 and cover the first reservation before a session can start.

How much does the OpenAI Realtime API cost per minute?

On AI/ML API, GPT-Live-1 costs $0.05 per minute. By our estimate, a one-minute call with half user and half model speech costs about $0.048 on GPT Realtime 2.1 and $0.015 on GPT Realtime 2.1 Mini. Pauses cost nothing on these two, because they bill per answer.

When should I use GPT-Live-1 instead of GPT Realtime 2.1?

Use GPT-Live-1 for quick back-and-forth talk: it hears the user even while it speaks and, in OpenAI's evaluation, took its turn about 1.8 times faster. GPT Realtime 2.1 fits better when the model itself should call your functions or when calls have long pauses, because GPT-Live-1 bills every second.

Does the realtime API support function calling?

Yes. GPT Realtime 2.1, GPT Realtime 2.1 Mini, Grok Voice Think Fast 2.0 and Gemini 3.8 Live take up to 32 functions each, and GPT-Live-1 hands tool calls to your app. Remote MCP servers and built-in web search aren't available, so your app runs such tools inside its functions.

Which voices does the realtime API have?

GPT-Live-1 has 31 built-in voices, Grok Voice Think Fast 2.0 has 26, and GPT Realtime 2.1 and GPT Realtime 2.1 Mini have 10 each. Custom and cloned voices aren't available on AI/ML API.

How do I get a realtime API key?

Sign up on AI/ML API and create a key on the API keys page. Realtime access becomes available 24 hours after your first top-up. The same key can then open a session when your available balance meets the session requirements.

Try a conversation before you integrate

In the Playground, test the pauses, interruptions and tool requests your agent needs to handle. Compare Realtime 2.1 with Mini on the same conversations, or evaluate GPT-Live-1 for full-duplex conversation and Grok for scripted lines. Then follow the selected model’s integration guide.

Share with friends

Ready to get started? Get Your API Key Now!

Get API Key