Skip to main content
POST
Qwen Audio text to speech

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

Model ID or configured alias.

Minimum string length: 1
input
string
required

Text or input to process.

Maximum string length: 4096
voice
required

Voice ID for the selected model.

Minimum string length: 1
instructions
string

Instructions for the model.

Maximum string length: 4096
response_format
enum<string>
default:mp3

Output format.

Available options:
mp3,
pcm,
wav,
opus
speed
number
default:1

Speech speed.

Required range: 0.5 <= x <= 2
stream_format
enum<string>
default:audio

Return audio bytes or server-sent events.

Available options:
audio,
sse
extra_body
object

Provider-specific options.

sample_rate
enum<integer>
Available options:
8000,
12000,
16000,
22050,
24000,
44100,
48000
volume
integer
Required range: 0 <= x <= 100
rate
number
Required range: 0.5 <= x <= 2
bit_rate
integer
Required range: 6 <= x <= 510
pitch
number
Required range: 0.5 <= x <= 2
enable_ssml
boolean
word_timestamp_enabled
boolean
seed
integer
Required range: 0 <= x <= 65535
language_hints
string[]
instruction
string
enable_aigc_tag
boolean
aigc_propagator
string
aigc_propagate_id
string
hot_fix
object
stream
boolean

Response

Successful response

The response is of type string.