Skip to content
Dashboard

TTS-1

TTS-1 is OpenAI's text-to-speech model optimized for real-time use, converting text into natural-sounding audio across built-in voices and multiple output formats at low latency.

Speech
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('openai/tts-1'),
text: 'Hello from the Vercel AI Gateway!',
voice: 'alloy',
});
await writeFile('speech.mp3', result.audio.uint8Array);

Frequently Asked Questions

  • How do I generate speech with TTS-1 through AI Gateway?

    Use the AI SDK's generateSpeech function from the ai package with this model's slug, your text, and a voice. Audio support on AI Gateway is in beta. Authenticate with an AI Gateway API key or OIDC token.

  • What voices does TTS-1 offer?

    Built-in voices include alloy, echo, fable, onyx, nova, and shimmer. Each has a distinct character, so test a few against your product's tone before shipping.

  • What output formats does TTS-1 support?

    MP3, Opus, AAC, and FLAC. Opus suits low-bandwidth streaming contexts, AAC targets broad device compatibility, and FLAC is lossless for post-processing pipelines.

  • How does TTS-1 differ from tts-1-hd?

    TTS-1 is optimized for real-time use and lower latency. TTS-1 HD is optimized for audio quality and suits narration or produced content where generation time is less important.

  • How is TTS-1 priced?

    Speech generation is billed by characters of input text. Current rates are listed on this page and update when providers change list prices.

  • Does TTS-1 support zero data retention through AI Gateway?

    Zero Data Retention is not currently available for this model. Zero Data Retention is offered on a per-provider basis. See https://vercel.com/docs/ai-gateway/capabilities/zdr for details.

  • What are typical latency characteristics?

    This page shows live performance metrics measured across real AI Gateway traffic.