Theme
Create Text-to-Audio Task
POST
https://www.kkiai.com/ent/v2/text2audio
Official documentation: https://platform.vidu.cn/docs/text-to-audio
Request Parameters
Authorization
Add the Authorization parameter to the Header. Its value is the Token concatenated after Bearer.
Example: Authorization: Bearer ********************
Header Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
Authorization | string | Optional | Bearer {{YOUR_API_KEY}} | |
Content-Type | string | Optional | application/json |
Body Parameters (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Required | Model name. Optional values: audio1.0 |
prompt | string | Required | Text prompt used to generate audio description. Character length cannot exceed 1500 characters |
duration | string | Optional | Audio duration. Default is 10, optional range: 2-10 seconds |
seed | string | Optional | Random seed. If not provided or 0 is passed, a random number is automatically generated. Pass a fixed value to generate deterministic results |
callback_url | string | Optional | Callback protocol. You need to actively set callback_url when creating a task. The request method is POST. When the audio generation task status changes, Vidu will send a callback request to this address containing the latest task status. The callback request content structure is consistent with the return body of the query task API. The "status" returned in the callback includes the following states: processing task is being processed, success task completed (if sending fails, callback three times), failed task failed (if sending fails, callback three times). Vidu uses a callback signature algorithm for authentication. For details, see: Callback Signature Algorithm |
Request Example
json
{
"model": "audio1.0",
"prompt": "The sound of raindrops falling on a window, accompanied by soft thunder.",
"duration": 5
}cURL Example
bash
curl --location --request POST 'https://www.kkiai.com/ent/v2/text2audio' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "audio1.0",
"prompt": "The sound of raindrops falling on a window, accompanied by soft thunder.",
"duration": 5
}'Response
🟢 200 Success
Response Body
| Parameter | Type | Required | Description |
|---|---|---|---|
task_id | string | Required | |
state | string | Required | |
model | string | Required | |
prompt | string | Required | |
duration | integer | Required | |
seed | integer | Required | |
created_at | string | Required | |
credits | integer | Required |
Response Example
json
{
"task_id": "911094612548939776",
"state": "created",
"model": "audio1.0",
"prompt": "The sound of raindrops falling on a window, accompanied by soft thunder.",
"duration": 5,
"seed": 0,
"created_at": "2026-01-20T07:16:38.094635957Z",
"credits": 10
}