Skip to content

Speech

POST
/v1/audio/speech
curl --request POST \
--url https://example.com/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "input": "example", "model": "example", "voice": "example", "response_format": "wav", "speed": 1, "stream": true }'
Media typeapplication/json
SpeechRequest

OpenAI /v1/audio/speech-compatible; unknown fields pass through.

voice is a Nairon agent_voices id or name — resolved by the route handler to a provider-specific voice parameter, so it (like model) is excluded from the verbatim passthrough and re-added explicitly.

object
input
required
Input
string
>= 1 characters
model
Any of:
string
voice
Any of:
string
response_format
Response Format
string
default: wav
speed
Any of:
number
stream
Stream
boolean
default: true
key
additional properties
any

Successful Response

Media typeapplication/json
Examplegenerated
example

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}