/v1/audio/speech with the
same API key, rate limits, wallet, and spend caps as every other route. Two layers of voices are
available:
- Built-in voices — 26 xAI voices usable by any caller, no org gate required.
- Custom voices — clones of consented speakers, owned and namespaced by your organization (org-gated, xAI Enterprise contract required).
Custom voices are available on request. The full CRUD surface (
POST /v1/custom-voices and
all /v1/custom-voices/{voiceId} routes) requires the customVoicesEnabled org gate to be on
for your organization and an xAI Enterprise contract on the platform. Contact your AI Reserve
representative to enable both. Until enabled, custom-voice endpoints return 403.Speech synthesis (POST /v1/audio/speech) with built-in voices is available to any org.
Custom voices additionally require customVoicesEnabled.Built-in voices
GET /v1/voices returns the live catalog of voices you can pass as voice in any TTS or
realtime session call. No org gate — available to every caller.
{ "voices": [ { "voice_id": "ara", "name": "Ara", "language": "en", "gender": "female" }, … ] }. The server caches the catalog for 5 minutes and serves a stale list during
brief upstream outages rather than returning an error — the list changes rarely.
Use GET /v1/voices for the current catalog. Catalog additions are enabled on synthesis surfaces
after AI Reserve verifies and deploys them; ara is the default voice.
Text-to-speech synthesis
POST /v1/audio/speech synthesizes speech from text. The call is synchronous — the full audio
is returned in one response body. The response Content-Type is audio/mpeg.
Parameters
Quickstart
Billing
Billed per Unicode code point ininput at the published grok-tts rate ($15 / 1 M
characters). The character count is known before synthesis begins, so the wallet reservation
equals the settlement amount — no post-call adjustment.
Limits and notes
- Input length: max 4,096 code points per request. For longer text, split at sentence boundaries and concatenate the returned audio on your side.
- Output format: only MP3 (
audio/mpeg) in this release. Streaming TTS is deferred — see Deferred features. - Request timeout: 120 seconds. Long inputs near the 4,096-character ceiling may take tens of seconds; set your HTTP client timeout accordingly.
- Auth requirement: a client-scoped API key is required (personal keys without org context
are rejected with
403).
Custom voices
Custom voices are speaker clones your organization creates from reference audio. Once created, a custom voice ID can be used anywhere a built-in voice ID is accepted:POST /v1/audio/speech
and POST /v1/realtime/sessions.
Requirements
Reference audio recommendations
The quality of the clone depends heavily on the recording:- Format: single-speaker mono WAV at 24 kHz
- Duration: 90–120 seconds produces the best results; at least 30 seconds is recommended
- Environment: quiet room, no background music, minimal noise
- Upload limit: 31 MB (bounds a 120-second uncompressed WAV with multipart overhead)
- Duration ceiling: 120 seconds (enforced upstream by xAI)
Create a custom voice
POST /v1/custom-voices is multipart/form-data. Required fields are name, language,
file, and consent_attestation=true.
201 with the voice object including voice_id — an 8-character
lowercase alphanumeric ID assigned by xAI.
Optional metadata fields: description (free text), gender (male / female /
neutral), accent, age (young / middle-aged / old), use_case
(conversational / narration / characters / educational / advertisement /
social_media / entertainment), tone (warm / casual / professional / friendly /
authoritative / expressive / calm).
Manage custom voices
Tenant isolation
Every custom voice lives on the platform’s single xAI team — xAI cannot separate one organization’s voices from another’s at the team level. AI Reserve enforces tenant isolation through an ownership map: every id-addressed operation checks that the voice is owned by the calling organization. A voice ID owned by a different organization returns404 — the same
response as a nonexistent ID. Voice existence is never confirmed cross-tenant.
Capacity
xAI currently limits the shared upstream team to 30 live custom voices. Delete an unused voice or contact support whenPOST /v1/custom-voices returns 409; the API does not expose
other organizations or their usage of the shared capacity.
Data handling
Reference audio uploaded to create a custom voice is transmitted to xAI, which builds and stores the resulting voice model. AI Reserve stores only the ownership record and consent attestation — no reference audio is retained by AI Reserve. See the provider data handling page for details.Click-to-copy snippets in the portal
The AI Reserve portal’s Voice workspace surfaces the same API operations with a click-to-copy UI: browse the catalog, preview voices, manage your organization’s custom voices, and copy the exact code snippet for any operation. The portal snippets match the endpoints documented here — there is no separate portal-only API.Deferred features
The following are not available in this release:- Streaming TTS: real-time audio streaming from text input. Use
POST /v1/realtime/sessions(speech-to-speech) for live voice sessions. - Standalone speech-to-text: transcription-only calls without synthesis.
See
POST /v1/audio/transcriptionsfor the existing OpenAI-compatible transcription endpoint. - SIP / telephony integration: direct PSTN or SIP dial-in/dial-out.
- Tool calling over TTS: function calling is not available on the
grok-ttssurface.