Skip to main content
POST
/
vidu
/
ent
/
v2
/
text2audio
curl --request POST \
  --url https://api.powertokens.ai/vidu/ent/v2/text2audio \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "audio1.0",
  "prompt": "Sound of raindrops falling on windows, accompanied by distant thunder",
  "duration": 10,
  "seed": 42
}
'

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <token> in the request header.

Body

application/json
model
enum<string>
required

Audio generation model name.

  • audio1.0: Supports generating audio based on text prompts
Available options:
audio1.0
prompt
string
required

Text prompt describing the audio to be generated, with a maximum length of 1500 characters.

Maximum string length: 1500
duration
number<float>
default:10

Audio duration in seconds.

  • Default: 10 seconds
  • Range: 2-10 seconds
Required range: 2 <= x <= 10
seed
integer

Random seed.

  • If not provided or set to 0, a random value will be used
  • Fixed value ensures reproducibility
callback_url
string

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

200

Submission successful, returns an audio task object.