Audio Generation
The voice timbre produced by quick cloning is temporary. If you want to permanently retain a cloned voice, call that voice ID in the Text-to-Speech endpoint within 168 hours (7 days) (not including preview usage within this endpoint). If this time limit is exceeded, the voice will be deleted, and the credits consumed by the cloning will not be refunded.
Authorizationstring*Replace {token} with the token provided to you
Token {your api key}audio_urlstring*URL of the original audio (must be accessible)
The model will clone the voice timbre using the audio sample passed in this parameter.
Note 1: Only the following formats are supported: mp3, m4a, wav;Note 2: The uploaded audio file must be at least 10 seconds and no longer than 5 minutes;Note 3: The uploaded audio file must not exceed 20 MB in size;Note 4: The audio content must be free of copyright issues, otherwise it will be taken down or destroyed
Authorizationstring*Replace {your api key} with your token
Token {your api key}idstring*Task ID, returned upon successful creation by the create task endpoint
{your_id}your_audio_urlvoice_idstring*Custom voice ID, . When customizing the voice_id, note the following:normalThe custom voice_id length must be in the range [8,256]bulletnormalThe first character must be an English letterbulletnormalDigits, letters, hyphens, and underscores are allowedbulletnormalThe last character cannot be -, _, *bulletnormalThe voice_id must not duplicate an existing ID, otherwise an error will be returnedbulletnormal
vidu01prompt_audio_urlstringSample audio for voice cloning
Providing this parameter helps improve the timbre similarity and stability of speech synthesis. If used, a short sample audio clip must also be uploaded.
Note 1: Only the following formats are supported: mp3, m4a, wav;
Note 2: The uploaded audio file duration must be less than 8 seconds;
Note 3: The uploaded audio file must not exceed 20 MB in size
prompt_textstringText content corresponding to the sample audio
Must match the audio content exactly, and must end with a punctuation mark
textstring*Preview parameter for the cloned voice
Limited to 1000 characters. The model will use the cloned voice to read this text and return a preview audio link.
Note: The preview will be billed for speech synthesis based on the character count as usual
Hello, welcome to the Vidu open platformpayloadstringPass-through parameter
Not processed in any way, used only for data transmission
Note: Maximum 1,048,576 characters
application/jsonResponse fields
idstringTask ID
statestringProcessing status
Possible values:
created Successfully created
queueing Task is queued
processing Task is processing
success Task succeeded
failed Task failed
err_codestringError code, see the error code table for details
creditsintegerNumber of credits consumed by this task, unit: credits
payloadapplication/jsonResponse fields
task_idstringTask ID generated by Vidu
statestringProcessing status
Possible values:
queueing Task is queuedsuccess Task succeededfailed Task failedvoice_idstringThe pass-through parameter provided in this task call
bgmbooleanWhether BGM was used in this task call
off_peakbooleanWhether off-peak mode was used in this task call
creationsarrayGeneration results
idstringCreation ID, used to identify different generation results
urlstringCreation URL, valid for 24 hours
cover_urlstringCreation cover image, valid for 24 hours
watermarked_urlstringWatermarked creation URL, valid for 24 hours
The custom voice_id provided by the user; not returned if the task failed
demo_audiostringIf the preview text text was provided in the request body, this parameter returns the preview audio as a link; otherwise this parameter is empty
payloadstringThe pass-through parameter provided in this call
created_atstringTask creation time
curl --request POST \
--url 'https://api.vidu.com/ent/v2/audio-clone' \
--header 'Authorization: Token {your api key}' \
--header 'Content-Type: application/json' \
--data '{
"audio_url": "your_audio_url",
"voice_id": "vidu01",
"prompt_audio_url": "string",
"prompt_text": "string",
"text": "Hello, welcome to the Vidu open platform",
"payload": "string"
}'{
"task_id": "your_task_id_here",
"state": "success",
"voice_id": "your_voice_id_here",
"demo_audio": "your_demo_audio_here",
"payload":"",
"created_at": "2025-01-01T15:41:31.968916Z"
}curl --request GET \
--url 'https://api.vidu.com/ent/v2/tasks/{your_id}/creations' \
--header 'Authorization: Token {your api key}'{
"id":"your_task_id",
"state": "success",
"err_code": "",
"credits": 4,
"payload": "",
"creations": [
{
"id": "your_creations_id",
"url": "your_generated_results_url",
"cover_url": "your_generated_results_cover_url",
"watermarked_url": "your_generated_results_watermarked_url"
}
]
}