Skip to main content
POST
/
v1
/
audio
/
speech
Create speech
curl --request POST \
  --url http://localhost:8080/v1/audio/speech \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": "<string>",
  "voice": "<string>",
  "fallbacks": [
    "<string>"
  ],
  "stream_format": "sse",
  "instructions": "<string>",
  "response_format": "mp3",
  "speed": 2.125,
  "language_code": "<string>",
  "pronunciation_dictionary_locators": [
    {
      "pronunciation_dictionary_id": "<string>",
      "version_id": "<string>"
    }
  ],
  "enable_logging": true,
  "optimize_streaming_latency": true,
  "with_timestamps": true
}
'
"<string>"

Body

application/json
model
string
required

Model in provider/model format

input
string
required

Text to convert to speech

voice
required
fallbacks
string[]
stream_format
enum<string>

Set to "sse" to enable streaming

Available options:
sse
instructions
string
response_format
enum<string>
Available options:
mp3,
opus,
aac,
flac,
wav,
pcm
speed
number
Required range: 0.25 <= x <= 4
language_code
string
pronunciation_dictionary_locators
object[]
enable_logging
boolean
optimize_streaming_latency
boolean
with_timestamps
boolean

Response

Successful response

The response is of type file.