1. 可灵 Kling
梧柏API使用文档
WHBAI · Kling
  • WHBAI · Google Gemini 原生 (v1alpha)
  • WHBAI · Google Gemini 原生
  • WHBAI · Ideogram
  • WHBAI · Ideogram V3
  • WHBAI · Midjourney
  • WHBAI · Jimeng
  • WHBAI · Kling
  • WHBAI · Luma
  • WHBAI · Luma V1
  • WHBAI · Omni 视频
  • WHBAI · Pixverse
  • WHBAI · Runway
  • WHBAI · Sora2
  • WHBAI · 统一视频 VEO
  • WHBAI · Vidu
  • WHBAI · 豆包 Volc
  • WHBAI · Suno
  • WHBAI · Playground
  • WHBAI · 账号与令牌
  • WHBAI · 阿里 Pix
  • WHBAI · 阿里百炼
  • WHBAI · 私域人像
  • WHBAI · Fal.ai
  • WHBAI · Replicate
  • WHBAI · 腾讯云 VOD
  • WHBAI · MiniMax
  • WHBAI · 支持模型列表
  • WHBAI · Grok Imagine
  • WHBAI · Seedance 2.0
  • WHBAI · TypeSafe
  • WHBAI · OpenAI 兼容
  • 可灵 Kling
    • 文生音效
      POST
    • 文生视频
      POST
    • 图生视频
      POST
    • 文生图
      POST
    • 查询文生视频任务
      GET
    • Omni-Video
      POST
  • kling
    • 对口型
      POST
    • 虚拟试穿
      POST
    • 视频延长
      POST
    • 视频特效
      POST
    • 多图参考生视频
      POST
    • 查询任务(免费)
      GET
    • 查询任务(单个)
      GET
    • Omni-Image
      POST
    • 查询任务(单个)
      GET
    • 查询任务(单个)
      GET
    • 初始化待编辑视频
      POST
    • 增加视频选区
      POST
    • 删减视频选区
      POST
    • 预览已选区视频
      POST
    • 多模态视频
      POST
    • 查询任务(单个)
      GET
    • 查询任务(单个)
      GET
    • 查询任务(单个)
      GET
    • 查询任务(单个)
      GET
    • 多图参考生图
      POST
    • 查询任务(单个)
      GET
    • 文生视频
      POST
    • 图生视频
      POST
    • 查询视频
      GET
    • 查询任务(单个)
      GET
    • 扩图
      POST
    • 查询任务(单个)
      GET
    • 图像识别
      POST
    • 数字人
      POST
    • 查询任务(单个)
      GET
    • 查询任务(单个)
      GET
    • 视频生音效
      POST
    • 查询任务(单个)
      GET
    • 语音合成
      POST
    • 查询任务(单个)
      GET
    • 人脸识别
      POST
    • 对口型
      POST
    • 查询任务(单个)
      GET
    • 自定义音色
      POST
    • 查询自定义音色(单个)
      GET
    • 查询官方音色
      GET
    • 删除自定义音色
      POST
    • 动作控制
      POST
    • 查询任务(单个)
      GET
    • 主体(旧)
      POST
    • 主体(新版本)
      POST
    • 查询自定义主体(单个新版本)
      GET
    • 查询官方主体(列表新版本)
      GET
    • 删除自定义主体(新版本)
      POST
  • 数据模型
    • KlingTaskSubmitResponse
    • KlingTaskQueryResponse
    • KlingText2VideoRequest
    • KlingImage2VideoRequest
    • PostKlingV1ImagesGenerationsRequest
    • KlingOmniVideoRequest
    • NewApiError
  1. 可灵 Kling

图生视频

POST
/kling/v1/videos/image2video
以输入图片为起始帧生成视频。

网站中的模型与调用示例#

图生视频#

其他参数 请看 官方文档 https://app.klingai.com/cn/dev/document-api/apiReference/updateNotice
参数是一致的,对接时,仅需将请求域名、API key 改成我们

请求参数#

