Skip to content
Dashboard

Grok TTS

Grok TTS is xAI's text-to-speech model with five expressive voices, speech tags, and telephony codec support, available through Vercel AI Gateway.

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);

About Grok TTS

Grok TTS is xAI'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.