Skip to content

Generate Video

POST https://www.kkiai.com/alibailian/api/v1/services/aigc/video-generation/video-synthesis

Request Parameters

Authorization

Add the Authorization parameter to the Header. Its value is the Token concatenated after Bearer.

Example: Authorization: Bearer ********************

Body Parameters (application/json)

ParameterTypeRequiredDescription
modelstringRequiredModel name. (Required) Used to specify the model for this video generation. Example value: wan2.5-i2v-preview.
inputobjectRequiredInput information. (Required) Basic input information such as prompts, images, etc.
  └ promptstringRequiredPrompt. (Optional) Used to describe the elements and visual characteristics expected to be included in the generated video.
  └ negative_promptstringRequiredNegative prompt. (Optional) Used to describe content that you do not want to see in the video.
  └ img_urlstringRequiredFirst frame image. (Required) URL or Base64 encoded data of the first frame image.
  └ audio_urlstringRequiredAudio file URL. (Optional, only supported by wan2.5-i2v-preview) The model will use this audio to generate the video.
  └ templatestringRequiredVideo effect template. (Optional) Name of the video effect template. If not specified, no video effects will be applied.
parametersobjectRequiredVideo processing parameters. (Optional) Advanced processing parameters for the video, such as setting resolution, duration, watermark, etc.
  └ resolutionstringRequiredVideo resolution. (Optional) Specify the resolution level of the generated video without changing the aspect ratio.
  └ durationintegerRequiredVideo duration. (Optional) Duration of the generated video in seconds. The value of this parameter depends on the model parameter.
  └ prompt_extendbooleanRequiredPrompt intelligent rewriting. (Optional) Whether to enable intelligent prompt rewriting. Default value is true.
  └ watermarkbooleanRequiredWatermark indicator. (Optional) Whether to add an "AI Generated" watermark. Default value is false.
  └ audiobooleanRequiredAuto-add audio. (Optional, only supported by wan2.5-i2v-preview) Controls whether to automatically add audio to the video. Only takes effect when audio_url is empty.
  └ seedintegerRequiredRandom seed. (Optional) Fixing the seed value helps improve the reproducibility of generation results.

Request Example

json
{
    "model": "wan2.5-i2v-preview",
    "input": {
        "prompt": "Change the lighting.",
        "img_url": "https://brainrot-yt-shorts.oss-cn-beijing.aliyuncs.com/images/cached/55a955b7e41723417281051d7bebdb45.png"
    },
    "parameters": {
        "resolution": "480P",
        "prompt_extend": true,
        // "duration": 5,
        "audio": true
    }
}

cURL Example

bash
curl --location --request POST 'https://www.kkiai.com/alibailian/api/v1/services/aigc/video-generation/video-synthesis' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "wan2.5-i2v-preview",
    "input": {
        "prompt": "Change the lighting.",
        "img_url": "https://brainrot-yt-shorts.oss-cn-beijing.aliyuncs.com/images/cached/55a955b7e41723417281051d7bebdb45.png"
    },
    "parameters": {
        "resolution": "480P",
        "prompt_extend": true,
        // "duration": 5,
        "audio": true
    }
}'

Response

🟢 200 Success

Response Body

ParameterTypeRequiredDescription
request_idstringRequired
outputobjectRequired
  └ task_idstringRequired
  └ task_statusstringRequired

Response Example

json
{
    "request_id": "ccffb21f-c21e-4eba-861a-6c80e6db6e4d",
    "output": {
        "task_id": "a55bfe14-6e78-4b9d-b97d-128420399ed1",
        "task_status": "PENDING"
    }
}