Grok Voice Think Fast 2.0
Model id: x-ai/grok-voice-think-fast-2.0. API reference for Grok Voice Think Fast 2.0: request schema and code examples.
xAI's voice agent model. It speaks the OpenAI Realtime event names with xAI's own session shape and is billed by session duration; x-ai/grok-voice-latest and grok-voice-latest always open a session on x-ai/grok-voice-think-fast-2.0.
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 xAI realtime voice protocol. Client events, billing, limits and errors are described in Realtime Sessions.
Connection URL
wss://api.aimlapi.com/v1/realtime?model=x-ai/grok-voice-think-fast-2.0
Authentication
Server: Authorization: Bearer <YOUR_AIMLAPI_KEY>. Browser: subprotocols realtime and openai-insecure-api-key.<client secret> (client secrets)
Session options (session.update):
instructions
Up to 16,384 characters
voice
Built-in voices (case-insensitive): eve, ara, leo, rex, sal, carina, zagan, helix, orion, luna, iris, altair, zenith, perseus, helios, lux, kepler, rigel, cosmo, celeste, ursa, sirius, lumen, castor, naksh, atlas
turn_detection
{"type": "server_vad"}, optionally with idle_timeout_ms (1,000 – 600,000)
reasoning.effort
high or none
replace
Up to 100 pronunciation replacements, for example {"Acme Mobile": "Acme Mobull"}
audio.input.format, audio.output.format
type: audio/pcm, audio/pcmu, audio/pcma, audio/opus; rate: 8000, 11025, 16000, 22050, 24000, 32000, 44100 or 48000
audio.input.transport, audio.output.transport
json (base64 in events) or binary (raw audio in binary WebSocket frames)
audio.input.transcription
language_hint, up to 100 keyterms
audio.output.speed
0.7 – 1.5
tools
Up to 32 function tools in xAI's shape: {"type": "function", "function": {"name", "description", "parameters"}}
Code Example
Last updated
Was this helpful?