[SpaceXAI](/ai-gateway/models/labs/xai)

# Grok TTS

Grok TTS is SpaceXAI's text-to-speech model with five expressive voices, speech tags, and telephony codec support, available through Vercel AI Gateway. Your use is subject to SpaceXAI's [Terms](https://x.ai/legal/terms-of-service) & [Privacy](https://x.ai/legal/privacy-policy) Policies.

[Use with AI Gateway](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Futm_source%3Dgateway-model-page%26utm_campaign%3Dai-gateway-models&title=Get+Started+with+Vercel+AI+Gateway) [View docs](https://vercel.com/docs/ai-gateway)

```
1import { experimental_generateSpeech as generateSpeech } from 'ai';
2import { gateway } from '@ai-sdk/gateway';
3import { writeFile } from 'node:fs/promises';
4

5const result = await generateSpeech({
6  model: gateway.speechModel('xai/grok-tts'),
7  text: 'Hello from the Vercel AI Gateway!',
8  voice: 'eve',
9});
10

11await writeFile('speech.mp3', result.audio.uint8Array);
```

[Read docs](https://vercel.com/docs/ai-gateway/sdks-and-apis/ai-sdk)

[Overview](/ai-gateway/models/grok-tts) [About](/ai-gateway/models/grok-tts/about) [Providers](/ai-gateway/models/grok-tts/providers) [Similar](/ai-gateway/models/grok-tts/similar) [FAQ](/ai-gateway/models/grok-tts/faq)

## [Copy link to heading](#playground)Playground

Try out Grok TTS by SpaceXAI. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75)Grok TTS

Text

The text the model will read aloud.

Voice

AraEveLeoRexSal

![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=96&q=75)

Your generated audio will appear here

## [Copy link to heading](#providers)Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the [docs](/docs/ai-gateway/provider-options) for more info. Using a provider means you agree to their terms, listed under Legal.

| Provider |
| --- |

| Input | Capabilities | ZDR | No Training | Release Date |  |
| --- | --- | --- | --- | --- | --- |

| ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) [SpaceXAI](/ai-gateway/models/providers/xai) Legal:[Terms](https://x.ai/legal/terms-of-service)•[Privacy](https://x.ai/legal/privacy-policy) | $15/M chars |  |  |  | 03/16/2026 |  |
| --- | --- | --- | --- | --- | --- | --- |

## [Copy link to heading](#more-models-by-spacexai)More models by SpaceXAI

All

Text

Code

| Model |
| --- |

| Context | Latency | Throughput | Input | Output | Cache | Web Search | Capabilities | Providers | ZDR | No Training | Release Date |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |

| ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) [xai/grok-4.6](/ai-gateway/models/grok-4.6) | 500K | 1.3s | 66tps | $2/M+1 more | $6/M+1 more | Read: $0.5/M+1 more Write: — | $5/K \+ input costs | +1 | ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) |  |  | 08/12/2026 |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) [xai/grok-4.5](/ai-gateway/models/grok-4.5) | 500K | 1.5s | 61tps | $2/M+1 more | $6/M+1 more | Read: $0.3/M+1 more Write: — | $5/K \+ input costs | +3 | ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) |  |  | 07/08/2026 |  |
| ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) [xai/grok-4.3](/ai-gateway/models/grok-4.3) | 1M | 0.8s | 139tps | $1.25/M+1 more | $2.50/M+1 more | Read: $0.2/M+1 more Write: — | $5/K \+ input costs | +3 | ![vertex logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fvertex%2520ai.png&w=48&q=75) ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) |  |  | 04/30/2026 |  |
| ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) [xai/grok-4.20-non-reasoning](/ai-gateway/models/grok-4.20-non-reasoning) | 2M | 0.4s | 82tps | $1.25/M+1 more | $2.50/M+1 more | Read: $0.2/M+1 more Write: — | $5/K \+ input costs | +2 | ![vertex logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fvertex%2520ai.png&w=48&q=75) ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) |  |  | 03/10/2026 |  |
| ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) [xai/grok-4.1-fast-reasoning](/ai-gateway/models/grok-4.1-fast-reasoning) | 1M | 0.8s | 187tps | $0.20/M | $0.50/M | Read:$0.05/M Write:— | — | +2 | ![vertex logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fvertex%2520ai.png&w=48&q=75) |  |  | 11/19/2025 |  |
| ![xai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fxai.png&w=48&q=75) [xai/grok-4.1-fast-non-reasoning](/ai-gateway/models/grok-4.1-fast-non-reasoning) | 1M | 0.4s | 179tps | $0.20/M | $0.50/M | Read:$0.05/M Write:— | — | +1 | ![vertex logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fvertex%2520ai.png&w=48&q=75) |  |  | 11/19/2025 |  |

