Skip to main content
POST

Authorizations

Authorization
string
header
required

Modellix API Key. Format: Bearer <your_api_key>

Body

application/json

Shared CosyVoice v3 TTS request fields. Submit as an async task; poll GET /api/v1/tasks/{task_id} for the audio URL in result.resources.

text
string
required

Text to synthesize. Required. Max 20,000 Unicode characters. Supports plain text, SSML (set enable_ssml to true), and LaTeX formulas per Alibaba documentation.

Required string length: 1 - 20000
Example:

"There is a large garden behind my house."

voice
string
required

System or cloned voice ID for cosyvoice-v3-flash. Full official CosyVoice voice catalog (use only voices listed under cosyvoice-v3-flash for system voices): https://help.aliyun.com/zh/model-studio/cosyvoice-voice-list . Do not mix Plus and Flash system voices. Cloned or designed voice IDs are also accepted. Sample system voices (not exhaustive): longanyang, longhuhu_v3, longpaopao_v3, longshanshan_v3, longjiaxin_v3, loongkyong_v3, longfei_v3, longyingxiao_v3, longyingxun_v3, longxiaochun_v3, longantai_v3, longmiao_v3, longjiqi_v3, longanran_v3, longshuo_v3.

Required string length: 1 - 256
Example:

"longanyang"

format
enum<string>
default:mp3

Audio encoding format. Default mp3.

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

"mp3"

sample_rate
enum<integer>
default:22050

Audio sample rate in Hz. Default 22050.

Available options:
8000,
16000,
22050,
24000,
44100,
48000
Example:

24000

volume
integer
default:50

Output volume. Default 50. Range 0 (silent) to 100 (maximum).

Required range: 0 <= x <= 100
Example:

50

rate
number
default:1

Speech rate multiplier. Default 1.0. Range 0.5 (slow) to 2.0 (fast).

Required range: 0.5 <= x <= 2
Example:

1

pitch
number
default:1

Pitch multiplier. Default 1.0. Range 0.5 (lower) to 2.0 (higher).

Required range: 0.5 <= x <= 2
Example:

1

bit_rate
integer

Audio bit rate in kbps. Optional. Range 6 to 510. Only supported when format is opus; do not use for mp3, pcm, or wav.

Required range: 6 <= x <= 510
Example:

32

instruction
string

Optional speaking-style instruction for Instruct-capable system voices. Enforced weighted length ≤100 (CJK ideographs / Han count as 2; other characters count as 1). Alibaba requires fixed Chinese formats from the CosyVoice voice list for system voices.

Example:

"Speak in a friendly customer-service tone."

language_hint
enum<string>

Target language hint for pronunciation (numbers, symbols, minor languages).

Available options:
zh,
en,
fr,
de,
ja,
ko,
ru,
pt,
th,
id,
vi,
es,
it,
ms,
fil,
ar
Example:

"en"

seed
integer
default:0

Random seed for reproducible synthesis when text, voice, and other parameters are identical. Default 0. Range 0 to 65535.

Required range: 0 <= x <= 65535
Example:

0

enable_ssml
boolean
default:false

Whether to parse text as SSML. Default false. When true, text must follow Alibaba CosyVoice SSML rules.

Example:

false

hot_fix
object

Text hot-fix before synthesis. Optional object with pronunciation (custom pinyin for Chinese words) and replace (text substitution) arrays per Alibaba HTTP API.

Example:
enable_aigc_tag
boolean
default:false

Embed AIGC invisible watermark into wav/mp3/opus output. Supported on cosyvoice-v3-plus and cosyvoice-v3-flash.

aigc_propagator
string

AIGC ContentPropagator. Only effective when enable_aigc_tag is true.

aigc_propagate_id
string

AIGC PropagateID. Only effective when enable_aigc_tag is true.

enable_markdown_filter
boolean
default:false

Filter Markdown markers before synthesis. Only supported on cosyvoice-v3-flash with cloned voices.

Response

Task submitted successfully. Poll GET /api/v1/tasks/{task_id} until the task completes; synthesized audio is returned on the task result.

Response object for asynchronous task submission.

code
integer
required

Response code, 0 indicates success

Example:

0

message
string
required

Response message

Example:

"success"

data
object
required

Task submission details. Poll GET /api/v1/tasks/{task_id} until status is success; audio appears in result.resources.