Skip to main content
POST
Kling 2.6
Generate videos from a single input image using the kling-2.6/image-to-video model.

Authentication

All API requests require a Bearer Token.

Create Video Task

Submit an image-to-video generation task using the following endpoint:

Request Body

string
required
Must be grok-imagine/image-to-video.
object
required
Input parameters for the video generation task.
string[]
External reference image URLs. Supports JPEG, PNG, and WEBP. Each image can be up to 10 MB. Do not use together with task_id.Use @image(n) in the prompt to reference an uploaded image, for example @image1 a sunset over the ocean.Only one image is supported at 1080p. Spicy mode is unavailable when using external images.
string
Optional English-language prompt describing motion, actions, camera work, timing, environment, and motion dynamics. Maximum length: 5000 characters.
boolean
default:"false"
This parameter specifies whether the generated video contains sound (boolean: true/false)
string
Generated video duration in seconds. Supported values: 5, 10.

Example Request

Response

Successful Response

A successful task creation request returns a task ID.
number
Response status code.
string
Response message. Contains the error description when the request fails.Example: success
object
required
The task data object containing task id.
string
required
The unique identifier for this task.Example: task_123456
Use the taskId to query the task status and retrieve generation results.

Get Task Details

Learn how to query task status and obtain generation results.

Error Response

Response Codes