Overview
CosyVoice 3 Flash is an Alibaba audio model for text-to-speech plus custom voice creation. Use this page when you are ready to call the API after trying the model in the APIXO playground.| Capability | Value |
|---|---|
| Model ID | cosyvoice-3-flash |
| Modes | speech, clone, design |
| Built-in voices | Yes |
| Custom voices | Yes |
| Speech prompt length | 1-20000 characters |
| Design prompt length | 1-500 characters |
| Preview text length | 1-200 characters |
| Clone audio URLs | Exactly 1 URL |
Endpoint and authentication
Base URL:| Method | Endpoint | Purpose |
|---|---|---|
POST | /generateTask/cosyvoice-3-flash | Submit a speech, clone, or design task |
GET | /statusTask/cosyvoice-3-flash?taskId={taskId} | Poll task status and retrieve results |
Copy-paste async quickstart
This minimal request submits a speech task and returns ataskId.
taskId; you need it to poll for the final result.
Poll for result
resultJson after state becomes success:
Request body
Speech
Clone
Design
Parameters
Result delivery mode. Use
async for polling with statusTask, or callback for webhook delivery.Required when
request_type is callback. Must be a public HTTPS URL that can receive the final task payload. See Webhooks.CosyVoice 3 Flash input parameters.
Response format
Submit task response
POST /generateTask/cosyvoice-3-flash returns a task ID when the task is accepted:
API status code.
200 means the task was accepted.Human-readable status message.
Unique task identifier used with the status endpoint.
Status response fields
Unique task identifier.
Current task state:
pending, processing, success, or failed.JSON string containing audio result URLs. Present when audio output is available.
Custom voice ID returned by clone or design workflows.
Upstream custom voice status such as
DEPLOYING, OK, or UNDEPLOYED.Machine-readable failure code. Present when
state is failed.Human-readable failure message. Present when
state is failed.Task creation timestamp in Unix milliseconds.
Task completion timestamp in Unix milliseconds. Present after completion.
Processing duration in milliseconds. Present after successful completion.
Webhook callback mode
Use callback mode when your backend should receive the final result automatically instead of polling.Billing
CosyVoice 3 Flash uses different billing units by workflow.| Workflow | APIXO price |
|---|---|
speech | $0.10 / 10K characters |
clone | $0.002 / request |
design | $0.03 / request |
Latency and polling
Actual latency may vary by text length, voice route, queue load, and whether you are creating a custom voice.| Workflow | Typical generation time | Recommended first poll | Poll interval |
|---|---|---|---|
speech | 5s-30s | 5s after task creation | 3s-5s |
clone | 30s-180s | 20s after task creation | 5s-10s |
design | 30s-180s | 20s after task creation | 5s-10s |
processing while the upstream voice status is still DEPLOYING.
Custom voice_id records are garbage-collected if they are not used for 7 consecutive days. If you plan to keep a custom voice active, call speech with that voice_id at least once within every 7-day window.
Errors and troubleshooting
HTTP errors
| Code | Meaning | What to do |
|---|---|---|
400 | Invalid request body or parameter shape | Fix the request before retrying |
401 | Missing or invalid API key | Check the Authorization header |
402 | Insufficient balance or quota | Add balance or switch account/key |
403 | Key or route cannot access the model | Check permissions and route strategy |
429 | Rate limit or concurrency limit reached | Retry with exponential backoff |
500 | Server error | Retry with backoff |
502 | Upstream provider error | Retry with backoff |
504 | Upstream timeout | Retry or use callback mode |
Task failure cases
| Fail code | Meaning | What to do |
|---|---|---|
UNDEPLOYED | Voice review failed and the custom voice is unavailable | Create a new voice with better input audio or a different design prompt |
TASK_TIMEOUT | Custom voice deployment stayed in DEPLOYING for too long | Retry later |
VALIDATION_ERROR | Input failed APIXO validation, or a voice_id is invalid for the current user/provider/model | Fix the input before retrying |
UpstreamError | Upstream route returned an unmapped failure | Retry with backoff |
voiceis required forspeech. APIXO also accepts legacyvoice_idin the request and normalizes it intovoice.- Custom
voice_idvalues must belong to the current user, match the current provider, and match the target model. - Custom
voice_idvalues are removed after 7 consecutive days without use. - Only
cosyvoice-3-flashsupports built-in system voices such aslonganlang_v3,longanyang, andloongabby_v3. audio_urlsmust be an array with exactly one non-empty URL.prefixmust be 1-10 letters or digits.instructionmust be at most 100 characters.