Skip to content

多图参考生视频 ​

接口与可灵官网一致;支持多张参考图片生成视频

  • 路径 POST /kling/v1/videos/multi-image2video
  • 与官网一致:本页所有请求体、字段命名与返回结构与可灵官网保持一致
  • 字段详解:请参考官网权威文档

请求参数

参数类型必填说明
model_namestring否模型名称,仅支持 kling-v1-6,默认 kling-v1-6
image_listarray是图片列表,1-4 张
promptstring是正向文本提示词
negative_promptstring否负向文本提示词
modestring否生成模式:std、pro,默认 std
durationstring否视频时长:5、10,默认 5
aspect_ratiostring否画面纵横比:16:9、9:16、1:1,默认 16:9
callback_urlstring否回调通知地址
external_task_idstring否自定义任务ID

image_list 格式

json
{
  "image_list": [
    {"image": "https://example.com/image1.jpg"},
    {"image": "https://example.com/image2.jpg"}
  ]
}

补充约束

  • image_list 最多 4 张图片;
  • duration 仅支持 5/10;
  • aspect_ratio 仅支持 16:9/9:16/1:1。

场景:多张参考图生成视频 ​

bash
curl --request POST \
  --url https://aiapi.fhddos.com/kling/v1/videos/multi-image2video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model_name": "kling-v1-6",
    "image_list": [
      {"image": "https://example.com/character-front.jpg"},
      {"image": "https://example.com/character-side.jpg"}
    ],
    "prompt": "The character turns around and waves at the camera",
    "mode": "std",
    "duration": "5",
    "aspect_ratio": "16:9"
  }'

示例响应

json
{
  "code": 0,
  "message": "success",
  "request_id": "req_1735558800_multi123",
  "data": {
    "task_id": "task_01JGHN...",
    "task_status": "submitted",
    "created_at": 1735558800000,
    "updated_at": 1735558800000
  }
}

任务查询

bash
# 查询单个任务
curl "https://aiapi.fhddos.com/kling/v1/videos/multi-image2video/$TASK_ID" \
  -H "Authorization: Bearer $TOKEN"

# 查询任务列表
curl "https://aiapi.fhddos.com/kling/v1/videos/multi-image2video?pageNum=1&pageSize=30" \
  -H "Authorization: Bearer $TOKEN"

OpenAPI ​

yaml
openapi: 3.0.3
info:
  title: Fhddos Core API
  version: '1.0'
  description: >-
    Core OpenAI-compatible and model-family endpoints used by the Fhddos user
    docs.
servers:
  - url: https://aiapi.fhddos.com
security:
  - BearerAuth: []
paths:
  /kling/v1/videos/multi-image2video:
    post:
      tags:
        - Kling
      summary: Kling multi-image to video
      requestBody:
        $ref: '#/components/requestBodies/MultipartObject'
      responses:
        '200':
          $ref: '#/components/responses/JsonObject'
components:
  requestBodies:
    MultipartObject:
      required: true
      content:
        multipart/form-data:
          schema:
            $ref: '#/components/schemas/GenericObject'
  responses:
    JsonObject:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericObject'
  schemas:
    GenericObject:
      type: object
      additionalProperties: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'Authorization: Bearer <token>'

Fhddos AI 用户文档