xAI

Use xAI for text-to-speech in Vapi.

xAI provides text-to-speech for Vapi voice agents.

You can use xAI through Vapi’s default integration, or connect your own account in Integrations.

Supported capability

CapabilityProvider value
Text-to-speechxai

Text-to-speech

Set voice.provider to xai and choose one of the five voices Vapi currently supports. The language and speed fields are optional.

$curl -X PATCH "https://api.vapi.ai/assistant/ASSISTANT_ID" \
> -H "Authorization: Bearer $VAPI_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "voice": {
> "provider": "xai",
> "voiceId": "eve",
> "language": "en",
> "speed": 1.1
> }
> }'

For additional API configuration options, review the XaiVoice fields in the Create Assistant API reference.

VoiceVoice ID
Eveeve
Araara
Rexrex
Salsal
Leoleo

Voice options

FieldRequiredVapi defaultDescription
voiceIdYesNoneOne of the built-in voice IDs above.
languageNoenA supported BCP-47 language code, or auto for automatic detection.
speedNo1.1Speech-speed multiplier from 0.7 to 1.5. xAI’s direct API defaults to 1.0.
cachingEnabledNotrueWhether Vapi may cache synthesized audio.

Supported languages

LanguageLanguage code
Automatic detectionauto
Englishen
Arabic (Egypt)ar-EG
Arabic (Saudi Arabia)ar-SA
Arabic (United Arab Emirates)ar-AE
Bengalibn
Chinese (Simplified)zh
Frenchfr
Germande
Hindihi
Indonesianid
Italianit
Japaneseja
Koreanko
Portuguese (Brazil)pt-BR
Portuguese (Portugal)pt-PT
Russianru
Spanish (Mexico)es-MX
Spanish (Spain)es-ES
Turkishtr
Vietnamesevi