{
  "contentType": "application/json",
  "properties": {
    "callback_url": {
      "description": "回调通知地址,可选,用于接收任务状态更新",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Optional callback URL for task status updates."
        }
      }
    },
    "cfg_scale": {
      "description": "生成视频的自由度,可选,取值范围0-1,值越大相关性越强",
      "type": "number",
      "x-i18n": {
        "en-US": {
          "description": "Creativity/guidance for video generation (optional), range 0-1; higher values follow the prompt more closely."
        }
      }
    },
    "duration": {
      "description": "生成视频时长,单位秒,可选值:5或10(注意:包含尾帧的请求仅支持5秒)",
      "type": "number",
      "x-i18n": {
        "en-US": {
          "description": "Video duration in seconds: 5 or 10. Requests with an end frame only support 5 seconds."
        }
      }
    },
    "image": {
      "description": "参考图像,必需,支持Base64编码 或图片URL,支持.jpg/.jpeg/.png格式,大小不超过10MB,分辨率不小于300*300px\nbese64 不能传入 ",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Reference image (required). Base64 or URL. jpg/jpeg/png, max 10MB, min resolution 300x300px."
        }
      }
    },
    "image_tail": {
      "description": "参考图像-尾帧控制,可选,支持Base64编码或图片URL,支持.jpg/.jpeg/.png格式,大小不超过10MB,分辨率不小于300*300px",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "End-frame reference image (optional). Base64 or URL. jpg/jpeg/png, max 10MB, min 300x300px."
        }
      }
    },
    "model_name": {
      "description": "kling-v1、kling-v1-5、kling-v1-6,kling-v2-5-turbo\n",
      "type": "string"
    },
    "negative_prompt": {
      "description": "负向文本提示,可选,描述不想在视频中出现的元素,不超过2000字符",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Negative text prompt (optional). Elements to avoid. Max 2000 characters."
        }
      }
    },
    "prompt": {
      "description": "正向文本提示,可选,描述想要生成的视频内容,不超过5000字符",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Positive text prompt (optional). Describes desired video content. Max 5000 characters."
        }
      }
    }
  },
  "required": [
    "model_name",
    "image",
    "image_tail",
    "prompt",
    "negative_prompt",
    "cfg_scale",
    "duration",
    "callback_url"
  ]
}

请求示例 · 示例 1#

源文档已省略示例内容。

响应示例 · 成功示例#

{
  "code": 0,
  "data": {
    "created_at": 1762237353241,
    "task_id": "814570891207524415",
    "task_info": {},
    "task_status": "submitted",
    "updated_at": 1762237353241
  },
  "message": "SUCCEED",
  "request_id": "e5577399-0114-4538-a12b-52cbd2bf9683"
}

图生视频#

请求参数#

