OpenAPI 参考

Modelink API · 视频

Modelink 视频生成 API,涵盖 OpenAI 风格、Fal 队列、可灵、豆包 Seedance、Vidu、Veo 等多厂商的文生视频、图生视频与任务查询能力。Fal 格式接口使用 Authorization: Key {api_key};其他接口使用 Bearer 鉴权。

版本 1.0.0

文生视频

POST
/queue/fal-ai/kling-video/o3/{mode}/text-to-video

o3 text-to-video 支持 standard/pro/4k。

认证方式

FalApiKeyAuthAPI 密钥

Fal 格式接口鉴权方式:Authorization: Key {api_key}

header 参数:Authorization

路径参数

  • Name
    mode
    Type
    enum, 必填
    Description

    支持 standard/pro/4k。

查询参数

  • Name
    fal_webhook
    Type
    string<uri>
    Description

    可选。任务状态变化时接收 FAL 格式回调的 HTTPS 地址。详见 FAL 格式 Webhook

请求体

请求体属性

  • promptstring

    视频内容提示词。与 multi_prompt 互斥,最长 2500 个字符。

  • generate_audioboolean

    是否生成原生音频。默认 false。

    default: false

    • indexinteger

      分镜序号,从 1 开始。

    • promptstring

      该分镜的内容提示词。

    • durationstring

      该分镜的时长(秒);所有分镜总时长不能超过模型允许的总时长。

请求

POST/queue/fal-ai/kling-video/o3/{mode}/text-to-video
curl 'https://api.qnaigc.com/queue/fal-ai/kling-video/o3/{mode}/text-to-video?fal_webhook={fal_webhook}' \
  --request POST \
  --header 'Authorization: YOUR_FAL_API_KEY_AUTH' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "A mecha lands on the ground to save the city, and says \"I'\''m here\", in anime style"
}'

响应

object & object

任务已入队。

响应体属性

    • request_idstring, 必填

      任务唯一标识符。

    • response_urlstring, 必填

      获取结果的完整 URL。

    • status_urlstring, 必填

      查询状态的完整 URL。

    • cancel_urlstring

      取消任务的 URL(暂不支持)。

    • queue_positioninteger

      队列位置(入队时为 0)。

响应

application/json
{
  "request_id": "string",
  "response_url": "string",
  "status_url": "string",
  "cancel_url": "string",
  "status": "IN_QUEUE",
  "queue_position": 42,
  "logs": [
    {
      "message": "string",
      "level": "STDERR",
      "source": "string",
      "timestamp": "string"
    }
  ]
}

图生视频

POST
/queue/fal-ai/kling-video/o3/{mode}/image-to-video

o3 image-to-video 支持 standard/pro/4k。

认证方式

FalApiKeyAuthAPI 密钥

Fal 格式接口鉴权方式:Authorization: Key {api_key}

header 参数:Authorization

路径参数

  • Name
    mode
    Type
    enum, 必填
    Description

    支持 standard/pro/4k。

查询参数

  • Name
    fal_webhook
    Type
    string<uri>
    Description

    可选。任务状态变化时接收 FAL 格式回调的 HTTPS 地址。详见 FAL 格式 Webhook

请求体

请求体属性

  • promptstring

    视频内容提示词。与 multi_prompt 互斥。

  • image_urlstring<uri>, 必填

    视频首帧图像 URL,必填。

  • end_image_urlstring<uri>

    可选的视频尾帧图像 URL。

  • generate_audioboolean

    是否生成原生音频。默认 false。

    default: false

    • indexinteger

      分镜序号,从 1 开始。

    • promptstring

      该分镜的内容提示词。

    • durationstring

      该分镜的时长(秒);所有分镜总时长不能超过模型允许的总时长。

请求

POST/queue/fal-ai/kling-video/o3/{mode}/image-to-video
curl 'https://api.qnaigc.com/queue/fal-ai/kling-video/o3/{mode}/image-to-video?fal_webhook={fal_webhook}' \
  --request POST \
  --header 'Authorization: YOUR_FAL_API_KEY_AUTH' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "The character walks forward slowly, with the camera following from behind.",
  "image_url": "https://v3b.fal.media/files/b/0a8cfd5a/8ABMp4n9rh3kfD2Rq8fHd_start_frame.png"
}'

