Skip to content

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

ParameterTypeRequiredDescriptionExample
AuthorizationstringOptionalBearer {{YOUR_API_KEY}}
Content-TypestringOptionalapplication/json

Body Parameters (application/json)

ParameterTypeRequiredDescription
modelstringRequiredModel name. Optional values: audio1.0
promptstringRequiredText prompt used to generate audio description. Character length cannot exceed 1500 characters
durationstringOptionalAudio duration. Default is 10, optional range: 2-10 seconds
seedstringOptionalRandom seed. If not provided or 0 is passed, a random number is automatically generated. Pass a fixed value to generate deterministic results
callback_urlstringOptionalCallback 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

ParameterTypeRequiredDescription
task_idstringRequired
statestringRequired
modelstringRequired
promptstringRequired
durationintegerRequired
seedintegerRequired
created_atstringRequired
creditsintegerRequired

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
}