{
  "contentType": "application/json",
  "properties": {
    "aspect_ratio": {
      "description": "画幅比例(宽:高)。上游约束:常用 16:9 / 9:16 / 1:1,网关不预检枚举。",
      "enum": [
        "16:9",
        "9:16",
        "1:1"
      ],
      "type": "string",
      "x-apifox-enum": [
        {
          "description": "宽屏横构图",
          "name": "横屏",
          "value": "16:9"
        },
        {
          "description": "短视频竖构图",
          "name": "竖屏",
          "value": "9:16"
        },
        {
          "description": "正方形构图",
          "name": "方屏",
          "value": "1:1"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "Aspect ratio (width:height). Upstream constraints: commonly used 16:9 / 9:16 / 1:1, the gateway does not preflight enumeration."
        }
      }
    },
    "callback_url": {
      "description": "任务完成回调地址。上游任务结束后 POST 通知,须公网可达,网关原样透传。",
      "format": "uri",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Task completion callback address. POST notification after the upstream task is completed, the public network must be reachable, and the gateway transparently transmits the information as it is."
        }
      }
    },
    "camera_control": {
      "additionalProperties": false,
      "description": "镜头运动控制。不传则由模型智能匹配;网关透传,不预检具体数值范围。",
      "properties": {
        "config": {
          "additionalProperties": false,
          "description": "镜头运动参数配置",
          "properties": {
            "horizontal": {
              "description": "水平位移量",
              "type": "number",
              "x-i18n": {
                "en-US": {
                  "description": "Horizontal displacement"
                }
              }
            },
            "pan": {
              "description": "水平摇镜(左右)",
              "type": "number",
              "x-i18n": {
                "en-US": {
                  "description": "Horizontal panning (left and right)"
                }
              }
            },
            "roll": {
              "description": "旋转",
              "type": "number",
              "x-i18n": {
                "en-US": {
                  "description": "rotate"
                }
              }
            },
            "tilt": {
              "description": "垂直摇镜(上下)",
              "type": "number",
              "x-i18n": {
                "en-US": {
                  "description": "Vertical panning (up and down)"
                }
              }
            },
            "vertical": {
              "description": "垂直位移量",
              "type": "number",
              "x-i18n": {
                "en-US": {
                  "description": "vertical displacement"
                }
              }
            },
            "zoom": {
              "description": "变焦",
              "type": "number",
              "x-i18n": {
                "en-US": {
                  "description": "zoom"
                }
              }
            }
          },
          "type": "object",
          "x-i18n": {
            "en-US": {
              "description": "Lens motion parameter configuration"
            }
          }
        },
        "type": {
          "description": "控制类型,如 simple",
          "type": "string",
          "x-i18n": {
            "en-US": {
              "description": "Control type, such as simple"
            }
          }
        }
      },
      "type": "object",
      "x-i18n": {
        "en-US": {
          "description": "Lens motion control. If it is not transmitted, the model will intelligently match it; the gateway transparently transmits it and does not pre-check the specific value range."
        }
      }
    },
    "cfg_scale": {
      "description": "生成自由度(CFG)。值越大,生成结果与 prompt 相关性越强;网关不预检范围,上游约束通常 0~1。",
      "maximum": 1,
      "minimum": 0,
      "type": "number",
      "x-i18n": {
        "en-US": {
          "description": "Generate degrees of freedom (CFG). The larger the value, the stronger the correlation between the generated results and prompt; the gateway does not pre-check the range, and the upstream constraints are usually 0~1."
        }
      }
    },
    "duration": {
      "description": "视频时长(秒),必填。非 kling-v3:仅 5 或 10;kling-v3:3~15。支持 string 或 integer,网关归一化为字符串。",
      "oneOf": [
        {
          "pattern": "^[0-9]+$",
          "type": "string"
        },
        {
          "minimum": 1,
          "type": "integer"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "Video duration (seconds), required. Non-kling-v3: only 5 or 10; kling-v3: 3~15. Supports string or integer, gateway normalizes to string."
        }
      }
    },
    "external_task_id": {
      "description": "调用方外部任务 ID,用于幂等关联与业务对账;非响应体 data.task_id。",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "The caller's external task ID, used for idempotent association and business reconciliation; non-response body data.task_id."
        }
      }
    },
    "image": {
      "description": "输入图片 URL 或 Base64,必填。作为视频首帧参考;图生视频核心字段。格式/大小/分辨率由上游校验,网关仅校验非空。",
      "minLength": 1,
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Enter image URL or Base64, required. As a reference for the first frame of the video; Tusheng video core field. The format/size/resolution is verified by the upstream, the gateway only verifies that it is not empty."
        }
      }
    },
    "image_tail": {
      "description": "尾帧图片 URL 或 Base64,可选。与 image 配合实现首尾帧过渡;不传则仅由首帧生成。网关透传,不预检格式。",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "End frame image URL or Base64, optional. Cooperate with image to realize the transition between the first and last frames; if not passed, it will only be generated from the first frame. The gateway transmits transparently and does not pre-check the format."
        }
      }
    },
    "mode": {
      "description": "生成模式。不传时计费侧默认 std。4k 仅 kling-v3;kling-v2-6 开 sound 须 pro。",
      "enum": [
        "std",
        "pro",
        "4k"
      ],
      "type": "string",
      "x-apifox-enum": [
        {
          "description": "性价比模式",
          "name": "标准",
          "value": "std"
        },
        {
          "description": "高表现模式",
          "name": "高品质",
          "value": "pro"
        },
        {
          "description": "仅 kling-v3 支持",
          "name": "4K",
          "value": "4k"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "Generate schema. The billing side defaults to std when not transmitted. 4k only kling-v3; kling-v2-6 requires pro to open sound."
        }
      }
    },
    "model_name": {
      "description": "模型名称。不传时网关计费默认 kling-v1,建议显式填写。比 text2video 多 kling-v1-5 / kling-v2-1。multi_shot=true 时必须为 kling-v3;mode=4k 时必须为 kling-v3。",
      "enum": [
        "kling-v1",
        "kling-v1-5",
        "kling-v1-6",
        "kling-v2-master",
        "kling-v2-1",
        "kling-v2-1-master",
        "kling-v2-5-turbo",
        "kling-v2-6",
        "kling-v3"
      ],
      "type": "string",
      "x-apifox-enum": [
        {
          "description": "经典图生视频,duration 仅 5/10 秒",
          "name": "V1",
          "value": "kling-v1"
        },
        {
          "description": "仅图生视频专有模型,duration 仅 5/10 秒",
          "name": "V1.5",
          "value": "kling-v1-5"
        },
        {
          "description": "V1.6 增强图生视频,duration 仅 5/10 秒",
          "name": "V1.6",
          "value": "kling-v1-6"
        },
        {
          "description": "大师版图生视频,duration 仅 5/10 秒",
          "name": "V2 Master",
          "value": "kling-v2-master"
        },
        {
          "description": "仅图生视频专有模型,duration 仅 5/10 秒",
          "name": "V2.1",
          "value": "kling-v2-1"
        },
        {
          "description": "V2.1 大师版图生视频,duration 仅 5/10 秒",
          "name": "V2.1 Master",
          "value": "kling-v2-1-master"
        },
        {
          "description": "Turbo 档图生视频,duration 仅 5/10 秒",
          "name": "V2.5 Turbo",
          "value": "kling-v2-5-turbo"
        },
        {
          "description": "支持有声(须 mode=pro + sound=on),duration 仅 5/10 秒",
          "name": "V2.6",
          "value": "kling-v2-6"
        },
        {
          "description": "支持 sound/4k/multi_shot,duration 3~15 秒",
          "name": "V3",
          "value": "kling-v3"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "Model name. When not transmitted, gateway accounting defaults to kling-v1, and it is recommended to fill it in explicitly. More kling-v1-5 / kling-v2-1 than text2video. It must be kling-v3 when multi_shot=true; it must be kling-v3 when mode=4k."
        }
      }
    },
    "multi_prompt": {
      "description": "自定义分镜列表。shot_type=customize 时必填,最多 6 镜。每镜 prompt≤512、duration≥1;各镜 duration 之和须等于顶层 duration(误差 ≤0.1)。",
      "items": {
        "additionalProperties": false,
        "properties": {
          "duration": {
            "description": "该分镜时长(秒),≥1",
            "oneOf": [
              {
                "pattern": "^[0-9]+(\\.[0-9]+)?$",
                "type": "string"
              },
              {
                "minimum": 1,
                "type": "number"
              },
              {
                "minimum": 1,
                "type": "integer"
              }
            ],
            "x-i18n": {
              "en-US": {
                "description": "The duration of the storyboard (seconds), ≥1"
              }
            }
          },
          "index": {
            "description": "分镜序号,从 1 起",
            "minimum": 1,
            "type": "integer",
            "x-i18n": {
              "en-US": {
                "description": "Storyboard number, starting from 1"
              }
            }
          },
          "prompt": {
            "description": "该分镜正向提示词,≤512 字符",
            "maxLength": 512,
            "minLength": 1,
            "type": "string",
            "x-i18n": {
              "en-US": {
                "description": "The storyboard’s positive prompt word, ≤512 characters"
              }
            }
          }
        },
        "required": [
          "index",
          "prompt",
          "duration"
        ],
        "type": "object"
      },
      "maxItems": 6,
      "type": "array",
      "x-i18n": {
        "en-US": {
          "description": "Customized storyboard list. Required when shot_type=customize, up to 6 shots. Each mirror prompt≤512, duration≥1; the sum of the durations of each mirror must be equal to the top-level duration (error ≤0.1)."
        }
      }
    },
    "multi_shot": {
      "default": false,
      "description": "是否多镜头。true 时仅 kling-v3 支持,且 prompt 无效;false 时 shot_type / multi_prompt 不可传,传了会 400。",
      "type": "boolean",
      "x-i18n": {
        "en-US": {
          "description": "Whether there are multiple lenses. When true, only kling-v3 supports it, and prompt is invalid; when false, shot_type / multi_prompt cannot be passed, and a 400 error will occur if it is passed."
        }
      }
    },
    "negative_prompt": {
      "description": "负向提示词。描述不希望出现的内容(如模糊、低画质、变形等),网关透传。",
      "maxLength": 2500,
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Negative cue words. Describe unwanted content (such as blur, low image quality, deformation, etc.), and the gateway transparently transmits it."
        }
      }
    },
    "prompt": {
      "description": "正向提示词。multi_shot=false(默认)时必填;multi_shot=true 时无效,传了会 400。描述画面运动、镜头与风格,上游约束 ≤2500 字符。",
      "maxLength": 2500,
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Positive cue words. Required when multi_shot=false (default); invalid when multi_shot=true, 400 will be sent. Describe movement, shots and style, upstream constraint ≤2500 characters."
        }
      }
    },
    "shot_type": {
      "description": "分镜方式。multi_shot=true 时必填;multi_shot=false 时不可传。customize 须配合 multi_prompt;intelligence 由上游自动拆镜。",
      "enum": [
        "customize",
        "intelligence"
      ],
      "type": "string",
      "x-apifox-enum": [
        {
          "description": "须传 multi_prompt,各镜 duration 之和须等于顶层 duration",
          "name": "自定义分镜",
          "value": "customize"
        },
        {
          "description": "不需 multi_prompt,由模型自动分镜",
          "name": "智能分镜",
          "value": "intelligence"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "Storyboarding method. Required when multi_shot=true; cannot be passed when multi_shot=false. customize must be used with multi_prompt; intelligence is automatically removed from the upstream."
        }
      }
    },
    "sound": {
      "description": "有声开关。网关仅对非空值做模型/模式校验;传 on 时触发有声计费。仅 kling-v2-6 / kling-v3 支持;v2-6 须 mode=pro。",
      "enum": [
        "on",
        "off"
      ],
      "type": "string",
      "x-apifox-enum": [
        {
          "description": "仅 v2-6 / v3;v2-6 需 mode=pro;配合 voice_list 可影响计费倍率",
          "name": "开启有声",
          "value": "on"
        },
        {
          "description": "默认无声",
          "name": "关闭有声",
          "value": "off"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "Audible switch. The gateway only performs model/schema verification on non-null values; triggers audible billing when on is passed. Only supported by kling-v2-6 / kling-v3; v2-6 requires mode=pro."
        }
      }
    },
    "voice_list": {
      "description": "自定义音色列表。sound=on 且非空时参与计费倍率(hasVoiceId);仅 image2video 路径识别,text2video 不计入。须配合 kling-v2-6 / kling-v3 有声能力。",
      "items": {
        "additionalProperties": false,
        "properties": {
          "voice_id": {
            "description": "自定义音色 ID,来自创建音色接口",
            "minLength": 1,
            "type": "string",
            "x-i18n": {
              "en-US": {
                "description": "Custom patch ID, from the create patch interface"
              }
            }
          }
        },
        "required": [
          "voice_id"
        ],
        "type": "object"
      },
      "type": "array",
      "x-i18n": {
        "en-US": {
          "description": "Custom sound list. Participate in the billing multiplier (hasVoiceId) when sound=on and is not empty; only image2video path identification, text2video is not included. Requires kling-v2-6 / kling-v3 audio capabilities."
        }
      }
    }
  },
  "required": [
    "model_name",
    "image",
    "duration"
  ]
}

