Audio Generation
Authorizationstring*Replace {token} with the token provided to you
Token {your api key}textstring*The text to be converted to speechnormalLength must be less than 10000 charactersnumbernormalUse line breaks to mark paragraph changesnumbernormalPause control: supports custom time intervals between text segments to achieve custom pause durations in the synthesized speech.numbernormalUsage: add a <#x#> marker in the text, where x is the pause duration (in seconds), in the range [0.01, 99.99], with up to two decimal places. The pause marker must be placed between two segments of text that can be pronounced, and consecutive pause markers cannot be usedbulletnormal
Hello<#2#>I am vidu<#2#>Nice to meet youbulletnormalAuthorizationstring*Replace {your api key} with your token
Token {your api key}idstring*Task ID, returned upon successful task creation
{your_id}voice_setting_voice_idstring*The voice ID for the synthesized audio
See the voice list for all available voices
your_voice_setting_voice_idvoice_setting_speednumberSpeaking speed, default is 1.0
1.0 is normal speed, range [0.5,2]. A value of 0.5 gives the slowest speed, and 2 gives the fastest speed
voice_setting_volumeintegerVolume level
Range 0 - 10, default is 0, representing normal volume. Higher values mean higher volume
voice_setting_pitchintegerPitch of the synthesized audio
Range [-12,12], default 0, where 0 is the original voice pitch
voice_setting_emotionstringControls the emotion of the synthesized speech
pronunciation_dict_tonearrayDefines pronunciation for heteronyms (multi-pronunciation characters)
payloadstringPass-through parameter
Not processed in any way, used only for data transmission
Note: maximum 1048576 characters
application/jsonResponse fields
idstringTask ID
statestringProcessing status
Possible values:
created creation succeeded
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
application/jsonResponse fields
task_idstringTask ID generated by Vidu
statestringProcessing status
Possible values:queueing task is queuedsuccess task succeededfailed task failed
file_urlstringAudio file URL
creditspayloadstringThe pass-through parameter provided in this task call
bgmbooleanWhether background music was used in this task call
off_peakbooleanWhether off-peak mode was used in this task call
creationsarrayGenerated results
idstringCreation ID, used to identify different generated outputs
urlstringURL of the generated output, valid for 24 hours
cover_urlstringCover image of the generated output, valid for 24 hours
watermarked_urlstringNumber of credits consumed by this call
payloadstringThe pass-through parameter provided in this call
created_atstringTask creation time
Watermarked URL of the generated output, valid for 24 hours
curl --request POST \
--url 'https://api.vidu.com/ent/v2/audio-tts' \
--header 'Authorization: Token {your api key}' \
--header 'Content-Type: application/json' \
--data '{
"text": "Hello<#2#>I am vidu<#2#>Nice to meet youbulletnormal",
"voice_setting_voice_id": "your_voice_setting_voice_id",
"voice_setting_speed": 0,
"voice_setting_volume": 0,
"voice_setting_pitch": 0,
"voice_setting_emotion": "string",
"pronunciation_dict_tone": [],
"payload": "string"
}'{
"task_id": "your_task_id_here",
"state": "success",
"file_url": "your_file_url_here",
"credits": ,
"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"
}
]
}