Vidu API
Dashboard
Docs
Sign in

Timing to Audio

Generate a controllable sound effect clip based on input text prompts. (BGM not supported.) Creators can freely control the timing of multiple sound events within the audio through a timeline.
POST https://api.vidu.com/ent/v2/timing2audio

Request Headers

FieldValueDescription
Content-Typeapplication/jsonData format
AuthorizationToken {your api key}Replace {your_api_key} with your actual API Key

Request Body

FieldTypeRequiredDescription
modelStringRequiredModel
Available value: audio1.0
durationFloatOptionalAudio duration.
Default: 10 seconds. Range: 2–10 seconds.
timing_promptsArray [object]RequiredTimeline-based sound event prompts.
Each item defines a sound event with a from and to timestamp and a prompt.
- Max 1500 characters per event
- Events can overlap
- from and to must be within [0, duration]
seedIntOptionalRandom seed.
If not provided or set to 0, a random value will be used. Fixed value ensures reproducibility.
callback_urlStringOptionalCallback
When creating a task, you need to actively set the callback_url with a POST request. When the video generation task changes its status, Vidu will send a callback request to this URL, containing the latest status of the task. The structure of the callback request content will be the same as the return body of the GET Generation API.
The “status” in the callback response includes the following states:
- processing: Task is being processed.
- success: Task is completed (if sending fails, it will retry the callback three times).
- failed: Task failed (if sending fails, it will retry the callback
curl -X POST -H "Authorization: Token {your_api_key}" -H "Content-Type: application/json" -d '
'{
"model": "audio1.0",
"duration": 10,
"timing_prompts": [
{
"from": 0.0,
"to": 3.0,
"prompt": "Birds chirping in the morning"
},
{
"from": 3.0,
"to": 6.0,
"prompt": "A distant train passing by"
},
{
"from": 5.0,
"to": 9.5,
"prompt": "Waves gently lapping the beach"
}
],
"seed": 0
}' https://api.vidu.com/ent/v2/timing2audio

Response Body

FieldTypeDescription
task_idStringVidu generated Task ID
stateStringTask state::
-created
-queueing
-processing
-success
-failed
modelStringModel parameter used
durationIntAudio duration
timing_promptsArrayList of configured sound events
seedIntRandom seed used
created_atStringTask creation timestamp (ISO8601 format)
{
"task_id": "your_task_id_here",
"state": "created",
"model": "audio1.0",
"duration": 10,
"timing_prompts": [
{
"from": 0.0,
"to": 3.0,
"prompt": "Birds chirping in the morning"
},
{
"from": 3.0,
"to": 6.0,
"prompt": "A distant train passing by"
},
{
"from": 5.0,
"to": 9.5,
"prompt": "Waves gently lapping the beach"
}
],
"seed": 0,
"created_at": "2025-01-01T10:00:00.000Z"
}