Skip to main content
POST
/
v1
/
audio
/
speech
Create Speech
curl --request POST \
  --url https://api.dedaluslabs.ai/v1/audio/speech \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": "<string>",
  "voice": "alloy",
  "instructions": "<string>",
  "response_format": "mp3",
  "speed": 1,
  "stream_format": "sse"
}
'
"<string>"

Authorizations

Authorization
string
header
required

API key authentication using Bearer token

Body

application/json

Request to generate audio from text.

model
string
required

One of the available TTS models: openai/tts-1, openai/tts-1-hd or openai/gpt-4o-mini-tts.

Examples:

"openai/tts-1"

"openai/tts-1-hd"

input
string
required

The text to generate audio for. The maximum length is 4096 characters.

Example:

"Hello, how are you today?"

voice
enum<string>
required

The voice to use when generating the audio. Supported voices are alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer, and verse. Previews of the voices are available in the Text to speech guide.

Available options:
alloy,
ash,
ballad,
coral,
echo,
fable,
onyx,
nova,
sage,
shimmer,
verse
Examples:

"alloy"

"nova"

instructions
string | null

Control the voice of your generated audio with additional instructions. Does not work with tts-1 or tts-1-hd.

response_format
enum<string> | null

The format to audio in. Supported formats are mp3, opus, aac, flac, wav, and pcm.

Available options:
mp3,
opus,
aac,
flac,
wav,
pcm
Example:

"mp3"

speed
number | null

The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default.

Required range: 0.25 <= x <= 4
Example:

1

stream_format
enum<string> | null

The format to stream the audio in. Supported formats are sse and audio. sse is not supported for tts-1 or tts-1-hd.

Available options:
sse,
audio
Example:

"sse"

Response

Audio file stream

The response is of type file.