请求示例 · 新手推荐:图生视频 · 最小可用提交通路#

{
  "duration": "5",
  "image": "{{image_url}}",
  "mode": "pro",
  "model_name": "kling-v2-6",
  "prompt": "A panda drinks coffee in a cozy cafe"
}

请求示例 · 新手推荐:图生视频 · V1 标准 5 秒#

{
  "duration": "5",
  "image": "{{image_url}}",
  "mode": "std",
  "model_name": "kling-v1",
  "prompt": "A cat slowly turns its head toward the camera"
}

请求示例 · 新手推荐:图生视频 · V2 Master 高品质 10 秒#

{
  "aspect_ratio": "16:9",
  "duration": "10",
  "image": "{{image_url}}",
  "mode": "pro",
  "model_name": "kling-v2-master",
  "prompt": "Cinematic dolly-in, soft rim light"
}

请求示例 · 新手推荐:图生视频 · V2.6 有声 pro#

{
  "duration": "5",
  "image": "{{image_url}}",
  "mode": "pro",
  "model_name": "kling-v2-6",
  "prompt": "A street musician plays violin, crowd ambience",
  "sound": "on"
}

请求示例 · 新手推荐:图生视频 · V3 按秒 8 秒#

{
  "duration": 8,
  "image": "{{image_url}}",
  "mode": "pro",
  "model_name": "kling-v3",
  "prompt": "Slow push-in shot with dramatic lighting"
}

