Jiniu AIJiniu AI
Docs
AudioNative OpenAI format

Text to speech

Convert text to audio

POST
/v1/audio/speech

Request Body

application/json

model*string

Model name; must match the identifier in the model catalog exactly

input*string

Text to convert

Lengthlength <= 4096
voice*string

Voice

Value in"alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"
response_format?string

Response format. Set json_schema to enable structured outputs that strictly match the given schema

Default"mp3"
Value in"mp3" | "opus" | "aac" | "flac" | "wav" | "pcm"
speed?number

Speech rate multiplier, 0.25–4.0. Defaults to 1.0

Default1
Range0.25 <= value <= 4

Response Body

audio/mpeg

curl -X POST "https://jiniu.ai/v1/audio/speech" \  -H "Content-Type: application/json" \  -d '{    "model": "tts-1",    "input": "string",    "voice": "alloy"  }'
"string"