Meet the Grok Voice Agent
On this page
Updated November 3, 2026. Grok Voice 3.0, released October 14, 2026, replaces the deprecated Grok Voice 2.0 at the same price of $0.08 per minute, and the
grok-voice-latestalias now points to 3.0. For transcription,grok-voice-transcribe-2.0is the default model; version 1.0 reached end of life on October 2, 2026. Sources: Pricing · Rate limits.
A real-time conversational voice agent
The Grok Voice Agent API lets you build assistants that hold live spoken conversations with your users. What sets it apart from a classic setup is the architecture. The classic approach chains three services, each behind its own HTTP call: speech-to-text, a text response, then text-to-speech. The Voice Agent streams everything through a single persistent WebSocket connection instead. The user speaks, and the model listens, understands, and answers out loud, with no three-way round trip across the network.

You hear the difference right away. A three-step pipeline leaves a gap of several hundred milliseconds after every sentence. A conversation with the Voice Agent feels more like a phone call: the other side picks up where you left off, you can cut in, and it carries on. That continuity is what separates a phone menu customers put up with from an assistant they’re happy to talk to.
How the connection works
Everything runs over WebSocket, which keeps a two-way channel open between your app and xAI. Connect to the wss://api.x.ai/v1/realtime endpoint and put your API key in the authorization header, just as you would for a REST call:
const ws = new WebSocket("wss://api.x.ai/v1/realtime", {
headers: {
"Authorization": "Bearer " + XAI_API_KEY
}
});
The server answers with a session.created event to confirm the connection is open. Don’t treat the connection as ready until that event arrives: it’s your signal to send your configuration in a session.update message. An app that sends its configuration before session.created shows up can behave erratically at startup.
The audio loop
Once the session is configured, data flows in a well-defined loop. Your app captures audio from the microphone, encodes it in base64, and sends it in small chunks with input_audio_buffer.append. That input is continuous: you don’t wait for the user to finish a sentence before you start sending. Meanwhile, the server runs voice activity detection (VAD), which spots on its own when the user starts and stops speaking. Grok then processes what was said, interprets it in the context of the conversation, and generates a reply. The reply audio streams back to you through response.output_audio.delta, chunk by chunk, also in base64.
The benefit of this design is that you write no turn-taking logic at all. You don’t decide when the user is done, and you don’t trigger generation yourself. The server handles it, and all you do is play the audio as it arrives. The loop repeats until the conversation ends.
What the agent can do while it talks
The Voice Agent can do more than chat: it can call tools in the middle of a conversation. It has web search for real-time information, X search for posts on the platform, custom functions to call your own APIs, file search to look through collections of vectorized documents, and connections to MCP (Model Context Protocol) servers to reach standardized external tools.
Here’s what that looks like in practice. A customer calls to check on an order. While the agent keeps them company with a sentence or two, it queries your database through a custom function, then reads out the delivery date. Or picture a scheduling assistant that checks a calendar through an MCP server and immediately offers three time slots. Either way, the user never notices that an API was called.
Constraints to plan for from day one
Two limits shape your architecture. The first is the number of concurrent sessions: 10 on the entry tier, then 20, 50, 100, and 200 depending on your team’s tier. Compare that number with your peak call volume before you go to production. The second is cost: $0.08 per minute, or $4.80 per hour, plus $0.004 per text input. Billing is by the minute, so close sessions nobody is using. The current documentation sets no maximum session length. For long conversations, or after a dropped connection, session resumption replays the history, which is kept for 30 minutes after the last activity. Audio defaults to 24 kHz PCM, and you can change the format to suit your channel.
Prices checked November 3, 2026. Prices change often: before you budget anything, check the current rates on the official xAI pricing page.
Key takeaways
- The Grok Voice Agent runs over WebSocket for real-time voice conversations
- Voice activity detection (VAD) runs on the server, which keeps your code simple
- The agent can use tools (web, X, functions, files, MCP) during the conversation
- It costs $0.08 per minute ($4.80 per hour); concurrent sessions range from 10 to 200 depending on your tier