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
    • 文生音效
    • 文生视频
    • 图生视频
    • 文生图
    • 查询文生视频任务
    • Omni-Video
  • 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/effects

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

视频特效#

您可以根据 effect_scene 实现不同的特效效果,现支持:
单图特效:快来惹毛我fuzzyfuzzy、捏捏乐squish、万物膨胀expansion
双人互动特效: 3款,拥抱hug、亲吻kiss、比心heart_gesture
具体参数请看官方文档:https://app.klingai.com/cn/dev/document-api/apiReference/model/videoEffects
对接时,仅需将请求域名、API key 改成我们,

请求参数#

{
  "contentType": "application/json",
  "properties": {
    "effect_scene": {
      "title": "场景名称",
      "type": "string"
    },
    "input": {
      "properties": {
        "duration": {
          "description": "枚举值:5,10",
          "title": "生成视频时长,单位s",
          "type": "string"
        },
        "images": {
          "items": {
            "type": "string"
          },
          "title": "参考图像组",
          "type": "array"
        },
        "mode": {
          "description": "枚举值:std,pro\n其中std:标准模式(标准),基础模式,性价比高\n其中pro:专家模式(高品质),高表现模式,生成视频质量更佳",
          "title": "生成视频的模式",
          "type": "string"
        },
        "model_name": {
          "description": "枚举值:kling-v1, kling-v1-5, kling-v1-6\nfight 仅支持 kling-v1-6\nhug, kiss, heart_gesture支持 kling-v1, kling-v1-5, kling-v1-6\n仅双人特效需要传model_name",
          "title": "模型名称",
          "type": "string"
        }
      },
      "required": [
        "images",
        "duration"
      ],
      "type": "object"
    }
  },
  "required": [
    "effect_scene",
    "input"
  ]
}

请求示例 · 示例 1#

{
  "effect_scene": "hug",
  "input": {
    "duration": "5",
    "images": [
      "https://p2-kling.klingai.com/bs2/upload-ylab-stunt/c54e463c95816d959602f1f2541c62b2.png?x-kcdn-pid=112452",
      "https://p2-kling.klingai.com/bs2/upload-ylab-stunt/5eef15e03a70e1fa80732808a2f50f3f.png?x-kcdn-pid=112452"
    ],
    "mode": "std",
    "model_name": "kling-v1-6"
  }
}

响应示例 · 成功示例#

{
  "code": 0,
  "data": {
    "created_at": 1762419982549,
    "task_id": "815336894036197446",
    "task_info": {},
    "task_status": "submitted",
    "updated_at": 1762419982549
  },
  "message": "SUCCEED",
  "request_id": "8241f535-7462-4ea4-849a-e287081bc296"
}

视频特效#

请求参数#

{
  "contentType": "application/json",
  "properties": {
    "callback_url": {
      "type": "string"
    },
    "effect_scene": {
      "description": "场景名称",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "scene name"
        }
      }
    },
    "external_task_id": {
      "type": "string"
    },
    "input": {
      "description": "参考图像  支持传入图片Base64编码或图片URL(确保可访问)支持不同任务输入的结构体  根据scene不同,结构体里传的字段不同,具体如「场景请求体」所示",
      "properties": {
        "image": {
          "description": "单人 ",
          "type": "string",
          "x-i18n": {
            "en-US": {
              "description": "single person"
            }
          }
        },
        "images": {
          "description": "双人 ",
          "items": {
            "type": "string"
          },
          "type": "array",
          "x-i18n": {
            "en-US": {
              "description": "two people"
            }
          }
        }
      },
      "type": "object",
      "x-i18n": {
        "en-US": {
          "description": "Reference image (Base64 or reachable URL). Payload shape varies by scene; see scene request bodies"
        }
      }
    }
  },
  "required": [
    "effect_scene"
  ]
}

请求示例 · 示例 1#

{
  "effect_scene": "pet_lion",
  "input": {
    "image": "https://p4-kling.klingai.com/bs2/upload-ylab-stunt/c54e463c95816d959602f1f2541c62b2.png?x-kcdn-pid=112452"
  }
}

请求参数

Authorization
Bearer Token
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
or
Header 参数

Body 参数application/json必填

示例
{
    "effect_scene": "hug",
    "input": {
        "duration": "5",
        "images": [
            "https://p2-kling.klingai.com/bs2/upload-ylab-stunt/c54e463c95816d959602f1f2541c62b2.png?x-kcdn-pid=112452",
            "https://p2-kling.klingai.com/bs2/upload-ylab-stunt/5eef15e03a70e1fa80732808a2f50f3f.png?x-kcdn-pid=112452"
        ],
        "mode": "std",
        "model_name": "kling-v1-6"
    }
}

请求示例代码

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/effects' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "effect_scene": "hug",
    "input": {
        "duration": "5",
        "images": [
            "https://p2-kling.klingai.com/bs2/upload-ylab-stunt/c54e463c95816d959602f1f2541c62b2.png?x-kcdn-pid=112452",
            "https://p2-kling.klingai.com/bs2/upload-ylab-stunt/5eef15e03a70e1fa80732808a2f50f3f.png?x-kcdn-pid=112452"
        ],
        "mode": "std",
        "model_name": "kling-v1-6"
    }
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "code": 0,
    "message": "success",
    "data": {
        "task_id": "task_example_001"
    }
}
🟠400请求有误
🟠401没有权限
修改于 2026-10-24 18:33:09
上一页
视频延长
下一页
多图参考生视频
Built with