Audio

Convert text to speech and transcribe audio with OpenAI-compatible endpoints.

Text-to-Speech

Endpoint

POST/v1/audio/speech

Parameters

modelstringrequired
TTS model ID: tts-1 or gpt-4o-mini-tts
inputstringrequired
Text to convert to speech. Max 4096 characters.
voicestringrequired
Voice to use: alloy, echo, fable, onyx, nova, shimmer
response_formatstring
mp3, opus, aac, flac. Default: mp3
speednumber
Speed multiplier from 0.25 to 4.0. Default: 1.0

Example

curl https://api.aetherapi.dev/v1/audio/speech \
  -H "Authorization: Bearer sk-aetherapi-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tts-1",
    "input": "Hello, welcome to Aether API!",
    "voice": "alloy"
  }' \
  --output speech.mp3

Output

The response is raw audio bytes with Content-Type: audio/mpeg. Save it directly to a file.

Speech-to-Text

Endpoint

POST/v1/audio/transcriptions

Parameters

filefilerequired
Audio file to transcribe. mp3, mp4, mpeg, mpga, m4a, wav, or webm.
modelstringrequired
Transcription model: whisper-1, gpt-4o-transcribe, gpt-4o-mini-transcribe
languagestring
Language of the audio in ISO-639-1 format.
promptstring
Optional prompt to guide the transcription.
response_formatstring
json, text, srt, verbose_json, vtt. Default: json
temperaturenumber
Sampling temperature from 0 to 1. Default: 0

Example

curl https://api.aetherapi.dev/v1/audio/transcriptions \
  -H "Authorization: Bearer sk-aetherapi-..." \
  -F "file=@/path/to/audio.mp3" \
  -F "model=whisper-1" \
  -F "language=en"

Supported audio models