VOICE / pick-built-in-voices-for-grok-voice-api

Voice

Pick a built-in voice for the Grok Voice API

Pick a built-in voice for the Grok Voice API

Speech to Speech and Text to Speech share the same built-in roster. Official Voice docs list five voices; eve is the default when you omit voice / voice_id.

Voice id Type Tone Doc note
eve Female Energetic, upbeat Default; engaging
ara Female Warm, friendly Balanced, conversational
rex Male Confident, clear Professional / business
sal Neutral Smooth, balanced Versatile
leo Male Authoritative, strong Instructional

List the live catalog (and any custom clones) with GET https://api.x.ai/v1/tts/voices.

Speech to Speech

Set session.voice on session.update after you open wss://api.x.ai/v1/realtime?model=grok-voice-latest:

await ws.send(json.dumps({
    "type": "session.update",
    "session": {
        "voice": "ara",
        "instructions": "You are a helpful assistant.",
        "turn_detection": {"type": "server_vad"}
    }
}))

Use a built-in id (eve, ara, rex, sal, leo) or a custom voice id from Create a custom voice.

Text to Speech

Pass voice_id on POST https://api.x.ai/v1/tts (language is required):

curl -X POST https://api.x.ai/v1/tts \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Welcome to xAI.","voice_id":"rex","language":"en"}' \
  --output welcome.mp3

Full unary TTS steps: Convert text to speech with the Voice API. Session bootstrap: Start a speech-to-speech session.

Pitfalls

  • Unknown voice_id returns 404 — list voices first.
  • Consumer Voice Mode on the phone apps is a different surface from this API roster; this page is the API path only.
  • Do not put your API key in a browser page; mint an ephemeral token for client-side realtime: Mint an ephemeral token for voice.