Skip to main content
Glama

kling_generate_video_from_image

Generate AI video from a start image and optional end image, animating motion between frames for image animation or image-to-image transitions.

Instructions

Generate AI video using reference images as start and/or end frames.

This allows you to control the video by specifying what the first frame
and/or last frame should look like. Kling will generate smooth motion between them.

Use this when:
- You have a specific image you want to animate
- You want to create a video transition between two images
- You need precise control over the video's visual content

start_image_url is required. end_image_url is optional.

Returns:
    Task ID and generated video information including URLs and state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoGeneration mode. 'std' (standard, default), 'pro' (higher quality), or '4k' (native 4K, only for kling-v3 and kling-v3-omni).std
modelNoKling model to use. Default: 'kling-v2-master'.kling-v1
promptYesDescription of the video motion and content. Describe what should happen in the video, how objects should move, what transitions to include.
durationNoVideo duration in seconds. kling-v3/kling-v3-omni: 3-15; kling-o1: 5 only; other models: 5 or 10.
cfg_scaleNoClassifier-free guidance scale from 0 to 1. Not supported by Omni generation.
image_listNoAdditional Omni reference images for kling-o1 or kling-v3-omni. Do not set type='first_frame' or 'end_frame' when the same frame is already supplied through start_image_url or end_image_url.
video_listNoOne Omni reference video for kling-o1 or kling-v3-omni.
aspect_ratioNoVideo aspect ratio. Usually should match your input image ratio.16:9
callback_urlNoWebhook callback URL for asynchronous notifications.
end_image_urlNoURL of the image to use as the last frame of the video. The video will animate towards this image.
camera_controlNoStructured camera control. Not supported by Omni generation.
generate_audioNoWhether to generate audio synchronously. Supported by kling-v3, kling-v3-omni, and kling-v2-6 (pro mode only).
negative_promptNoThings to avoid in the video.
start_image_urlNoRequired URL of the image to use as the first frame of the video.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.24
    • addedInput schema / properties / generate_audio / anyOf
      Added value: +[
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / generate_audio / default
      Previous value: -falseNew value: +null
    • removedInput schema / properties / generate_audio / type
      Removed value: -"boolean"
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "kling-v1",
      -  "kling-v1-6",
      -  "kling-v2-master",
      -  "kling-v2-1-master",
      -  "kling-v2-5-turbo",
      -  "kling-v2-6",
      -  "kling-v3",
      -  "kling-v3-omni",
      -  "kling-o1"
      -]New value: +[
      +  "kling-v1",
      +  "kling-v1-6",
      +  "kling-v2-master",
      +  "kling-v2-1-master",
      +  "kling-v2-5-turbo",
      +  "kling-v2-6",
      +  "kling-v3",
      +  "kling-v3-turbo",
      +  "kling-v3-omni",
      +  "kling-o1"
      +]
  2. Changed1 schema field changedv0.1.23
    • addedInput schema / $defs / KlingCameraControlConfig / additionalProperties
      Added value: +{
      +  "maximum": 1,
      +  "minimum": -1,
      +  "type": "number"
      +}
  3. Changed2 schema fields changedv0.1.21
    • changedInput schema / properties / model / default
      Previous value: -"kling-v2-master"New value: +"kling-v1"
    • removedInput schema / properties / timeout
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "integer"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Timeout in seconds for the API to return data. Default is 300.",
      -  "title": "Timeout"
      -}
  4. Changed13 schema fields changedv0.1.18
    • addedInput schema / $defs
      Added value: +{
      +  "KlingCameraControl": {
      +    "description": "Structured camera-control request.",
      +    "properties": {
      +      "config": {
      +        "anyOf": [
      +          {
      +            "$ref": "#/$defs/KlingCameraControlConfig"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "type": {
      +        "enum": [
      +          "simple",
      +          "down_back",
      +          "forward_up",
      +          "left_turn_forward",
      +          "right_turn_forward"
      +        ],
      +        "title": "Type",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "title": "KlingCameraControl",
      +    "type": "object"
      +  },
      +  "KlingCameraControlConfig": {
      +    "description": "Numeric camera controls accepted by Kling's simple preset.",
      +    "properties": {
      +      "horizontal": {
      +        "anyOf": [
      +          {
      +            "maximum": 1,
      +            "minimum": -1,
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Horizontal"
      +      },
      +      "pan": {
      +        "anyOf": [
      +          {
      +            "maximum": 1,
      +            "minimum": -1,
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Pan"
      +      },
      +      "roll": {
      +        "anyOf": [
      +          {
      +            "maximum": 1,
      +            "minimum": -1,
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Roll"
      +      },
      +      "tilt": {
      +        "anyOf": [
      +          {
      +            "maximum": 1,
      +            "minimum": -1,
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Tilt"
      +      },
      +      "vertical": {
      +        "anyOf": [
      +          {
      +            "maximum": 1,
      +            "minimum": -1,
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Vertical"
      +      },
      +      "zoom": {
      +        "anyOf": [
      +          {
      +            "maximum": 1,
      +            "minimum": -1,
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Zoom"
      +      }
      +    },
      +    "title": "KlingCameraControlConfig",
      +    "type": "object"
      +  },
      +  "KlingReferenceImage": {
      +    "description": "Omni reference image, optionally used as a first or end frame.",
      +    "properties": {
      +      "image_url": {
      +        "format": "uri",
      +        "maxLength": 2083,
      +        "minLength": 1,
      +        "title": "Image Url",
      +        "type": "string"
      +      },
      +      "type": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "first_frame",
      +              "end_frame"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Type"
      +      }
      +    },
      +    "required": [
      +      "image_url"
      +    ],
      +    "title": "KlingReferenceImage",
      +    "type": "object"
      +  },
      +  "KlingReferenceVideo": {
      +    "description": "Omni feature reference or editable base video.",
      +    "properties": {
      +      "keep_original_sound": {
      +        "default": "no",
      +        "enum": [
      +          "yes",
      +          "no"
      +        ],
      +        "title": "Keep Original Sound",
      +        "type": "string"
      +      },
      +      "refer_type": {
      +        "default": "feature",
      +        "enum": [
      +          "feature",
      +          "base"
      +        ],
      +        "title": "Refer Type",
      +        "type": "string"
      +      },
      +      "video_url": {
      +        "format": "uri",
      +        "maxLength": 2083,
      +        "minLength": 1,
      +        "title": "Video Url",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "video_url"
      +    ],
      +    "title": "KlingReferenceVideo",
      +    "type": "object"
      +  }
      +}
    • changedInput schema / properties / camera_control / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "$ref": "#/$defs/KlingCameraControl"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / camera_control / description
      Previous value: -"Camera control as JSON string."New value: +"Structured camera control. Not supported by Omni generation."
    • removedInput schema / properties / camera_control / title
      Removed value: -"Camera Control"
    • changedInput schema / properties / cfg_scale / anyOf
      Previous value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maximum": 1,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / cfg_scale / description
      Previous value: -"Classifier-free guidance scale. Higher values follow the prompt more strictly."New value: +"Classifier-free guidance scale from 0 to 1. Not supported by Omni generation."
    • changedInput schema / properties / duration / description
      Previous value: -"Video duration in seconds. For kling-v3/kling-v3-omni: 3-15 (integer). Other models: 5 or 10."New value: +"Video duration in seconds. kling-v3/kling-v3-omni: 3-15; kling-o1: 5 only; other models: 5 or 10."
    • removedInput schema / properties / element_list
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "items": {},
      -      "type": "array"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "List of reference subjects from the subject library. Each item should contain an 'element_id'. If a reference video is present, reference subjects + reference images must be ≤ 4; otherwise ≤ 7.",
      -  "title": "Element List"
      -}
    • addedInput schema / properties / image_list
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "$ref": "#/$defs/KlingReferenceImage"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Additional Omni reference images for kling-o1 or kling-v3-omni. Do not set type='first_frame' or 'end_frame' when the same frame is already supplied through start_image_url or end_image_url.",
      +  "title": "Image List"
      +}
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "kling-v1",
      -  "kling-v1-6",
      -  "kling-v2-master",
      -  "kling-v2-1-master",
      -  "kling-v2-5-turbo",
      -  "kling-v2-6",
      -  "kling-v3",
      -  "kling-v3-omni",
      -  "kling-video-o1"
      -]New value: +[
      +  "kling-v1",
      +  "kling-v1-6",
      +  "kling-v2-master",
      +  "kling-v2-1-master",
      +  "kling-v2-5-turbo",
      +  "kling-v2-6",
      +  "kling-v3",
      +  "kling-v3-omni",
      +  "kling-o1"
      +]
    • changedInput schema / properties / start_image_url / description
      Previous value: -"URL of the image to use as the first frame of the video. The video will animate from this image."New value: +"Required URL of the image to use as the first frame of the video."
    • changedInput schema / properties / video_list / anyOf
      Previous value: -[
      -  {
      -    "items": {},
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "$ref": "#/$defs/KlingReferenceVideo"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / video_list / description
      Previous value: -"List of reference videos. Each item should contain a 'video_url' (MP4/MOV, 3-10s, 720-2160px, 24-60fps, ≤200MB, max 1 video) and optionally 'refer_type' ('feature' or 'base', default 'base') and 'keep_original_sound' ('yes' or 'no')."New value: +"One Omni reference video for kling-o1 or kling-v3-omni."
  5. Changed4 schema fields changedv0.1.13
    • addedInput schema / properties / element_list
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {},
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "List of reference subjects from the subject library. Each item should contain an 'element_id'. If a reference video is present, reference subjects + reference images must be ≤ 4; otherwise ≤ 7.",
      +  "title": "Element List"
      +}
    • changedInput schema / properties / mode / description
      Previous value: -"Generation mode. 'std' (standard, default) or 'pro' (higher quality)."New value: +"Generation mode. 'std' (standard, default), 'pro' (higher quality), or '4k' (native 4K, only for kling-v3 and kling-v3-omni)."
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "std",
      -  "pro"
      -]New value: +[
      +  "std",
      +  "pro",
      +  "4k"
      +]
    • addedInput schema / properties / video_list
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {},
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "List of reference videos. Each item should contain a 'video_url' (MP4/MOV, 3-10s, 720-2160px, 24-60fps, ≤200MB, max 1 video) and optionally 'refer_type' ('feature' or 'base', default 'base') and 'keep_original_sound' ('yes' or 'no').",
      +  "title": "Video List"
      +}
  6. Changed4 schema fields changedv0.1.1
    • changedInput schema / properties / duration / description
      Previous value: -"Video duration in seconds. Options: 5 (default) or 10."New value: +"Video duration in seconds. For kling-v3/kling-v3-omni: 3-15 (integer). Other models: 5 or 10."
    • removedInput schema / properties / duration / enum
      Removed value: -[
      -  5,
      -  10
      -]
    • addedInput schema / properties / generate_audio
      Added value: +{
      +  "default": false,
      +  "description": "Whether to generate audio synchronously. Supported by kling-v3, kling-v3-omni, and kling-v2-6 (pro mode only).",
      +  "title": "Generate Audio",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "kling-v1",
      -  "kling-v1-6",
      -  "kling-v2-master",
      -  "kling-v2-1-master",
      -  "kling-v2-5-turbo",
      -  "kling-video-o1"
      -]New value: +[
      +  "kling-v1",
      +  "kling-v1-6",
      +  "kling-v2-master",
      +  "kling-v2-1-master",
      +  "kling-v2-5-turbo",
      +  "kling-v2-6",
      +  "kling-v3",
      +  "kling-v3-omni",
      +  "kling-video-o1"
      +]
  7. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It implies an asynchronous flow by promising a Task ID and mentions that a callback_url/return state exist, but it omits rate limits, auth needs, and processing time. Critically, it claims 'start_image_url is required' while the schema lists only 'prompt' as required, creating an internal inconsistency that could mislead the agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core mechanism, then scannable bullets. Slightly redundant in repeating that start_image_url is required and end_image_url optional after already describing frames in prose, but overall tight.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a 14-parameter async generation tool with an output schema: the agent knows when to use it and the frame roles. However, it doesn't address the async task lifecycle or how this tool relates to look-alike siblings, and the required-vs-optional frame claim conflicts with the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description only restates the start/end frame roles, which the schema already documents; it adds nothing about model/mode/camera_control/audio interactions that the schema also covers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource+mechanism: generate AI video using reference images as start and/or end frames, and explains that Kling interpolates motion between them. This distinguishes it from text-driven siblings like kling_generate_video or kling_generate_turbo_video, though it never names those siblings explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Use this when' block gives three concrete scenarios (animate a specific image, transition between two images, precise visual control), which is clear situational context. It stops short of naming an alternative tool or stating when NOT to use this one.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.