响应

object & object

任务已入队。

响应体属性

    • request_idstring, 必填

      任务唯一标识符。

    • response_urlstring, 必填

      获取结果的完整 URL。

    • status_urlstring, 必填

      查询状态的完整 URL。

    • cancel_urlstring

      取消任务的 URL(暂不支持)。

    • queue_positioninteger

      队列位置(入队时为 0)。

响应

application/json
{
  "request_id": "string",
  "response_url": "string",
  "status_url": "string",
  "cancel_url": "string",
  "status": "IN_QUEUE",
  "queue_position": 42,
  "logs": [
    {
      "message": "string",
      "level": "STDERR",
      "source": "string",
      "timestamp": "string"
    }
  ]
}

参考生视频

POST
/queue/fal-ai/kling-video/o3/{mode}/reference-to-video

o3 reference-to-video 支持 standard/pro/4k。

认证方式

FalApiKeyAuthAPI 密钥

Fal 格式接口鉴权方式:Authorization: Key {api_key}

header 参数:Authorization

路径参数

  • Name
    mode
    Type
    enum, 必填
    Description

    支持 standard/pro/4k。

查询参数

  • Name
    fal_webhook
    Type
    string<uri>
    Description

    可选。任务状态变化时接收 FAL 格式回调的 HTTPS 地址。详见 FAL 格式 Webhook

请求体

请求体属性

  • promptstring

    视频内容提示词。与 multi_prompt 互斥;可使用 @Image1、@Element1 等引用输入素材。

    • indexinteger

      分镜序号,从 1 开始。

    • promptstring

      该分镜的内容提示词。

    • durationstring

      该分镜的时长(秒);所有分镜总时长不能超过模型允许的总时长。

  • start_image_urlstring<uri>

    可选的视频首帧图像 URL。

  • end_image_urlstring<uri>

    可选的视频尾帧图像 URL。

  • image_urlsstring[]

    风格或外观参考图 URL 列表,在提示词中按 @Image1、@Image2 顺序引用。

  • generate_audioboolean

    是否生成原生音频。默认 false。

    default: false

请求

POST/queue/fal-ai/kling-video/o3/{mode}/reference-to-video
curl 'https://api.qnaigc.com/queue/fal-ai/kling-video/o3/{mode}/reference-to-video?fal_webhook={fal_webhook}' \
  --request POST \
  --header 'Authorization: YOUR_FAL_API_KEY_AUTH' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "从白天平滑过渡到夜晚,城市灯光逐渐亮起",
  "start_image_url": "https://aitoken-public.qnaigc.com/example/generate-video/running-man.jpg",
  "end_image_url": "https://aitoken-public.qnaigc.com/example/generate-video/running-man.jpg"
}'

响应

object & object

任务已入队。

响应体属性

    • request_idstring, 必填

      任务唯一标识符。

    • response_urlstring, 必填

      获取结果的完整 URL。

    • status_urlstring, 必填

      查询状态的完整 URL。

    • cancel_urlstring

      取消任务的 URL(暂不支持)。

    • queue_positioninteger

      队列位置(入队时为 0)。

响应

application/json
{
  "request_id": "string",
  "response_url": "string",
  "status_url": "string",
  "cancel_url": "string",
  "status": "IN_QUEUE",
  "queue_position": 42,
  "logs": [
    {
      "message": "string",
      "level": "STDERR",
      "source": "string",
      "timestamp": "string"
    }
  ]
}

视频参考生视频

POST
/queue/fal-ai/kling-video/o3/{mode}/video-to-video/reference

以参考视频的特征风格(refer_type=feature)生成新视频。固定使用 kling-v3-omni 模型,不支持 4k 模式。输出宽高比和时长可通过 aspect_ratio / duration 自定义。

认证方式

FalApiKeyAuthAPI 密钥

Fal 格式接口鉴权方式:Authorization: Key {api_key}

header 参数:Authorization

路径参数

  • Name
    mode
    Type
    enum, 必填
    Description

    支持 standard/std/pro,不支持 4k。

