Skip to content
youbot
Docs menu

Audio models

Grok TTS

On this page

xAI's Grok text-to-speech — turn a script of up to 60,000 characters into natural speech in 26 voices and 20+ languages, with inline speech tags like [laugh] and <whisper> for expressive delivery.

modelIdgrok-tts
Modalitymusic
PricingSee this model on the Pricing page for the current per-call price (with your markup).

Operations

OperationmodelIdEndpointRequired input
Defaultgrok-ttsPOST /api/v1/generatetext, voice_id, language
Poll task—GET /api/v1/task/{id}?model=grok-tts—

Input parameters

FieldTypeRequiredValues / example
textstringYesUp to 60,000 characters. Add speech tags for delivery, e.g. [pause], [laugh], <whisper>…</whisper>. Billed per character. Max 60000 characters. (example: Welcome to you.bot. [pause] This voice was generated by Grok text-to-speech.)
voice_idstringYesOptions: eve | ara | leo | rex | sal | atlas | altair | carina | castor | celeste | cosmo | helios | helix | iris | kepler | lumen | luna | lux | naksh | orion | perseus | rigel | sirius | ursa | zagan | zenith (default: eve)
languagestringYesAuto-detect reads the language from the text. Any voice can speak any language. (options: auto | en | ar-EG | ar-SA | ar-AE | bn | zh | fr | de | hi | id | it | ja | ko | pt-BR | pt-PT | ru | es-MX | es-ES | tr | vi) (default: auto)
speednumberNo1.0 is normal speed. Lower is slower, higher is faster. (range 0.7-1.5) (default: 1)
formatstringNoOptions: mp3 | wav (default: mp3)

Example request

bash
curl -X POST https://you.bot/api/v1/generate \
  -H "Authorization: Bearer $YOUBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"modelId":"grok-tts","input":{"text":"Welcome to you.bot. [pause] This voice was generated by Grok text-to-speech.","voice_id":"eve","language":"auto","speed":1,"format":"mp3"}}'