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.
- Input price
- Input $30, Per 1M characters
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);Copy link to headingPlayground
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
Copy link to headingProviders
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 |
|---|
Copy link to headingAbout 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.
Copy link to headingWhat 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: Zero Data Retention is offered on a per-provider and model basis. See the documentation for details.
- Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.
Copy link to headingWhen 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
Copy link to headingConclusion
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.
Copy link to headingFrequently Asked Questions
How do I generate speech with TTS-1 HD through AI Gateway?
Use the AI SDK's
generateSpeechfunction from theaipackage 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.How does TTS-1 HD differ from tts-1?
TTS-1 HD is optimized for audio quality and produces more human-like speech, at the cost of slower generation. TTS-1 is optimized for real-time use. Voices, formats, and the API surface are the same.
What voices and formats does TTS-1 HD support?
Voices include
alloy,echo,fable,onyx,nova, andshimmer. Output formats cover MP3, Opus, AAC, and FLAC, and playback speed is adjustable from 0.25x to 4x.Is TTS-1 HD suitable for interactive voice responses?
Usually not. Interactive features feel better with
tts-1, which generates faster. Choose TTS-1 HD when users will listen to the audio more than once and quality is audible.How is TTS-1 HD 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 HD 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.