AudioNative OpenAI format
Text to speech
Convert text to audio
Request Body
application/json
model*string
Model name; must match the identifier in the model catalog exactly
input*string
Text to convert
Length
length <= 4096voice*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
Default
1Range
0.25 <= value <= 4Response 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"