Built for voice agents that can't wait 600ms

xAI: Grok Voice 2.0

xai/grok-voice-2-0
active speech-to-speech 1 provider
Compatibility only. Upgrade recommended.

Deprecated by xAI in October 2026 with the 2026-10-14 Grok Voice 3.0 release, with no shutdown date published, and still served here for compatibility.

Playground

xAI's previous-generation realtime speech-to-speech voice agent over WebSockets, with low-latency turn-taking and tool use such as web search.

AuthorxAI
Languages20 languages
Response formatsStreaming: PCM · µ-law · A-law · Opus
Variant models2 IDs
Statusactive

Variant Models

These are native model IDs accepted by the author/provider for the same canonical model family.

Grok Voice 2.0 Default

Pinned Grok Voice 2.0 release, selected via the model query param on /v1/realtime.

grok-voice-2.0
Grok Voice Think Fast 2.0 Legacy

Still accepted by /v1/realtime, which reports it as grok-voice-2.0.

grok-voice-think-fast-2.0

Providers

Different providers can host the same model. Choose one provider when you need a fixed backend, or let routing select among them.

ProviderSlugPer hourLatencyiFor TTS, latency is measured as time to first byte of audio. For STT, latency is measured as time to first token.ModesUptime
xAI 5 params
grok
$4.8
—
Streaming

Supported languages

20 languages
English en
Arabic (Egypt) ar-EG
Arabic (Saudi Arabia) ar-SA
Arabic (United Arab Emirates) ar-AE
Bengali bn
Chinese (Simplified) zh
French fr
German de
Hindi hi
Indonesian id
Italian it
Japanese ja
Korean ko
Portuguese (Brazil) pt-BR
Portuguese (Portugal) pt-PT
Russian ru
Spanish (Mexico) es-MX
Spanish (Spain) es-ES
Turkish tr
Vietnamese vi

Features

Speech to speech

Bidirectional realtime speech-to-speech over WebSocket.

speech_to_speech
Low-latency turn-taking

Natural conversational turn-taking.

turn_taking
Tool use

Integrated tool calling (e.g. web search) during conversation.

tool_use
Input transcription

Optional transcription of input audio, biased by a language hint and key terms.

input_transcription
Configurable reasoning effort

Reasoning can be turned off per session with reasoning.effort none.

reasoning_effort

Code

Language

Realtime speech-to-speech with the OpenAI SDK

Sends question.pcm (24 kHz 16-bit mono PCM) as one turn over the OpenAI Realtime protocol and saves the spoken reply to reply.pcm.

import { once } from "node:events";
import { readFile, writeFile } from "node:fs/promises";
import OpenAI from "openai";
import { OpenAIRealtimeWS } from "openai/realtime/ws";

const client = new OpenAI({
  apiKey: process.env.ALLMODELS_API_KEY,
  baseURL: "https://api.allmodels.io/oai"
});
const realtime = new OpenAIRealtimeWS({ model: "grok-voice-2.0" }, client);
const reply = [];

realtime.on("response.output_audio.delta", ({ delta }) => reply.push(Buffer.from(delta, "base64")));
realtime.on("response.done", async () => {
  await writeFile("reply.pcm", Buffer.concat(reply));
  realtime.close();
});
realtime.on("error", console.error);

if (realtime.socket.readyState !== 1) await once(realtime.socket, "open");
const format = { type: "audio/pcm", rate: 24000 };
realtime.send({
  type: "session.update",
  session: {
    voice: "eve",
    output_modalities: ["audio"],
    turn_detection: { type: null },
    audio: { input: { format }, output: { format } }
  }
});
realtime.send({ type: "input_audio_buffer.append", audio: (await readFile("question.pcm")).toString("base64") });
realtime.send({ type: "input_audio_buffer.commit" });
realtime.send({ type: "response.create" });