Create Video From Multiple Images

April 18, 2025 (June 27, 2025)

Table of contents

  1. Request Headers
  2. Request Body
  3. Responses
  4. Model
  5. Examples
  6. Try It

This endpoint generates a video from multiple images (up to 4) that will appear as elements in the video.

https://api.useapi.net/v1/kling/videos/image2video-elements

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
Request Body
{
  "email": "[email protected]",
  "prompt": "A museum gallery with artwork on display",
  "image_0": "https://example.com/image1.jpg",
  "image_1": "https://example.com/image2.jpg",
  "image_2": "https://example.com/image3.jpg",
  "image_3": "https://example.com/image4.jpg",
  "negative_prompt": "low quality, blurry, distorted",
  "duration": "5",
  "aspect_ratio": "16:9",
  "model_name": "kling-v1-6",
  "mode": "std",
  "replyUrl": "https://your-callback-url.com/webhook",
  "replyRef": "your-reference-id"
}
  • email is optional when only one account configured.
    However, if you have multiple accounts configured, this parameter becomes required.

  • prompt is required, text description of the video to generate.
    Maximum length: 2500 characters.

  • image_0 to image_3 are URLs to images that will appear in the video. At least one image must be provided.
    Images can be uploaded using POST /assets and the returned URLs can be used here.

  • negative_prompt is optional, what not to include in the generated video.
    Maximum length: 2500 characters.

  • duration is optional, length of the video in seconds.
    Supported values: 5 (default) or 10.

  • aspect_ratio is optional, the video aspect ratio.
    Supported values: 16:9 (default), 9:16, 1:1.

  • model_name is optional, the AI model version to use.
    Supported values: kling-v1-5, kling-v1-6 (default).
    Note: kling-v2-0 currently is not supported for this endpoint.

  • mode is optional, quality level.
    Supported values: std (standard, default) or pro (higher quality, slower generation).

  • enable_audio is optional, add sound effects.
    Supported values: false (default) or true.

  • maxJobs is optional, range from 1 to 50.
    Specifies the maximum number of concurrent jobs.

  • replyUrl is optional, a callback URL to receive generation progress and result.
    See GET /tasks/task_id for response model.

  • replyRef is optional, a reference identifier for the callback.

Note: At least one of image_0, image_1, image_2, or image_3 must be provided.

Responses
  • 200 OK

    {
      "task": {
        "id": 123456789,
        "userId": 12345,
        "type": "m2v_img2video_hq",
        "scene": "NORMAL_CREATION",
        "status": 5,
        "status_name": "submitted",
        "status_final": false,
        "taskInfo": {
          "type": "m2v_img2video_hq",
          "inputs": [
            {
              "name": "ref_img_0",
              "inputType": "URL",
              "token": null,
              "blobStorage": null,
              "url": "https://example.com/image1.jpg",
              "cover": null,
              "fromWorkId": null
            },
            {
              "name": "raw_ref_img_0",
              "inputType": "URL",
              "token": null,
              "blobStorage": null,
              "url": "https://example.com/image1.jpg",
              "cover": null,
              "fromWorkId": null
            },
            {
              "name": "ref_img_1",
              "inputType": "URL",
              "token": null,
              "blobStorage": null,
              "url": "https://example.com/image2.jpg",
              "cover": null,
              "fromWorkId": null
            },
            {
              "name": "raw_ref_img_1",
              "inputType": "URL",
              "token": null,
              "blobStorage": null,
              "url": "https://example.com/image2.jpg",
              "cover": null,
              "fromWorkId": null
            }
          ],
          "arguments": [
            {
              "name": "prompt",
              "value": "A museum gallery with artwork on display"
            },
            {
              "name": "negative_prompt",
              "value": "low quality, blurry, distorted"
            },
            {
              "name": "duration",
              "value": "5"
            },
            {
              "name": "aspect_ratio",
              "value": "16:9"
            },
            {
              "name": "kling_version",
              "value": "1.6"
            },
            {
              "name": "imageList",
              "value": "[{\"top\":0,\"left\":0,\"width\":1,\"height\":1},{\"top\":0,\"left\":0,\"width\":1,\"height\":1}]"
            }
          ],
          "extraArgs": {},
          "callbackPayloads": [],
          "scene": "NORMAL_CREATION"
        },
        "favored": false,
        "deleted": false,
        "viewed": false,
        "createTime": 1745376611075,
        "updateTime": 1745376611075
      },
      "works": [],
      "status": 5,
      "status_name": "submitted",
      "status_final": false,
      "message": "",
      "limitation": {
        "type": "m2v_img2video_hq",
        "remaining": 10000,
        "limit": 10000
      },
      "userPoints": {
        "points": [],
        "total": 0
      },
      "userTickets": {
        "ticket": []
      },
      "editProject": null
    }
    
  • 400 Bad Request

    {
      "error": "At least one image (image_0, image_1, image_2 or image_3) is required"
    }
    
  • 401 Unauthorized

    {
      "error": "Unauthorized",
      "code": 401
    }
    

