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

Documentation Index

Fetch the complete documentation index at: https://docs.liandanxia.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
string
required
Example:

"tts-1"

input
string
required

See endpoint details.

Maximum string length: 4096
voice
enum<string>
required
Available options:
alloy,
echo,
fable,
onyx,
nova,
shimmer
response_format
enum<string>
default:mp3
Available options:
mp3,
opus,
aac,
flac,
wav,
pcm
speed
number
default:1
Required range: 0.25 <= x <= 4

Response

200 - audio/mpeg

See endpoint details.

The response is of type file.