Audio Generating
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/timing2audioField | Value | Description |
|---|---|---|
Content-Type | application/json | Data format |
Authorization | Token {your api key} | Replace {your_api_key} with your actual API Key |
Field | Type | Required | Description |
|---|---|---|---|
model | String | Required | Model Available value: audio1.0 |
duration | Float | Optional | Audio duration. Default: 10 seconds. Range: 2–10 seconds. |
timing_prompts | Array [object] | Required | Timeline-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] |
seed | Int | Optional | Random seed. If not provided or set to 0, a random value will be used. Fixed value ensures reproducibility. |
callback_url | String | Optional | Callback 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 three times).Vidu uses a callback signature algorithm for verification, check out the details here: Callback Signature |
Field | Type | Description |
|---|---|---|
task_id | String | Vidu generated Task ID |
state | String | Task state:: - created created task successfully - queueing task in queue - processing processing - success generation successful - failed task failed |
model | String | Model parameter used |
duration | Int | Audio duration |
timing_prompts | Array | List of configured sound events |
seed | Int | Random seed used |
credits | Int | The credits used for this call |
created_at | String | Task 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, "credits": credits_number, "created_at": "2025-01-01T10:00:00.000Z" }
On this page
Overview
- Request Headers
- Request Body
- Response Body