Audio API Reference
Generate natural-sounding speech from text (TTS) and transcribe audio to text (STT) using OpenAI’s Whisper model. Both endpoints follow the OpenAI Audio API format.Text-to-Speech (TTS)
Convert text into lifelike spoken audio.Endpoint
Request Body
Supported Voices
Supported Formats
Models
Request Examples
cURL
JavaScript
Python
Response
Returns binary audio data with these headers:Speech-to-Text (Transcription)
Transcribe audio files into text using OpenAI’s Whisper model.Endpoint
Request Body (multipart/form-data)
Supported Audio Formats
- MP3 (
.mp3) - MP4 (
.mp4,.m4a) - MPEG (
.mpeg,.mpga) - WAV (
.wav) - WebM (
.webm) - OGG (
.ogg) - FLAC (
.flac)
Response Formats
Pricing
Request Examples
cURL
JavaScript
Python
Response (JSON format)
Response (verbose_json format)
Error Responses
400 Bad Request
400 File Too Large
400 Unsupported Format
Rate Limits
Related Endpoints
- Chat API - Text generation with audio input support
- Image Generation - Generate images
- Video Generation - Generate video content