Skip to main content

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.

Endpoint and authentication

Base URL:
All requests require your APIXO API key:
Submit requests also require:

Copy-paste async quickstart

This minimal request submits a speech task and returns a taskId.
Successful response:
Save the taskId; you need it to poll for the final result.

Poll for result

Processing response:
Success response:
Custom voice success response:
Failed response:
Parse resultJson after state becomes success:

Request body

Speech

Clone

Design

Parameters

string
default:"async"
required
Result delivery mode. Use async for polling with statusTask, or callback for webhook delivery.
string
Required when request_type is callback. Must be a public HTTPS URL that can receive the final task payload. See Webhooks.
object
required
CosyVoice 3 Flash input parameters.

Response format

Submit task response

POST /generateTask/cosyvoice-3-flash returns a task ID when the task is accepted:
integer
API status code. 200 means the task was accepted.
string
Human-readable status message.
string
Unique task identifier used with the status endpoint.

Status response fields

string
Unique task identifier.
string
Current task state: pending, processing, success, or failed.
string
JSON string containing audio result URLs. Present when audio output is available.
string
Custom voice ID returned by clone or design workflows.
string
Upstream custom voice status such as DEPLOYING, OK, or UNDEPLOYED.
string
Machine-readable failure code. Present when state is failed.
string
Human-readable failure message. Present when state is failed.
integer
Task creation timestamp in Unix milliseconds.
integer
Task completion timestamp in Unix milliseconds. Present after completion.
integer
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.
See Webhooks for delivery requirements and retry behavior.

Billing

CosyVoice 3 Flash uses different billing units by workflow. For current route and market comparison pricing, see Pricing.

Latency and polling

Actual latency may vary by text length, voice route, queue load, and whether you are creating a custom voice.
Use callback mode for production voice creation workflows so your backend does not need to poll during longer DEPLOYING periods.
Custom voice enrollment can remain in 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

Task failure cases

Common validation rules:
  • voice is required for speech. APIXO also accepts legacy voice_id in the request and normalizes it into voice.
  • Custom voice_id values must belong to the current user, match the current provider, and match the target model.
  • Custom voice_id values are removed after 7 consecutive days without use.
  • Only cosyvoice-3-flash supports built-in system voices such as longanlang_v3, longanyang, and loongabby_v3.
  • audio_urls must be an array with exactly one non-empty URL.
  • prefix must be 1-10 letters or digits.
  • instruction must be at most 100 characters.