Skip to main content
POST
/
v1
/
audio
/
speech
Create speech
curl --request POST \
  --url https://api.naga.ac/v1/audio/speech \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": "<string>",
  "voice": "<string>"
}
'
"<string>"

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.