请求示例 · 进阶推荐:图生视频 · 负向词与 cfg_scale#

{
  "aspect_ratio": "16:9",
  "cfg_scale": 0.7,
  "duration": "5",
  "image": "{{image_url}}",
  "mode": "std",
  "model_name": "kling-v1-6",
  "negative_prompt": "blurry, low quality, watermark",
  "prompt": "A white horse running on the beach at sunrise"
}

请求示例 · 进阶推荐:图生视频 · V2.6 有声指定音色#

{
  "duration": "10",
  "image": "{{image_url}}",
  "mode": "pro",
  "model_name": "kling-v2-6",
  "prompt": "A news anchor speaks to camera in a studio",
  "sound": "on",
  "voice_list": [
    {
      "voice_id": "{{voice_id}}"
    }
  ]
}

请求示例 · 进阶推荐:图生视频 · V3 4K 竖屏回调#

{
  "aspect_ratio": "9:16",
  "callback_url": "{{callback_url}}",
  "duration": 6,
  "external_task_id": "{{external_task_id}}",
  "image": "{{image_url}}",
  "mode": "4k",
  "model_name": "kling-v3",
  "prompt": "Cyberpunk portrait, rain reflections, high contrast"
}

请求示例 · 进阶推荐:图生视频 · V3 多镜头 customize#

