Use the HTTP API to create, list, query, update, and delete cloned voices.
User guide: Voice cloning.
Service endpoint
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.
Alibaba 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.comSingapore: from
dashscope-intl.aliyuncs.comto{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com
Replace {WorkspaceId} with your actual Workspace ID. The existing domains remain fully functional.
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 to |
Create a voice
Request body |
This example uses the Singapore region endpoint. For the Beijing region, use: Replace Qwen-Audio-TTS/CosyVoice voice cloning
Qwen-TTS voice cloning
|
|
model The voice cloning model. Valid values:
|
|
|
input The input parameters. |
|
Response body |
Qwen-Audio-TTS/CosyVoice voice cloning
Qwen-TTS voice cloning
Important
Qwen-Audio-TTS/CosyVoice returns the |
|
request_id The unique identifier of this request. |
|
|
output The data returned by the model. |
|
|
usage Usage information for this request. |
Query voice list
Request body |
This example uses the Singapore region endpoint. For the Beijing region, use: Replace Qwen-Audio-TTS/CosyVoice
Qwen-TTS voice cloning
|
|
model The voice cloning model. Valid values:
|
|
|
input The input parameters. |
Response body |
Qwen-Audio-TTS/CosyVoice
Qwen
Important
Qwen-Audio-TTS/CosyVoice returns a |
|
request_id The unique identifier of this request. |
|
|
output The data returned by the model. |
|
|
usage Usage information for this request. |
Query voice details
Applies only to Qwen-Audio-TTS/CosyVoice (when model is voice-enrollment). Qwen models don't support the query voice details operation.
Request body |
This example uses the Singapore region endpoint. For the Beijing region, use: Replace Qwen-Audio-TTS/CosyVoice
|
|
model Set to |
|
|
input The input parameters. |
Response body |
|
|
request_id The unique identifier of this request. |
|
|
output The data returned by the model. |
|
|
usage Usage information for this request. |
Update a voice
Applies only to Qwen-Audio-TTS/CosyVoice voice cloning (when model is voice-enrollment). Qwen models don't support the update operation.
Request body |
This example uses the Singapore region endpoint. For the Beijing region, use:
|
|
model Set to |
|
|
input The input parameters. |
Response body |
|
|
request_id The unique identifier of this request. |
|
|
output The data returned by the model. The update operation returns an empty object. |
|
|
usage Usage information for this request. |
Delete a voice
Request body |
This example uses the Singapore region endpoint. For the Beijing region, use: Replace Qwen-Audio-TTS/CosyVoice
Qwen-TTS voice cloning
|
|
model The voice cloning model. Valid values:
|
|
|
input The input parameters. |
Response body |
Qwen-Audio-TTS/CosyVoice
Qwen
Important
Qwen-Audio-TTS/CosyVoice returns an empty output object, while Qwen returns the |
|
request_id The unique identifier of this request. |
|
|
output The data returned by the model. Qwen-Audio-TTS/CosyVoice returns an empty object, while Qwen returns the name of the deleted voice. |
|
|
usage Usage information for this request. |
Voice status descriptions
After a voice is created, it goes through a review process. The statuses below apply only to Qwen-Audio-TTS/CosyVoice (when model is voice-enrollment). Qwen query and list responses don't include a status field.
|
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. |