Grok TTS API reference
71 voices across 20 languages with speech tags
Call Grok TTS from your own code with one PopNow API key. Below are the exact model IDs to send, every input field the model accepts, what each request costs in credits, and a request you can paste into a terminal.
At a glance
- Made by
- xAI
- Output
- Audio
- From
- 2.7 credits per 1,000 characters ($0.027)
- Model IDs
1 credit = $0.01. A task holds the highest possible charge when it is accepted and settles the real amount when it finishes, rounded up to whole credits; failed tasks are not charged. Ask POST /api/v1/jobs/quote for the exact figure before you run.
Text to Speech
xai/grok-tts/text-to-speech
Price
| Option | Credits (per 1,000 characters) | US dollars |
|---|---|---|
Default | 2.7 | $0.027 |
Parameters
| Field | Type | Default | Allowed | What it does |
|---|---|---|---|---|
textRequired | string | — | up to 15,000 characters | The words to be spoken, with optional speech tags such as [laugh] or <whisper>…</whisper>. Billed per 1,000 characters, tags included. |
voice_idOptional | string | eve | ara, eve, leo, rex, sal, jpi39icg, d18jlf6v, 33g9t0jl, 26w6ihxi, dr8gqysu, wy0m9l5w, om17cury, x7avnu1k, bcs7l2c3, … (+57) | Preset voice. Eve, Ara, Leo, Rex and Sal speak every supported language; the others are tuned for one language. |
languageOptional | string | auto | auto, en, zh, ar-EG, ar-SA, ar-AE, bn, fr, de, hi, id, it, ja, ko, … (+7) | Reading language, or auto to detect it from the text. |
speedOptional | number | 1 | 0.7 to 1.5 | Speaking speed from 0.7 (slower) to 1.5 (faster). |
output_formatOptional | string | mp3 | mp3, wav, pcm, mulaw, alaw | Audio encoding. pcm, mulaw and alaw are raw streams without a file header, for phone systems. |
sample_rateOptional | integer | 24000 | 8000, 16000, 22050, 24000, 44100, 48000 | Sample rate in Hz. 8000 for phone lines, 44100 or 48000 for studio work. |
bitrateOptional | integer | 128000 | 32000, 64000, 96000, 128000, 192000 | MP3 bit rate in bits per second. Only applies to mp3. |
text_normalizationOptional | boolean | false | — | Rewrite numbers, abbreviations and symbols as spoken words before reading. |
optimize_streaming_latencyOptional | integer | 0 | 0, 1, 2 | Streaming latency level: 0 best quality, 1 smaller first chunk, 2 smallest first chunk with more quality trade-off at chunk boundaries. |
Example request
This request runs as it is; any field you leave out uses its default. Put your key in POPNOW_API_KEY first.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "xai/grok-tts/text-to-speech",
"input": {
"text": "Hi there! This voice was created with the PopNow API in just a few seconds."
}
}'The response carries a taskId straight away. Read the result with GET /api/v1/jobs/recordInfo, or add callBackUrl to be notified.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
