Skip to main content
POST
CosyVoice One-shot Voice Design + TTS

Authorizations

Authorization
string
header
required

Modellix API Key. Format: Bearer <your_api_key>

Body

application/json

One-shot voice design + TTS. Required: model, voice_prompt, text. The designed voice is temporary and is not returned.

model
enum<string>
required

Target CosyVoice v3.5 TTS model used for synthesis after voice design.

Available options:
cosyvoice-v3.5-plus,
cosyvoice-v3.5-flash
voice_prompt
string
required

Natural-language voice description (Chinese or English). Required. Max 500 Unicode characters.

Required string length: 1 - 500
Example:

"Calm male announcer with a deep tone"

text
string
required

Text to synthesize with the temporarily designed voice. Required. Max 20,000 Unicode characters.

Required string length: 1 - 20000
Example:

"Hello, welcome to Modellix. Today we will introduce our products."

language_hint
enum<string>
default:zh

Language hint for both design and synthesis (zh/en only). Default zh.

Available options:
zh,
en
Example:

"en"

format
enum<string>
default:mp3

Output audio encoding format. Default mp3.

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

"mp3"

sample_rate
enum<integer>
default:22050

Output 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–100.

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

50

rate
number
default:1

Speech rate multiplier. Default 1.0. Range 0.5–2.0.

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

1

pitch
number
default:1

Pitch multiplier. Default 1.0. Range 0.5–2.0.

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

1

bit_rate
integer

Audio bit rate in kbps. Optional. Range 6–510. Only supported when format is opus.

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

32

instruction
string

Optional speaking-style instruction. Weighted length ≤100 (CJK ideographs count as 2).

Example:

"Speak in a friendly customer-service tone."

seed
integer
default:0

Random seed. Default 0. Range 0–65535.

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

0

enable_ssml
boolean
default:false

Whether to parse text as SSML. Default false.

Example:

false

hot_fix
object

Text hot-fix before synthesis. Same as CosyVoice TTS hot_fix.

Example:

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.