Skip to main content
POST
Create speech

Authorizations

Authorization
string
header
required

Primary authentication for inference endpoints. Send your Naga API key as Authorization: Bearer <api-key>.

Body

application/json
model
string
required

Text-to-speech model identifier.

Example:

"gpt-4o-mini-tts"

input
string
required

Text to synthesize into speech audio.

Maximum string length: 32768
voice
string
required

Voice preset to synthesize with.

Example:

"alloy"

speed
number

Optional playback speed multiplier.

instructions
string
response_format
enum<string> | null
Available options:
mp3,
opus,
aac,
flac,
wav,
pcm

Response

Generated audio stream.

The response is of type file.