Skip to content
Dashboard

Grok TTS

Generate speech with 5 expressive voices, speech tags, and telephony codecs.

index.ts
import { experimental_generateSpeech as generateSpeech } from 'ai';
import { gateway } from '@ai-sdk/gateway';
import { writeFile } from 'node:fs/promises';
const result = await generateSpeech({
model: gateway.speechModel('xai/grok-tts'),
text: 'Hello from the Vercel AI Gateway!',
voice: 'eve',
});
await writeFile('speech.mp3', result.audio.uint8Array);

Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
ZDR
No Training
Release Date
xAI
$15.00/1M chars
03/16/2026