Skip to main content
POST
/
api
/
v1
/
jobs
/
createTask
Generate video from image using kling-2.6/image-to-video
curl --request POST \
  --url https://api.kie.ai/api/v1/jobs/createTask \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "kling-2.6/image-to-video",
  "callBackUrl": "https://your-domain.com/api/callback",
  "input": {
    "prompt": "In a bright rehearsal room, sunlight streams through the windows, and a standing microphone is placed in the center of the room. [Campus band female lead singer] stands in front of the microphone with her eyes closed, and other members stand around her. [Campus band female lead singer, singing loudly] Lead vocal: \"I will do my best to heal you, with all my heart and soul...\" The background is a cappella harmonies, and the camera slowly pans around the band members.",
    "image_urls": [
      "https://static.aiquickdraw.com/tools/example/1764851002741_i0lEiI8I.png"
    ],
    "sound": false,
    "duration": "5"
  }
}
'
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "task_kling-2.6_1765182405025"
  }
}

Query Task Status

After submitting a task, you can check the task progress and retrieve generation results via the unified query endpoint:

Get Task Details

Learn how to query task status and obtain generation results
In production environments, it is recommended to use the callBackUrl parameter to receive automatic notifications upon generation completion, rather than polling the status endpoint.

Authorizations

Authorization
string
header
required

All APIs require authentication via Bearer Token.

Obtaining an API Key:

  1. Visit the API Key Management Page to get your API Key

Usage Method: Add the following to the request header: Authorization: Bearer YOUR_API_KEY

Notes:

  • Keep your API Key secure and do not disclose it to others
  • If you suspect your API Key has been compromised, reset it immediately in the management page

Body

application/json
model
enum<string>
default:kling-2.6/image-to-video
required

Name of the model used for the generation task. Required field.

  • This endpoint must use the kling-2.6/image-to-video model
Available options:
kling-2.6/image-to-video
Example:

"kling-2.6/image-to-video"

callBackUrl
string<uri>

Callback URL to receive notifications when the generation task is completed. Optional configuration, recommended for production environments.

  • After the task is completed, the system will POST the task status and results to this URL
  • The callback content includes the generated resource URL and task-related information
  • Your callback endpoint needs to support receiving POST requests with JSON payloads
  • You can also choose to call the task details endpoint to actively poll the task status
Example:

"https://your-domain.com/api/callback"

input
object

Input parameters for the generation task

Response

Request successful

code
enum<integer>

Response status code

  • 200: Success - Request processed successfully
  • 401: Unauthorized - Authentication credentials missing or invalid
  • 402: Insufficient Credits - Account has insufficient credits to perform the operation
  • 404: Not Found - The requested resource or endpoint does not exist
  • 422: Validation Error - Request parameters failed validation
  • 429: Rate Limit Exceeded - Exceeded the request frequency limit for the resource
  • 455: Service Unavailable - System is under maintenance
  • 500: Server Error - Unexpected failure occurred while processing the request
  • 501: Generation Failed - Content generation task execution failed
  • 505: Function Disabled - The requested function is temporarily unavailable
Available options:
200,
401,
402,
404,
422,
429,
455,
500,
501,
505
msg
string

Response message, error description if the request fails

Example:

"success"

data
object