POST
/
v3
/
async
/
kling-v1.6-i2v
curl --request POST \
  --url https://api.novita.ai/v3/async/kling-v1.6-i2v \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '{
  "mode": "<string>",
  "image_url": "<string>",
  "end_image_url": "<string>",
  "prompt": "<string>",
  "negative_prompt": "<string>",
  "guidance_scale": 123
}'
{
  "task_id": "<string>"
}

KLING V1.6 Image to Video is an AI image-to-video generation model developed by the Kuaishou AI Team. It transforms images into dynamic 5-second videos at 720p / 1080p resolution, offering high-quality visual outputs with enhanced motion and semantic understanding.

This is an asynchronous API; only the task_id will be returned. You should use the task_id to request the Task Result API to retrieve the video generation results.

Request Headers

Content-Type
string
required

Supports: application/json

Authorization
string
required

Bearer authentication format, for example: Bearer {{API Key}}.

Request Body

mode
string

The mode of the video generation.

Supports:

  • Standard: fast creation, lower cost, and generate 720p video.
  • Professional: high quality, higher cost, generate 1080p video, and allow set an end frame.

Default: Standard.

image_url
string
required

The URL of the start frame image to be used for video generation.

end_image_url
string

The URL of the end frame image to be used for video generation.

Only available when mode is Professional.
prompt
string
required

Prompt text required to guide the generation.

Range: 1 <= x <= 2000.

negative_prompt
string

Negative prompts instruct the model on what elements to avoid generating.

Range: 0 <= x <= 2000.

guidance_scale
float

Guidance scale parameter controls how closely the generated content follows the prompt.

Range: 0 <= x <= 1. Default: 0.5.

Response

task_id
string
required

Use the task_id to request the Task Result API to retrieve the generated outputs.

Example

Here is an example of how to use the KLING V1.6 Image to Video API.

  1. Generate a task_id by sending a POST request to the KLING V1.6 Image to Video API.

Request:

curl --location 'https://api.novita.ai/v3/async/kling-v1.6-i2v' \
--header 'Authorization: Bearer {{API Key}}' \
--header 'Content-Type: application/json' \
--data '{
    "mode": "Standard", 
    "image_url": "https://pub-f964a1c641c04024bce400ad128c8cd6.r2.dev/kling-v1.6-i2v-image",
    "prompt": "A cute dog standing up from a sitting position while wearing sunglasses",
    "negative_prompt": "low quality",
    "guidance_scale": 0.65
}'

Response:

{
    "task_id": "{Returned Task ID}"
}
  1. Use task_id to get output videos.

HTTP status codes in the 2xx range indicate that the request has been successfully accepted, while status codes in the 5xx range indicate internal server errors.

You can get videos url in videos of response.

Request:

curl --location --request GET 'https://api.novita.ai/v3/async/task-result?task_id={Returned Task ID}' \
--header 'Authorization: Bearer {{API Key}}'

Response:

{
    "task": {
        "task_id": "{Returned Task ID}",
        "task_type": "KLING_V16_I2V_STANDARD",
        "status": "TASK_STATUS_SUCCEED",
        "reason": "",
        "eta": 0,
        "progress_percent": 100
    },
    "images": [],
    "videos": [
        {
            "video_url": "{The URL of the generated video}",
            "video_url_ttl": "3600",
            "video_type": "mp4"
        }
    ]
}

Video files: