OpenAI TTS
Text-to-Speechby OpenAI
OpenAI's TTS API with natural-sounding voices, real-time streaming, and multiple quality tiers.
Registration & API Key Steps
Pricing
| Tier | Price | Features |
|---|---|---|
| TTS Standard | $15.00 / 1M characters | Good quality, Low latency, Streaming, 13 voices |
| TTS HD | $30.00 / 1M characters | Premium quality, Higher fidelity, Professional content |
| GPT-4o Mini TTS | $0.60/1M input + $12/1M output tokens | ~$0.015/min, Controllable expressions, Advanced features |
Application Tips
Stream for Low Latency
Use streaming endpoint to play audio before full generation. Great for real-time apps.
Choose Voice Wisely
"nova"/"shimmer" more feminine, "onyx"/"echo" more masculine, "alloy" neutral.
China Access Solutions
API Proxy
Use same OpenAI proxy services.
Code Example
import OpenAI from 'openai';
import fs from 'fs';
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
async function generateSpeech() {
const mp3 = await openai.audio.speech.create({
model: 'tts-1-hd',
voice: 'nova',
input: 'Welcome to our platform powered by AI.',
response_format: 'mp3',
speed: 1.0,
});
const buffer = Buffer.from(await mp3.arrayBuffer());
fs.writeFileSync('speech.mp3', buffer);
}
generateSpeech();Rate Limits
| Tier | Limits |
|---|---|
| Tier 1 | 50 RPM |
| Tier 3+ | 500+ RPM |
Recommended Use Cases
Related API Guides
OpenAI GPT-4o / GPT-4.1 / o3
OpenAI
OpenAI's flagship LLM family including GPT-4o for multimodal tasks, GPT-4.1 for long-context coding, and o3 for advanced reasoning. Industry-leading models with the largest developer ecosystem.
Anthropic Claude (Sonnet 4.5 / Opus 4.5)
Anthropic
Anthropic's Claude model family excels in nuanced reasoning, safety, and long-context tasks. Claude Sonnet 4.5 offers the best balance of cost and performance, while Opus 4.5 delivers frontier intelligence.
Google Gemini (2.5 Pro / 2.5 Flash)
Google's Gemini models offer a generous free tier, 1M token context window, and strong multimodal capabilities. Gemini 2.5 Pro leads in reasoning, while Flash models provide cost-effective alternatives.
Meta Llama 4 (Scout / Maverick)
Meta
Meta's open-source Llama 4 models are free to use and available through multiple cloud providers. Llama 4 Scout and Maverick offer competitive performance at extremely low cost through partner APIs.