Use the HTTP API to create, list, query, update, and delete cloned voices.
Service endpoint
Qwen-Audio-TTS/Qwen-Audio-Realtime/CosyVoice
Singapore
POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/audio/tts/customization
Replace {WorkspaceId} with your actual workspace ID.
China (Beijing)
POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/audio/tts/customization
Replace {WorkspaceId} with your actual workspace ID.
ImportantAlibaba Cloud Model Studio has released workspace-specific domains for the China (Beijing) and Singapore regions. The new dedicated domains deliver superior performance and higher stability for inference requests. We recommend migrating to the new domains:
- China (Beijing): from
dashscope.aliyuncs.comto{WorkspaceId}.cn-beijing.maas.aliyuncs.com - Singapore: from
dashscope-intl.aliyuncs.comto{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com
Request headers
| Parameter | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Authentication token in the format |
Content-Type | string | Yes | Media type of the request body. Set it based on the model series:
|
Create a voice
Qwen-Audio-TTS/Qwen-Audio-Realtime/CosyVoice
Request bodymodel Set to input The input parameters. | This example uses the Singapore region endpoint. For the Beijing region, use: Replace For a local WAV file, use the following code to generate a Base64 Data URI and pass the value of |
Response bodyrequest_id The unique identifier of this request. output The data returned by the model. usage Usage information for this request. | |
Query voice list
Applies to Qwen-Audio-TTS, Qwen-Audio-Realtime, and CosyVoice.
Request bodymodel Set to input The input parameters. | This example uses the Singapore region endpoint. For the Beijing region, use: Replace |
Response bodyrequest_id The unique identifier of this request. output The data returned by the model. usage Usage information for this request. | |
Query voice details
Applies to Qwen-Audio-TTS, Qwen-Audio-Realtime, and CosyVoice.
Request bodymodel Set to input The input parameters. | This example uses the Singapore region endpoint. For the Beijing region, use: Replace Query voice details |
Response bodyrequest_id The unique identifier of this request. output The data returned by the model. usage Usage information for this request. | |
Update a voice
Applies to Qwen-Audio-TTS, Qwen-Audio-Realtime, and CosyVoice.
Request bodymodel Set to input The input parameters. | This example uses the Singapore region endpoint. For the Beijing region, use: |
Response bodyrequest_id The unique identifier of this request. output The data returned by the model. The update operation returns no business data. The response may include a usage Usage information for this request. | |
Delete a voice
Applies to Qwen-Audio-TTS, Qwen-Audio-Realtime, and CosyVoice.
Request bodymodel Set to input The input parameters. | This example uses the Singapore region endpoint. For the Beijing region, use: Replace |
Response bodyrequest_id The unique identifier of this request. output The data returned by the model. This is an empty object. usage Usage information for this request. | |
Voice status descriptions
Created voices go through a review process. The following statuses apply to Qwen-Audio-TTS, Qwen-Audio-Realtime, and CosyVoice.
| Status | Description |
|---|---|
DEPLOYING | Under review or processing. |
OK | Review passed. The voice is ready to use. |
UNDEPLOYED | Review rejected. The voice can't be used. |