查询参数

  • Name
    fal_webhook
    Type
    string<uri>
    Description

    可选。任务状态变化时接收 FAL 格式回调的 HTTPS 地址。详见 FAL 格式 Webhook

请求体

请求体属性

  • promptstring, 必填

    视频生成文本描述。

  • video_urlstring, 必填

    输入参考视频的公网 URL。

  • image_urlsstring[]

    补充参考图片 URL 列表(可选)。

  • keep_audioboolean

    是否保留输入视频原声,默认 true。

  • durationstring

    输出视频时长(秒),有效范围 3~15。

请求

POST/queue/fal-ai/kling-video/o3/{mode}/video-to-video/reference
curl 'https://api.qnaigc.com/queue/fal-ai/kling-video/o3/{mode}/video-to-video/reference?fal_webhook={fal_webhook}' \
  --request POST \
  --header 'Authorization: YOUR_FAL_API_KEY_AUTH' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "Style @Video1 following watercolor style of @Image1",
  "video_url": "https://example.com/input.mp4",
  "aspect_ratio": "16:9",
  "duration": "5"
}'

响应

object & object

任务已入队。

响应体属性

    • request_idstring, 必填

      任务唯一标识符。

    • response_urlstring, 必填

      获取结果的完整 URL。

    • status_urlstring, 必填

      查询状态的完整 URL。

    • cancel_urlstring

      取消任务的 URL(暂不支持)。

    • queue_positioninteger

      队列位置(入队时为 0)。

响应

application/json
{
  "request_id": "string",
  "response_url": "string",
  "status_url": "string",
  "cancel_url": "string",
  "status": "IN_QUEUE",
  "queue_position": 42,
  "logs": [
    {
      "message": "string",
      "level": "STDERR",
      "source": "string",
      "timestamp": "string"
    }
  ]
}

视频编辑

POST
/queue/fal-ai/kling-video/o3/{mode}/video-to-video/edit

直接对已有视频做内容编辑(refer_type=base)。输出视频的尺寸和时长沿用输入视频,无需传 aspect_ratio / duration。固定使用 kling-v3-omni 模型,不支持 4k 模式。

认证方式

FalApiKeyAuthAPI 密钥

Fal 格式接口鉴权方式:Authorization: Key {api_key}

header 参数:Authorization

路径参数

  • Name
    mode
    Type
    enum, 必填
    Description

    支持 standard/std/pro,不支持 4k。

查询参数

  • Name
    fal_webhook
    Type
    string<uri>
    Description

    可选。任务状态变化时接收 FAL 格式回调的 HTTPS 地址。详见 FAL 格式 Webhook

请求体

请求体属性

  • promptstring, 必填

    编辑指令,描述对视频的修改内容。

  • video_urlstring, 必填

    待编辑视频的公网 URL。

  • image_urlsstring[]

    补充参考图片 URL 列表(可选)。

  • keep_audioboolean

    是否保留输入视频原声,默认 true。

请求

POST/queue/fal-ai/kling-video/o3/{mode}/video-to-video/edit
curl 'https://api.qnaigc.com/queue/fal-ai/kling-video/o3/{mode}/video-to-video/edit?fal_webhook={fal_webhook}' \
  --request POST \
  --header 'Authorization: YOUR_FAL_API_KEY_AUTH' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "Change environment to snow",
  "video_url": "https://example.com/input.mp4",
  "keep_audio": false
}'

响应

object & object

任务已入队。

响应体属性

    • request_idstring, 必填

      任务唯一标识符。

    • response_urlstring, 必填

      获取结果的完整 URL。

    • status_urlstring, 必填

      查询状态的完整 URL。

    • cancel_urlstring

      取消任务的 URL(暂不支持)。

    • queue_positioninteger

      队列位置(入队时为 0)。

响应

application/json
{
  "request_id": "string",
  "response_url": "string",
  "status_url": "string",
  "cancel_url": "string",
  "status": "IN_QUEUE",
  "queue_position": 42,
  "logs": [
    {
      "message": "string",
      "level": "STDERR",
      "source": "string",
      "timestamp": "string"
    }
  ]
}