返回模型调用 API 参考
POST/kling/v1/videos/text2video

文生视频

API Key application/json

请求示例

curl -X POST https://top.qingyuntop.ai/kling/v1/videos/text2video \
  -H "Authorization: Bearer ${QINGYUN_TOP_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "model_name": "kling-v1",
    "prompt": "生成一个海边有一个人跳舞的视频",
    "negative_prompt": "",
    "cfg_scale": 0.5,
    "mode": "std",
    "sound": "off",
    "camera_control": {
        "type": "simple",
        "config": {
            "horizontal": 1.0,
            "vertical": 0,
            "pan": 0,
            "tilt": 0,
            "roll": 0,
            "zoom": 0
        }
    },
    "aspect_ratio": "16:9",
    "duration": "5",
    "callback_url": "",
    "external_task_id": ""
}'

请求参数

参数位置类型必填说明示例
Content-TypeHeaderstring-application/json
AuthorizationHeaderstring-Bearer {{YOUR_API_KEY}}
model_nameJSON bodystring 模型名称 枚举值:kling-v1,kling-v1-6, kling-v2-master, kling-v2-1-master, kling-v2-5-turbo,kling-v3-
promptJSON bodystring正向文本提示词不能超过2500个字符-
multi_shotJSON bodyboolean是否生成多镜头视频 当前参数为true时,prompt参数无效 当前参数为false时,shot_type参数及multi_prompt参数无效-
shot_typeJSON bodystring分镜方式 枚举值:customize 当multi_shot参数为true时,当前参数必填 -
multi_promptJSON bodyarray<object>各分镜信息,如提示词、时长等 ● 通过index、prompt、duration参数定义分镜序号及相应提示词和时长,其中: ○ 最多支持6个分镜,最小支持1个分镜 ○ 每个分镜相关内容的最大长度不超过512 ○ 每个分镜的时长不大于当前任务的总时长,不小于1 ○ 所有分镜的时长之和等于当前任务的总时长-
multi_prompt[].indexJSON bodyinteger--
multi_prompt[].promptJSON bodystring--
multi_prompt[].durationJSON bodystring--
negative_promptJSON bodystring负向文本提示词不能超过2500个字符-
cfg_scaleJSON bodynumber生成视频的自由度;值越大,模型自由度越小,与用户输入的提示词相关性越强-
modeJSON bodystring生成视频的模式 枚举值:std,pro 其中std:标准模式(标准),基础模式,性价比高 其中pro:专家模式(高品质),高表现模式,生成视频质量更佳-
soundJSON bodystring生成视频时是否同时生成声音枚举值:on,off仅V2.6及后续版本模型支持当前参数-
camera_controlJSON bodyobject控制摄像机运动的协议(如未指定,模型将根据输入的文本/图片进行智能匹配)-
camera_control.typeJSON bodystring--
camera_control.configJSON bodyobject--
camera_control.config.horizontalJSON bodyinteger--
camera_control.config.verticalJSON bodyinteger--
camera_control.config.panJSON bodyinteger--
camera_control.config.tiltJSON bodyinteger--
camera_control.config.rollJSON bodyinteger--
camera_control.config.zoomJSON bodyinteger--
aspect_ratioJSON bodystring生成视频的画面纵横比(宽:高)-
durationJSON bodystring生成视频时长,单位s-
watermark_infoJSON bodyobject是否同时生成含水印的结果 ● 通过enabled参数定义,用key:value承载,如下:: "watermark_info": { "enabled": boolean // true 为生成,false 为不生成 }-
watermark_info.enabledJSON bodyboolean--
callback_urlJSON bodystring--
external_task_idJSON bodystring--

返回响应 (200)

此部分没有定义参数。

响应示例

{
    "code": 0,
    "message": "SUCCEED",
    "request_id": "603e2a28-fb89-4146-ae33-412d74012a6d",
    "data": {
        "task_id": "831922345719271433",
        "task_status": "submitted",
        "task_info": {},
        "created_at": 1766374262370,
        "updated_at": 1766374262370
    }
}
来源原始接口定义(用于追溯)

以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。

{
  "id": 495899782,
  "name": "文生视频",
  "type": "http",
  "serverId": "",
  "preProcessors": [],
  "postProcessors": [],
  "inheritPreProcessors": {},
  "inheritPostProcessors": {},
  "description": "",
  "operationId": "",
  "sourceUrl": "",
  "method": "post",
  "path": "/kling/v1/videos/text2video",
  "tags": [],
  "status": 1,
  "requestBody": {
    "type": "application/json",
    "parameters": [],
    "jsonSchema": {
      "type": "object",
      "properties": {
        "model_name": {
          "type": "string",
          "description": " 模型名称 枚举值:kling-v1,kling-v1-6, kling-v2-master, kling-v2-1-master, kling-v2-5-turbo,kling-v3"
        },
        "prompt": {
          "type": "string",
          "description": "正向文本提示词不能超过2500个字符"
        },
        "multi_shot": {
          "type": "boolean",
          "description": "是否生成多镜头视频\n当前参数为true时,prompt参数无效\n当前参数为false时,shot_type参数及multi_prompt参数无效"
        },
        "shot_type": {
          "type": "string",
          "description": "分镜方式\n枚举值:customize\n当multi_shot参数为true时,当前参数必填 "
        },
        "multi_prompt": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "index": {
                "type": "integer"
              },
              "prompt": {
                "type": "string"
              },
              "duration": {
                "type": "string"
              }
            },
            "required": [
              "index",
              "prompt",
              "duration"
            ],
            "x-apifox-orders": [
              "index",
              "prompt",
              "duration"
            ]
          },
          "description": "各分镜信息,如提示词、时长等\n● 通过index、prompt、duration参数定义分镜序号及相应提示词和时长,其中:\n\t○ 最多支持6个分镜,最小支持1个分镜\n\t○ 每个分镜相关内容的最大长度不超过512\n\t○ 每个分镜的时长不大于当前任务的总时长,不小于1\n\t○ 所有分镜的时长之和等于当前任务的总时长"
        },
        "negative_prompt": {
          "type": "string",
          "description": "负向文本提示词不能超过2500个字符"
        },
        "cfg_scale": {
          "type": "number",
          "description": "生成视频的自由度;值越大,模型自由度越小,与用户输入的提示词相关性越强"
        },
        "mode": {
          "type": "string",
          "description": "生成视频的模式\n枚举值:std,pro\n其中std:标准模式(标准),基础模式,性价比高\n其中pro:专家模式(高品质),高表现模式,生成视频质量更佳"
        },
        "sound": {
          "type": "string",
          "description": "生成视频时是否同时生成声音枚举值:on,off仅V2.6及后续版本模型支持当前参数"
        },
        "aspect_ratio": {
          "type": "string",
          "description": "生成视频的画面纵横比(宽:高)"
        },
        "duration": {
          "type": "string",
          "description": "生成视频时长,单位s"
        },
        "callback_url": {
          "type": "string"
        },
        "external_task_id": {
          "type": "string"
        },
        "watermark_info": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          },
          "required": [
            "enabled"
          ],
          "x-apifox-orders": [
            "enabled"
          ],
          "description": "是否同时生成含水印的结果\n● 通过enabled参数定义,用key:value承载,如下::\n\"watermark_info\": {\n \t\"enabled\": boolean // true 为生成,false 为不生成\n}"
        },
        "camera_control": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string"
            },
            "config": {
              "type": "object",
              "properties": {
                "horizontal": {
                  "type": "integer"
                },
                "vertical": {
                  "type": "integer"
                },
                "pan": {
                  "type": "integer"
                },
                "tilt": {
                  "type": "integer"
                },
                "roll": {
                  "type": "integer"
                },
                "zoom": {
                  "type": "integer"
                }
              },
              "required": [
                "horizontal",
                "vertical",
                "pan",
                "tilt",
                "roll",
                "zoom"
              ],
              "x-apifox-orders": [
                "horizontal",
                "vertical",
                "pan",
                "tilt",
                "roll",
                "zoom"
              ]
            }
          },
          "required": [
            "type",
            "config"
          ],
          "x-apifox-orders": [
            "type",
            "config"
          ],
          "description": "控制摄像机运动的协议(如未指定,模型将根据输入的文本/图片进行智能匹配)"
        }
      },
      "required": [
        "model_name",
        "mode",
        "duration",
        "multi_shot"
      ],
      "x-apifox-orders": [
        "model_name",
        "prompt",
        "multi_shot",
        "shot_type",
        "multi_prompt",
        "negative_prompt",
        "cfg_scale",
        "mode",
        "sound",
        "camera_control",
        "aspect_ratio",
        "duration",
        "watermark_info",
        "callback_url",
        "external_task_id"
      ]
    },
    "examples": [
      {
        "mediaType": "application/json",
        "value": "{\r\n    \"model_name\": \"kling-v1\",\r\n    \"prompt\": \"生成一个海边有一个人跳舞的视频\",\r\n    \"negative_prompt\": \"\",\r\n    \"cfg_scale\": 0.5,\r\n    \"mode\": \"std\",\r\n    \"sound\": \"off\",\r\n    \"camera_control\": {\r\n        \"type\": \"simple\",\r\n        \"config\": {\r\n            \"horizontal\": 1.0,\r\n            \"vertical\": 0,\r\n            \"pan\": 0,\r\n            \"tilt\": 0,\r\n            \"roll\": 0,\r\n            \"zoom\": 0\r\n        }\r\n    },\r\n    \"aspect_ratio\": \"16:9\",\r\n    \"duration\": \"5\",\r\n    \"callback_url\": \"\",\r\n    \"external_task_id\": \"\"\r\n}"
      }
    ],
    "mediaType": "",
    "oasExtensions": "",
    "required": false,
    "additionalContentTypes": []
  },
  "parameters": {
    "path": [],
    "query": [],
    "cookie": [],
    "header": [
      {
        "id": "yNT6JuTem3",
        "name": "Content-Type",
        "required": false,
        "enable": true,
        "description": "",
        "type": "string",
        "sampleValue": "application/json"
      },
      {
        "id": "N6Xv4V3R04",
        "name": "Authorization",
        "required": false,
        "enable": true,
        "description": "",
        "type": "string",
        "sampleValue": "Bearer {{YOUR_API_KEY}}"
      }
    ]
  },
  "commonParameters": {
    "query": [],
    "body": [],
    "cookie": [],
    "header": []
  },
  "auth": {},
  "responses": [
    {
      "id": 118936275,
      "name": "成功",
      "code": 200,
      "contentType": "json",
      "jsonSchema": {
        "type": "object",
        "properties": {},
        "x-apifox-orders": []
      },
      "itemSchema": {},
      "description": "",
      "mediaType": "",
      "headers": []
    }
  ],
  "responseExamples": [
    {
      "name": "成功示例",
      "responseId": 118936275,
      "data": "{\r\n    \"code\": 0,\r\n    \"message\": \"SUCCEED\",\r\n    \"request_id\": \"603e2a28-fb89-4146-ae33-412d74012a6d\",\r\n    \"data\": {\r\n        \"task_id\": \"831922345719271433\",\r\n        \"task_status\": \"submitted\",\r\n        \"task_info\": {},\r\n        \"created_at\": 1766374262370,\r\n        \"updated_at\": 1766374262370\r\n    }\r\n}",
      "description": "",
      "oasKey": "",
      "oasExtensions": "",
      "id": "019fc09b-0b25-758c-8a9f-da727f6d6aec"
    }
  ],
  "codeSamples": [],
  "projectId": 8662722,
  "moduleId": 8310462,
  "folderId": 92436139,
  "ordering": 0,
  "responsibleId": 0,
  "commonResponseStatus": {},
  "advancedSettings": {
    "disabledSystemHeaders": {}
  },
  "customApiFields": {},
  "oasExtensions": "",
  "mockScript": {},
  "createdAt": "2026-08-02T03:53:34.000Z",
  "updatedAt": "2026-08-06T12:15:55.000Z",
  "creatorId": 2863449,
  "editorId": 2863449,
  "creatorUserId": 2863449,
  "editorUserId": 2863449,
  "responseChildren": [],
  "visibility": "INHERITED",
  "securityScheme": {},
  "callbacks": ""
}