# TTS-1 HD

TTS-1 HD is the text-to-speech model to use when the audio is the deliverable. Generation takes longer than `tts-1`, and the output sounds noticeably more produced.

- **Model ID:** `openai/tts-1-hd`
- **Type:** speech
- **Providers:** openai
- **Context window:** Not applicable
- **Maximum output tokens:** 0
- **Pricing:** $30/1M input tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/tts-1-hd

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```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-hd'),
  text: 'Hello from the Vercel AI Gateway!',
  voice: 'alloy',
});

await writeFile('speech.mp3', result.audio.uint8Array);
```

## About

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

Audio support on AI Gateway is in beta. Speech generation runs through the AI SDK's `generateSpeech` function with a text string, a voice, and an output format. For interactive features where response time shapes the experience, `tts-1` is the faster sibling; reserve TTS-1 HD for audio users will listen to more than once.

## When to use

### Best For

- Narration for videos, courses, and product walkthroughs
- Podcast-style or long-form audio generated from written content
- Pre-rendered voice lines in apps and games where quality is audible
- Any produced audio users will replay, where polish justifies the wait

### Consider Alternatives When

- Responses are generated live and latency shapes the experience; `tts-1` is built for real-time use
- You need live two-way conversation; the gpt-realtime family handles speech-to-speech directly
- Cost per character dominates at very high volume and `tts-1` quality is sufficient

## 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

- **Live generated responses:** `tts-1` is 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-1` keeps per-character costs lower when its quality is sufficient

## Frequently asked questions

### How do I generate speech with TTS-1 HD 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.

### 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`, and `shimmer`. 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.

## Links

- [Model page](https://vercel.com/ai-gateway/models/tts-1-hd)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://developers.openai.com/api/docs/models/tts-1-hd)
