Vidu Text-to-Audio
Generate an audio clip (supports sound effects & BGM) by inputting a text prompt. After submission, query status via GET /vidu/v1/{task_id}.
Authorizations
Pass Authorization: Bearer <token> in the request header.
Body
Audio generation model name.
- audio1.0: Supports generating audio based on text prompts
audio1.0 Text prompt describing the audio to be generated, with a maximum length of 1500 characters.
1500Audio duration in seconds.
- Default: 10 seconds
- Range: 2-10 seconds
2 <= x <= 10Random seed.
- If not provided or set to 0, a random value will be used
- Fixed value ensures reproducibility
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
Response
Submission successful, returns an audio task object.