## [Copy link to heading](#about-grok-tts)About Grok TTS

Grok TTS is SpaceXAI's text-to-speech model, released March 16, 2026 and available through AI Gateway. Five expressive voices cover different tones and characters. Speech tags give you control over expression and delivery, and telephony codec support makes Grok TTS a fit for phone systems and IVR flows. Text to speech through AI Gateway is in beta, so access is rolling out gradually.

Integration uses the AI SDK's `experimental_generateSpeech` function, available on the canary releases of the AI SDK. Set the `voice`, such as `eve`, and an `outputFormat` like `mp3` or `wav`. Optional `instructions`, `speed`, and `language` settings adjust how the speech sounds. Unsupported options surface in `warnings` on the result instead of failing the request. A REST endpoint returns base64-encoded audio if you're not using the AI SDK.

Billing is per input character, so cost scales with the length of the text you synthesize. See the pricing panel on this page for current rates. For live conversation, `grok-voice-think-fast-1.0` streams speech both ways, and `grok-stt` covers the transcription direction.

## [Copy link to heading](#what-to-consider-when-choosing-a-provider)What To Consider When Choosing a Provider

- Configuration: Audio returns base64-encoded in a single response through AI Gateway. Streaming audio output isn't supported, so progressive playback needs buffering on your side. Billing is per input character, and long documents scale cost linearly with text length.
- Configuration: Text to speech is in beta, and AI SDK support ships on canary releases. Voice and option support can vary, and unsupported options come back as warnings rather than errors, so check `result.warnings` during development.
- Zero Data Retention: Zero Data Retention is offered on a per-provider and model basis. See the [documentation](https://vercel.com/docs/ai-gateway/security-and-compliance/zdr) for details.
- Authentication: AI Gateway authenticates requests using an [API key](https://vercel.com/docs/ai-gateway/authentication-and-byok#api-key-authentication) or [OIDC token](https://vercel.com/docs/ai-gateway/authentication-and-byok#oidc-token-authentication). You do not need to manage provider credentials directly.

## [Copy link to heading](#when-to-use-grok-tts)When to Use Grok TTS

### Best for

- Voiceovers and Narration: Convert articles, scripts, or docs into spoken audio files
- Telephony and IVR Audio: Codec support targets phone-system playback paths
- Expressive Delivery Control: Five voices plus speech tags shape tone and delivery
- Spoken App Responses: Generate audio replies from a server route with one call

### Consider alternatives when

- Two-Way Voice Sessions: `grok-voice-think-fast-1.0` streams speech in and out in real time
- Audio Transcription: `grok-stt` converts recorded audio into text instead
- Streamed Audio Playback: AI Gateway returns complete audio files rather than progressive streams

## [Copy link to heading](#conclusion)Conclusion

Grok TTS turns text into expressive spoken audio through AI Gateway. Five voices, speech tags, and telephony codec support cover narration, app responses, and phone systems. Call the AI SDK's `generateSpeech` function with a voice and output format, and check current per-character rates on this page.