When successful, the response includes a task ID which can be used to check the status using GET /tasks/task_id.

Model
{ // TypeScript, all fields are optional
    task: {
        id: number
        userId: number
        type: string
        scene: string
        status: number
        status_name: 'submitted' | 'failed' | 'processing' | 'succeed'
        status_final: boolean
        taskInfo: {
            type: string
            inputs: Array<{
                name: string
                inputType: string
                token: string | null
                blobStorage: any | null
                url: string
                cover: string | null
                fromWorkId: number | null
            }>
            arguments: Array<{
                name: string
                value: string
            }>
            extraArgs: Record<string, any>
            callbackPayloads: any[]
            scene: string
        }
        favored: boolean
        deleted: boolean
        viewed: boolean
        createTime: number
        updateTime: number
        viewTime: number
    }
    works: Array<any>
    status: number
    status_name: 'submitted' | 'failed' | 'processing' | 'succeed'
    status_final: boolean
    message: string
    limitation: {
        type: string
        remaining: number
        limit: number
    }
    userPoints: {
        points: Array<{
            orderId: string
            type: string
            amount: number
            balance: number
            startTime: number
            endTime: number
        }>
        total: number
    }
    userTickets: {
        ticket: Array<{
            orderId: string
            type: string
            packageType: string
            amount: number
            balance: number
            startTime: number
            endTime: number
        }>
    }
    editProject: any | null
}
Examples
  • curl -X POST "https://api.useapi.net/v1/kling/videos/image2video-elements" \
       -H "Content-Type: application/json" \
       -H "Authorization: Bearer …" \
       -d '{
         "email": "[email protected]",
         "prompt": "A museum gallery with artwork on display",
         "image_0": "https://example.com/image1.jpg",
         "image_1": "https://example.com/image2.jpg",
         "negative_prompt": "low quality, blurry, distorted"
       }'
    
  • const token = "API token";
    const email = "Previously configured account email";
    const apiUrl = "https://api.useapi.net/v1/kling/videos/image2video-elements"; 
    const response = await fetch(apiUrl, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer ${token}`,
      },
      body: JSON.stringify({
        email: email,
        prompt: "A museum gallery with artwork on display",
        image_0: "https://example.com/image1.jpg",
        image_1: "https://example.com/image2.jpg",
        negative_prompt: "low quality, blurry, distorted"
      })
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    email = "Previously configured account email"
    apiUrl = "https://api.useapi.net/v1/kling/videos/image2video-elements"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    data = {
        "email": email,
        "prompt": "A museum gallery with artwork on display",
        "image_0": "https://example.com/image1.jpg",
        "image_1": "https://example.com/image2.jpg",
        "negative_prompt": "low quality, blurry, distorted"
    }
    response = requests.post(apiUrl, headers=headers, json=data)
    print(response, response.json())
    
Try It