Voice cloning HTTP API reference
Refer to the target model for the HTTP parameters, responses, and examples related to creating, querying, updating, and deleting voices.
This document describes the voice cloning HTTP API. Select the fields and examples for the model that will use the voice. Each operation uses one parameter table. The model-specific notes describe differences in field types, required fields, and values.
| Target Model | Operations Provided Here |
|---|---|
| Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice | Create Voice, Query Voice List, Query Voice Details, Update Voice, Delete Voice |
| Qwen-Omni、Qwen-Omni-Realtime | Create Voice, Query Voice List, Delete Voice |
| Qwen-LiveTranslate-Realtime | Create Pre-created Voice, Delete Pre-created Voice |
| MiniMax | Create Voice |
First Obtain API Key and Configure Environment Variables. Request examples read from DASHSCOPE_API_KEY. When managing the same voice across different APIs, use the same account.
Service endpoint
Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice、Qwen-Omni、Qwen-Omni-Realtime
China (Beijing)
POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/audio/tts/customization
Singapore
POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/audio/tts/customization
Replace {WorkspaceId} with the actual Workspace ID; this can be found on the Workspace Details page in the Alibaba Cloud Model Studio console. The API Keys for Beijing and Singapore differ.
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:
- North China 2 (Beijing) Region: Migrate from
dashscope.aliyuncs.comto{WorkspaceId}.cn-beijing.maas.aliyuncs.com. - Singapore Region: Migrate from
dashscope-intl.aliyuncs.comto{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com.
Existing domain names remain fully functional.
Qwen-LiveTranslate-Realtime
North China 2 (Beijing) Region:
POST https://dashscope.aliyuncs.com/api/v1/services/audio/tts/customization
MiniMax
HTTP Request URL: POST https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
SDK calls the configured base_url: https://dashscope.aliyuncs.com/api/v1.
NoteThird-party models (MiniMax) currently only support invocation via the dashscope.aliyuncs.com domain and do not yet support dedicated domains.
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 Voice
Audio Requirements and Costs
Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice:
Refer to the Voice Cloning User Guide for audio requirements. The cloning process for Qwen-Audio-Realtime is described in Real-time voice conversation Voice Cloning. Creating a voice with Qwen-Audio-Realtime is free; model invocation is billed according to the target model, details in Billing Information, and quantity limits are outlined in Quota Information.
Qwen-Omni、Qwen-Omni-Realtime:
Supported input audio formats include WAV (16-bit), MP3, and M4A. Recommended length is 10–20 seconds, maximum 60 seconds, file size under 10 MB, sampling rate no less than 24 kHz, and mono-only. The audio must contain at least 3 seconds of continuous, clear speech, with pauses no longer than 2 seconds; avoid background music, noise, or other voices throughout the recording. Use normal speech audio—do not upload songs or singing. Supported languages and dialects are listed in the language parameters below; recording recommendations are provided in the Audio Requirements.
Cloning steps, complete examples, and costs are detailed in the Voice Cloning User Guide.
Qwen-LiveTranslate-Realtime:
Supports qwen3.8-livetranslate-flash-realtime and qwen3.5-livetranslate-flash-realtime. This section describes pre-creating a voice; real-time extraction of input voice during translation is covered in Voice Configuration. Pre-creating a voice incurs separate charges; model invocation remains billed by token usage, as outlined in Billing Information. Reference audio must use a publicly accessible URL.
MiniMax:
NoteA voice cloning request generates a demo audio clip. The demo audio is billed additionally at the synchronous TTS unit price of the selected model.
Request Bodymodel Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (Required): Set to Qwen-Omni, Qwen-Omni-Realtime (required): The voice cloning model. Fixed to Qwen-LiveTranslate-Realtime: Voice cloning model, using MiniMax (required): The speech model used to generate the demo audio. Supported models:
input Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (Required): The input parameters. Qwen-Omni, Qwen-Omni-Realtime (required): The input parameters. Qwen-LiveTranslate-Realtime: The input parameters. MiniMax (required): The input parameters. Properties action Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (Required): Fixed as Qwen-Omni, Qwen-Omni-Realtime (required): Operation type, fixed as Qwen-LiveTranslate-Realtime: Used when creating a voice style MiniMax (required): The operation to perform. Set to target_model Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (Required): The target model driving the voice style. Must match the model that will subsequently use this voice style; otherwise, the call will fail. Qwen-Omni, Qwen-Omni-Realtime (required): The omni model that drives the voice:
It must match the model used in subsequent calls to the omni API. Otherwise, synthesis will fail. Qwen-LiveTranslate-Realtime: The real-time translation model driving the voice style must match the model used in subsequent sessions. audio Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (required), type Reference audio used for voice cloning, supporting publicly accessible URLs or Base64 Data URIs, such as NoteCompatible with the legacy parameter Qwen-Omni, Qwen-Omni-Realtime (required), type Reference audio object. Qwen-LiveTranslate-Realtime, type Reference audio object. Properties data Qwen-Omni, Qwen-Omni-Realtime (required): Audio used for cloning (recording must follow the Recording Guidelines, and the audio must meet the Audio Requirements). Audio data can be submitted in one of two ways:
Data URL encoding example Qwen-LiveTranslate-Realtime: Public URL of the reference audio. prefix Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (Required): Voice name prefix. Allowed characters are digits and English letters, up to 10 characters. The generated voice name has the format language_hints Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (optional): Auxiliary model to identify the language of the sample audio, enabling more accurate extraction of voice characteristics and improving cloning performance. If the specified language does not match the actual audio language (e.g., setting This parameter is an array, and its length must be 1. NoteApplicable to qwen-audio-3.1-tts-plus, qwen-audio-3.1-tts-flash, qwen-audio-3.0-tts-plus, qwen-audio-3.0-tts-flash, qwen-audio-3.1-realtime-plus, qwen-audio-3.1-realtime-flash, qwen-audio-3.0-realtime-plus, qwen-audio-3.0-realtime-flash, cosyvoice-v3.5-plus, cosyvoice-v3.5-flash, cosyvoice-v3-plus, cosyvoice-v3-flash. Click to view the languages supported by each model
Default value: ["zh"]. max_prompt_audio_length Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (optional): Maximum duration (in seconds) of the reference audio used for voice cloning after preprocessing. Value range: [3.0, 30.0]. Default value: 10.0. NoteApplies to qwen-audio-3.1-tts-plus, qwen-audio-3.1-tts-flash, qwen-audio-3.0-tts-plus, qwen-audio-3.0-tts-flash, qwen-audio-3.1-realtime-plus, qwen-audio-3.1-realtime-flash, qwen-audio-3.0-realtime-plus, qwen-audio-3.0-realtime-flash, cosyvoice-v3.5-plus, cosyvoice-v3.5-flash, cosyvoice-v3-flash. enable_preprocess Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (optional): Whether to enable audio preprocessing (noise reduction, audio enhancement, and volume normalization). Enable this for recordings with background noise. Disable it for recordings in quiet environments to preserve the original voice characteristics. Default: false. NoteApplies to qwen-audio-3.1-tts-plus, qwen-audio-3.1-tts-flash, qwen-audio-3.0-tts-plus, qwen-audio-3.0-tts-flash, qwen-audio-3.1-realtime-plus, qwen-audio-3.1-realtime-flash, qwen-audio-3.0-realtime-plus, qwen-audio-3.0-realtime-flash, cosyvoice-v3.5-plus, cosyvoice-v3.5-flash, cosyvoice-v3-flash. enable_volume_normalization Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (optional): Whether to normalize the volume of the sample audio used for voice cloning. Values:
When enabled, the synthesized audio using the created voice may have a different volume compared to when this parameter is disabled. Default value: preferred_name Qwen-Omni, Qwen-Omni-Realtime (required): Assign a recognizable name to the voice (only digits, uppercase and lowercase letters, and underscores are allowed; maximum 16 characters). It is recommended to use identifiers related to the character or scene.
Qwen-LiveTranslate-Realtime: Identifier in the voice name. text Qwen-Omni, Qwen-Omni-Realtime (optional): Text that matches the audio content in the When this parameter is provided, the server compares the audio with the text. If the difference is too large, it returns Audio.PreprocessError. MiniMax (required): The text to synthesize as demo audio for the cloned voice. Maximum: 1,000 characters. NoteThe demo audio is billed at the standard TTS rate per character. For pricing details, see MiniMax model pricing.
language Qwen-Omni, Qwen-Omni-Realtime (optional): The language corresponding to the Supported languages include Chinese dialects: If this parameter is used, the specified language must match the language of the audio actually used for cloning. audio_url MiniMax (required): The URL of the audio file to clone. The audio must meet the following requirements:
clone_prompt MiniMax (optional): A sample audio clip for voice cloning. Providing this parameter improves voice similarity and stability during synthesis. If you use this parameter, prepare a short sample audio clip. Properties prompt_audio MiniMax (optional): The URL of the sample audio file. The audio must meet the following requirements:
prompt_text MiniMax (optional): The transcript of the sample audio. The text must match the audio content exactly and end with a punctuation mark. voice_id MiniMax (required): The ID of the cloned voice (for example, "MiniMax001"). The ID must follow these naming rules:
NoteThe voice ID must be globally unique across all voices in your account. Include a timestamp or other unique identifier in the ID to avoid conflicts. language_boost MiniMax (optional): Default value: null. Whether to enhance recognition accuracy for a specific language or dialect. Set to Available options
need_noise_reduction MiniMax (optional): Default: false. Whether to enable noise reduction for the audio used for cloning. need_volume_normalization MiniMax (optional): Default: false. Whether to enable volume normalization. aigc_watermark MiniMax (optional): Default: false. Whether to add an audio rhythm marker to the end of the synthesized demo audio. parameters Qwen-Omni、Qwen-Omni-Realtime: Configuration parameter object. Properties voice_clone_mode Qwen-Omni, Qwen-Omni-Realtime (required depending on conditions): Voice cloning mode. Required when using the qwen3.8-omni series models; if not specified, it defaults to the qwen3.5-omni talker system instruct mode (backward compatible with legacy services). Valid values:
This parameter must be included in skip_audio_process Qwen-Omni, Qwen-Omni-Realtime (optional): Default value: Whether to skip audio preprocessing. Defaults to | Request examplesqwen-audio-3.1-tts-plusThe following configuration is for the China (Beijing) region. Replace "{WorkspaceId}" with your actual workspace ID. The configuration varies by region. When using a local WAV audio file, you can generate a Base64 Data URI using the following code and set the value of qwen-audio-3.1-realtime-plusThe following configuration is for the China (Beijing) region. Replace "{WorkspaceId}" with your actual workspace ID. The configuration varies by region. When using a local WAV audio file, you can generate a Base64 Data URI using the following code and set the value of qwen3.8-omni-flash-realtimeThe cURL example uses an audio URL. Replace qwen3.8-livetranslate-flash-realtimeMiniMax/speech-2.8-turboNoteThird-party models (MiniMax) currently only support |
Response bodyrequest_id Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: The unique identifier of this request. Qwen-Omni、Qwen-Omni-Realtime: Request ID。 Qwen-LiveTranslate-Realtime: Request ID. MiniMax: The unique identifier of this request. output Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: The data returned by the model. Qwen-Omni、Qwen-Omni-Realtime: Output parameter object. Qwen-LiveTranslate-Realtime: Output parameter object. MiniMax: Output parameter object. Properties voice_id Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: Voice ID. For Qwen-Audio-TTS and CosyVoice, set this as the voice Qwen-Omni、Qwen-Omni-Realtime: The voice name, which can be used as the Qwen-LiveTranslate-Realtime: The created voice ID is used in the target_model Qwen-Omni、Qwen-Omni-Realtime: The omni model that drives the voice:
It must match the model used in subsequent calls to the omni API. Otherwise, synthesis will fail. Qwen-LiveTranslate-Realtime: The target model specified during voice creation. input_sensitive MiniMax: Whether the input audio triggered content moderation. input_sensitive_type MiniMax: The type of content moderation violation detected in the input audio:
demo_audio MiniMax: URL of the demo audio. base_resp MiniMax: Properties status_code MiniMax: Status code:
status_msg MiniMax: A description of the status. usage Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: Usage information for this request. Qwen-Omni、Qwen-Omni-Realtime: Usage information. MiniMax: Character usage for this request. Properties count Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: The number of voices created. Always 1. Qwen-Omni、Qwen-Omni-Realtime: The number of "create voice" operations actually billed for this request. The cost of this request is count × 0.01CNY. When creating a voice, count is always 1. characters MiniMax: The number of characters in the input text. | Response examplesqwen-audio-3.1-tts-plusqwen-audio-3.1-realtime-plusqwen3.8-omni-flash-realtimeResponse structureReturn exampleqwen3.8-livetranslate-flash-realtimeThe following response examples are excerpts. MiniMax/speech-2.8-turbo |
Query Voice List
The parameters and examples in this section correspond to the following models: Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice; Qwen-Omni, Qwen-Omni-Realtime.
NoteMiniMax does not support listing voices through this API. For available MiniMax voice IDs, including system and cloned voices, see Voice management.
Request Bodymodel Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (Required): Set to Qwen-Omni, Qwen-Omni-Realtime (required): The voice cloning model. Fixed to input Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (Required): The input parameters. Qwen-Omni, Qwen-Omni-Realtime (required): The input parameters. Properties action Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (Required): Set to Qwen-Omni, Qwen-Omni-Realtime (required): The action type. Fixed to prefix Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (optional): Filters voices by name prefix. page_index Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (optional): The page index. Qwen-Omni, Qwen-Omni-Realtime (optional): Default: Page index. Value range: [0, 1000000]. page_size Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (optional): The number of entries per page. Qwen-Omni, Qwen-Omni-Realtime (optional): Default: Number of entries per page. Value range: [0, 1000000]. Important | Request examplesvoice-enrollment (text-to-speech example)The following configuration is for the China (Beijing) region. Replace "{WorkspaceId}" with your actual workspace ID. The configuration varies by region. voice-enrollment (real-time conversation example)The following configuration is for the China (Beijing) region. Replace "{WorkspaceId}" with your actual workspace ID. The configuration varies by region. qwen-voice-enrollment (multimodal example) |
Response Bodyrequest_id Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: The unique identifier of this request. Qwen-Omni、Qwen-Omni-Realtime: Request ID。 output Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: The data returned by the model. Qwen-Omni、Qwen-Omni-Realtime: Output parameter object. Properties voice_list Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: List of voices found. Qwen-Omni、Qwen-Omni-Realtime: Properties voice_id Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: Voice ID. For Qwen-Audio-TTS and CosyVoice, set this as the gmt_create Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: The creation time. Qwen-Omni、Qwen-Omni-Realtime: The time when the voice was created. gmt_modified Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: The last modification time. status Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: Voice status; see "Voice Status Description" for valid values. voice Qwen-Omni、Qwen-Omni-Realtime: The voice name, which can be used as the target_model Qwen-Omni、Qwen-Omni-Realtime: The omni model that drives the voice:
It must match the model used in subsequent calls to the omni API. Otherwise, synthesis will fail. usage Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: Usage information for this request. Qwen-Omni、Qwen-Omni-Realtime: Usage information. Properties count Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: Always 1. Qwen-Omni、Qwen-Omni-Realtime: The number of "create voice" operations actually billed for this request. The cost of this request is count × 0.01CNY. Listing voices is not billed, so | Response examplesvoice-enrollment (text-to-speech example)voice-enrollment (real-time conversation example)qwen-voice-enrollment (multimodal example) |
Query voice details
The parameters and examples in this section correspond to the following models: Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice.
NoteMiniMax does not support querying voice details through this API.
Request Bodymodel (Required): Set to input (Required): The input parameters. Properties action (Required): Set to voice_id (Required): The voice ID to query. | Request examplesvoice-enrollment (text-to-speech example)The following configuration is for the China (Beijing) region. Replace "{WorkspaceId}" with your actual workspace ID. The configuration varies by region. Query voice detailsvoice-enrollment (real-time conversation example)The following configuration is for the China (Beijing) region. Replace "{WorkspaceId}" with your actual workspace ID. The configuration varies by region. Query voice details |
Response Bodyrequest_id The unique identifier of this request. output The data returned by the model. Properties resource_link The URL of the audio file. gmt_create The creation time. gmt_modified The last modification time. status Voice status; see "Voice Status Description" for valid values. target_model The target model driving the voice (text-to-speech or real-time speech conversation). usage Usage information for this request. Properties count Always 1. | Response examplesvoice-enrollment (text-to-speech example)voice-enrollment (real-time conversation example) |
Update a voice
The parameters and examples in this section correspond to the following models: Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice.
NoteMiniMax does not support updating voices through this API.
Request Bodymodel (Required): Set to input (Required): The input parameters. Properties action (Required): Fixed to voice_id (Required): The voice ID to update. audio (Required): New reference audio. Accepts a publicly accessible URL or a Base64 Data URI, such as NoteCompatible with the legacy parameter | Request examplesvoice-enrollment (text-to-speech example)The following configuration is for the China (Beijing) region. Replace "{WorkspaceId}" with your actual workspace ID. The configuration varies by region. voice-enrollment (real-time conversation example)The following configuration is for the China (Beijing) region. Replace "{WorkspaceId}" with your actual workspace ID. The configuration varies by region. |
Response Bodyrequest_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. Properties count Always 1. | Response examplesvoice-enrollment (text-to-speech example)voice-enrollment (real-time conversation example) |
Delete Voice
The parameters and examples in this section correspond to the following models: Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice; Qwen-Omni, Qwen-Omni-Realtime; Qwen-LiveTranslate-Realtime.
After deleting a voice via Qwen-Omni or Qwen-Omni-Realtime, the corresponding voice quota will be released.
NoteMiniMax does not support deleting voices through this API. To delete MiniMax voices, see Voice management.
Request Bodymodel Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (Required): Set to Qwen-Omni, Qwen-Omni-Realtime (required): The voice cloning model. Fixed to Qwen-LiveTranslate-Realtime: Fixed to input Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (Required): The input parameters. Qwen-Omni, Qwen-Omni-Realtime (required): The input parameters. Qwen-LiveTranslate-Realtime: The input parameters. Properties action Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (Required): Set to Qwen-Omni, Qwen-Omni-Realtime (required): The action type. Fixed to Qwen-LiveTranslate-Realtime: Use voice_id Qwen-Audio-TTS, Qwen-Audio-Realtime, CosyVoice (Required): The voice ID to delete. voice Qwen-Omni, Qwen-Omni-Realtime (required): The voice to delete. Important Qwen-LiveTranslate-Realtime: The ID of the pre-created voice to be deleted. | Request examplesvoice-enrollment (text-to-speech example)The following configuration is for the China (Beijing) region. Replace "{WorkspaceId}" with your actual workspace ID. The configuration varies by region. voice-enrollment (real-time conversation example)The following configuration is for the China (Beijing) region. Replace "{WorkspaceId}" with your actual workspace ID. The configuration varies by region. qwen-voice-enrollment (multimodal example)Replace qwen-voice-enrollment (pre-created translation voice) |
Response Bodyrequest_id Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: The unique identifier of this request. Qwen-Omni、Qwen-Omni-Realtime: Request ID。 output Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: The data returned by the model. This is an empty object. usage Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: Usage information for this request. Qwen-Omni、Qwen-Omni-Realtime: Usage information. Properties count Qwen-Audio-TTS、Qwen-Audio-Realtime、CosyVoice: Always 1. Qwen-Omni、Qwen-Omni-Realtime: The number of "create voice" operations actually billed for this request. The cost of this request is count × 0.01CNY. Deleting voices is not billed, so | Response examplesvoice-enrollment (text-to-speech example)voice-enrollment (real-time conversation example)qwen-voice-enrollment (multimodal example) |
Voice status descriptions
The following states correspond to the voice-enrollment interfaces of Qwen-Audio-TTS, Qwen-Audio-Realtime, and CosyVoice.
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. |
Error messages
If you encounter any errors, please refer to Error Codes for troubleshooting.
Using Voice Tones in Model Invocation
- Qwen-Audio-Realtime Voice Configuration.
- Qwen-Omni and Qwen-Omni-Realtime Cloning Process and Full Example.
- Qwen-LiveTranslate-Realtime Voice Configuration.
For definitions of SDK in Qwen-Audio-TTS, Qwen-Audio-Realtime, and CosyVoice, see also Java SDK and Python SDK.