视频特效

POST /kling/v1/videos/effects

MethodPOST
Path/kling/v1/videos/effects
Typehttp
Status1
Module2102810
Folder46920504

说明

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

概览

MethodPOST
Path/kling/v1/videos/effects
Typehttp
Status1
Module2102810
Folder46920504

参数

{
  "query": [],
  "path": [],
  "cookie": [],
  "header": [
    {
      "id": "NQs7bxnpZf",
      "name": "Content-Type",
      "required": true,
      "description": "",
      "type": "string",
      "enable": true,
      "sampleValue": "application/json"
    },
    {
      "id": "qb8tEQbCty",
      "name": "Accept",
      "required": true,
      "description": "",
      "type": "string",
      "enable": true,
      "sampleValue": "application/json"
    },
    {
      "required": true,
      "description": "",
      "type": "string",
      "id": "gBxcCbXhsa",
      "enable": true,
      "name": "Authorization",
      "sampleValue": "Bearer {{YOUR_API_KEY}}"
    }
  ]
}

请求体

{
  "type": "application/json",
  "parameters": [],
  "jsonSchema": {
    "type": "object",
    "properties": {
      "effect_scene": {
        "type": "string",
        "title": "场景名称"
      },
      "input": {
        "type": "object",
        "properties": {
          "model_name": {
            "type": "string",
            "title": "模型名称",
            "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"
          },
          "mode": {
            "type": "string",
            "title": "生成视频的模式",
            "description": "枚举值:std,pro\n其中std:标准模式(标准),基础模式,性价比高\n其中pro:专家模式(高品质),高表现模式,生成视频质量更佳"
          },
          "images": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "title": "参考图像组"
          },
          "duration": {
            "type": "string",
            "title": "生成视频时长,单位s",
            "description": "枚举值:5,10"
          }
        },
        "required": [
          "images",
          "duration"
        ],
        "x-apifox-orders": [
          "model_name",
          "mode",
          "images",
          "duration"
        ]
      }
    },
    "required": [
      "effect_scene",
      "input"
    ],
    "x-apifox-orders": [
      "effect_scene",
      "input"
    ]
  },
  "mediaType": "",
  "examples": [
    {
      "value": "{\n  \"effect_scene\": \"hug\",\n  \"input\":{\n  \t\"model_name\": \"kling-v1-6\",\n    \"mode\": \"std\",\n    \"images\":[\n      \"https://p2-kling.klingai.com/bs2/upload-ylab-stunt/c54e463c95816d959602f1f2541c62b2.png?x-kcdn-pid=112452\",\n      \"https://p2-kling.klingai.com/bs2/upload-ylab-stunt/5eef15e03a70e1fa80732808a2f50f3f.png?x-kcdn-pid=112452\"\n    ],\n    \"duration\": \"5\"\n  }\n}\n",
      "mediaType": "application/json",
      "description": ""
    }
  ],
  "oasExtensions": ""
}

响应

[
  {
    "id": 808552043,
    "name": "成功",
    "code": 200,
    "contentType": "json",
    "jsonSchema": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer"
        },
        "message": {
          "type": "string"
        },
        "request_id": {
          "type": "string"
        },
        "data": {
          "type": "object",
          "properties": {
            "task_id": {
              "type": "string"
            },
            "task_status": {
              "type": "string"
            },
            "task_info": {
              "type": "object",
              "properties": {}
            },
            "created_at": {
              "type": "integer"
            },
            "updated_at": {
              "type": "integer"
            }
          },
          "required": [
            "task_id",
            "task_status",
            "task_info",
            "created_at",
            "updated_at"
          ]
        }
      },
      "required": [
        "code",
        "message",
        "request_id",
        "data"
      ]
    },
    "itemSchema": {},
    "description": "",
    "mediaType": "",
    "headers": [],
    "oasExtensions": ""
  }
]

响应示例

[
  {
    "name": "成功示例",
    "responseId": 808552043,
    "data": "{\r\n    \"code\": 0,\r\n    \"message\": \"SUCCEED\",\r\n    \"request_id\": \"8241f535-7462-4ea4-849a-e287081bc296\",\r\n    \"data\": {\r\n        \"task_id\": \"815336894036197446\",\r\n        \"task_status\": \"submitted\",\r\n        \"task_info\": {},\r\n        \"created_at\": 1762419982549,\r\n        \"updated_at\": 1762419982549\r\n    }\r\n}",
    "description": "",
    "oasKey": "",
    "oasExtensions": "",
    "id": 724029049
  }
]