Skip to content
models / xAI / Grok Voice

Grok Voice

audioxai/grok-voice realtime voiceZDR supported

xAI's real-time voice conversation model with low-latency audio input and output streaming.

$0.05list priceper minute of voice session
pricing
unitlist price
per text message$0.004
per minute of voice session$0.05

Everyone pays the list price. What comes back grows with your Reward Status: Noob 0.5% of every spend buys back $INFX, Pro (hold 1,337 $INFX) 2%, Elite (also hold 1,337 $XAVA) 5%. How it works

realtime websocket (node)
import WebSocket from "ws";

const ws = new WebSocket("wss://xavainf.com/v1/realtime?model=xai/grok-voice", "realtime", {
  headers: { Authorization: `Bearer ${process.env.XINF_API_KEY}` },
});
ws.on("open", () => {
  ws.send(JSON.stringify({ type: "session.update", session: {
    voice: "ara", instructions: "Be brief.",
    turn_detection: { type: "server_vad" },
    audio: { input: { format: { type: "audio/pcm", rate: 24000 } }, output: { format: { type: "audio/pcm", rate: 24000 } } },
  } }));
  // stream microphone audio: base64 PCM16, 24 kHz mono
  // ws.send(JSON.stringify({ type: "input_audio_buffer.append", audio: chunk.toString("base64") }));
});
ws.on("message", (raw) => {
  const e = JSON.parse(raw.toString());
  if (e.type === "response.output_audio.delta") play(Buffer.from(e.delta, "base64"));
  if (e.type === "response.output_audio_transcript.delta") process.stdout.write(e.delta);
  if (e.type === "billing.updated") console.log("\nsession cost $" + e.session.cost_usd);
});
voices5

5 voices. Pass one as voice in the session's session.update. All of them: GET /v1/voices?model=xai/grok-voice.

Araara · Warm
Eveeve · Energetic
Leoleo · Authoritative
Rexrex · Confident
Salsal · Balanced
limits
providerxAI
typeaudio
context window—
max output—
prompt storagenone
provider retentionnone ZDR supported
livesoon
requests 24h—
p50 latency—
uptime 7d—