{
  "duration": 6,
  "image": "{{image_url}}",
  "mode": "pro",
  "model_name": "kling-v3",
  "multi_prompt": [
    {
      "duration": 2,
      "index": 1,
      "prompt": "Wide shot of the city skyline at dusk"
    },
    {
      "duration": 2,
      "index": 2,
      "prompt": "Medium shot, character walks into frame"
    },
    {
      "duration": 2,
      "index": 3,
      "prompt": "Close-up on face, subtle smile"
    }
  ],
  "multi_shot": true,
  "shot_type": "customize"
}

请求示例 · 进阶推荐:图生视频 · 镜头控制 camera_control#

{
  "camera_control": {
    "config": {
      "horizontal": 0,
      "pan": 0,
      "roll": 0,
      "tilt": -2.5,
      "vertical": 0,
      "zoom": 1.5
    },
    "type": "simple"
  },
  "duration": "5",
  "image": "{{image_url}}",
  "mode": "pro",
  "model_name": "kling-v2-5-turbo",
  "prompt": "Drone-like forward movement over mountain valley"
}

请求参数

Authorization
Bearer Token
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
or
Body 参数application/json必填

示例
{
    "model_name": "kling-v2-6",
    "image": "{{image_url}}",
    "prompt": "A panda drinks coffee in a cozy cafe",
    "mode": "pro",
    "duration": "5"
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location '/kling/v1/videos/image2video' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "model_name": "kling-v2-6",
    "image": "{{image_url}}",
    "prompt": "A panda drinks coffee in a cozy cafe",
    "mode": "pro",
    "duration": "5"
}'

返回响应

🟢200成功
application/json
任务提交成功
Bodyapplication/json

示例
{
    "code": 0,
    "message": "success",
    "request_id": "string",
    "data": {
        "task_id": "string",
        "task_status": "submitted",
        "created_at": 0,
        "updated_at": 0
    }
}
🟠400请求有误
🟠401没有权限
修改于 2026-10-24 18:33:09
上一页
文生视频
下一页
文生图
Built with