TTS-1 HD
TTS-1 HD is the quality-optimized variant of OpenAI's text-to-speech family, generating more polished, natural-sounding audio than tts-1 for narration and produced content.
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-hd'), text: 'Hello from the Vercel AI Gateway!', voice: 'alloy',});
await writeFile('speech.mp3', result.audio.uint8Array);Playground
Try out TTS-1 HD by OpenAI. 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.
Your generated audio will appear here
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 |
|---|
More models by OpenAI
| Model |
|---|
About TTS-1 HD
TTS-1 HD debuted on November 6, 2023 at OpenAI's first DevDay as the high-definition counterpart to tts-1. The two models share the same interface and voices; the difference is the optimization target. tts-1 favors real-time latency, while TTS-1 HD favors audio quality, producing more human-like speech in exchange for slower generation.
The voice lineup includes alloy, echo, fable, onyx, nova, and shimmer. Output formats cover MP3, Opus, AAC, and FLAC, with FLAC useful when the audio feeds a post-production pipeline. Playback speed is adjustable from 0.25x to 4x. Pricing is per character of input text.
Through AI Gateway, TTS-1 HD runs behind the same key, observability, and spend controls as the rest of your models. Call the AI SDK's generateSpeech function with this model's slug and store or serve the returned audio.
What To Consider When Choosing a Provider
- Configuration: Audio support on AI Gateway is in beta. Speech generation runs through the AI SDK's
generateSpeechfunction with a text string, a voice, and an output format. For interactive features where response time shapes the experience,tts-1is the faster sibling; reserve TTS-1 HD for audio users will listen to more than once. - Zero Data Retention: AI Gateway does not currently support Zero Data Retention for this model. See the documentation for models that support ZDR.
- Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.
When to Use TTS-1 HD
Best for
- Video and course narration: Polished speech for content users watch and rewatch
- Long-form audio content: Podcast-style output generated from written material
- Pre-rendered voice lines: App and game audio produced ahead of time
- Replayable produced audio: Deliverables where quality justifies slower generation
Consider alternatives when
- Live generated responses:
tts-1is optimized for real-time use where latency shapes the experience - Two-way voice conversation: The gpt-realtime family handles live speech-to-speech directly
- Volume-driven budgets:
tts-1keeps per-character costs lower when its quality is sufficient
Conclusion
TTS-1 HD closes the gap between generated speech and produced audio. Route narration and replayable content through TTS-1 HD on AI Gateway, and keep tts-1 for the interactive paths where speed wins.