跳转到内容
打开 Castaly控制台

视频

kling-o1 API

通过 Modelflare 异步视频入口使用精确的 kling-o1 模型 ID。

使用精确模型 ID kling-o1。请求中的模型名必须与本页完全一致。

示例输出kling-o1POST /v1/videos5.0s

请求参数:duration=5resolution=1080pratio=16:9

提示词:One continuous take, no cuts. A long subway escalator at night, tiled tunnel, nobody else on it. A figure in an oversized violet coat rides down with one hand on the rail; where the hand passes, the handrail stops being rubber and becomes a running river of liquid mercury that keeps flowing down both sides and pools at the bottom of the shaft, throwing the tunnel lights back as broken silver. The camera descends ahead of the figure, facing back up the escalator, and tilts down as the mercury reaches the floor. One hard cold key from the tunnel strip lights, a warm amber glow rising from the pool. Real weight and inertia, metal surface tension, no text.

生成该示例的请求
{
"model": "kling-o1",
"prompt": "One continuous take, no cuts. A long subway escalator at night, tiled tunnel, nobody else on it. A figure in an oversized violet coat rides down with one hand on the rail; where the hand passes, the handrail stops being rubber and becomes a running river of liquid mercury that keeps flowing down both sides and pools at the bottom of the shaft, throwing the tunnel lights back as broken silver. The camera descends ahead of the figure, facing back up the escalator, and tilts down as the mercury reaches the floor. One hard cold key from the tunnel strip lights, a warm amber glow rising from the pool. Real weight and inertia, metal surface tension, no text.",
"seconds": "5",
"duration": 5,
"resolution": "1080p",
"ratio": "16:9",
"aspect_ratio": "16:9"
}

使用 Modelflare API Key,通过 https://modelflare.dev/v1 发送请求。网关入口为 POST /v1/videos。

HTTP
Authorization: Bearer YOUR_MODELFLARE_API_KEY
终端窗口bash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_name": "kling-o1",
"prompt": "一只白猫在雨夜霓虹街道上奔跑,电影感跟拍",
"duration": "5", "mode": "std"
}'

提交成功后保存任务 ID。使用 GET /v1/videos/{task_id} 轮询,完成后使用 GET /v1/videos/{task_id}/content 下载;结果地址可能过期,应及时转存。

终端窗口bash
curl https://modelflare.dev/v1/videos/TASK_ID \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"

Kling 按模型族使用 model_name、prompt、mode、duration、image_list 或 contents / settings;原生 JSON 会保留并转发。

Kling Omni/O1 使用 model_name、prompt 和媒体列表。Omni 的 image_list、video_list、element_list、multi_shot 与 sound 组合必须遵循各模型官方限制。

字段 必填 说明
model_name 是 kling-o1
prompt 条件 未启用多镜头时必填
mode 否 std / pro
aspect_ratio 条件 16:9 / 9:16 / 1:1
duration 否 3–15 秒(字符串)
image_list 否 首帧/尾帧、场景或风格参考;Omni/O1 按模型限制支持多项
video_list 否 视频编辑或风格参考
element_list 否 可灵元素 ID;本集成不提供元素管理接口
multi_shot 否 是否启用多镜头分镜
sound 否 是否生成同步音效

O1 支持 720p/1080p、3–10 秒和图片/视频/元素参考;有 video_list 时 sound 必须关闭,且不支持 4k 或多镜头。

终端窗口bash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_name": "kling-o1",
"prompt": "让图 1 中的人物在雨中向镜头挥手",
"image_list": [{"image_url": "https://example.com/character.png"}],
"duration": "5", "mode": "pro", "aspect_ratio": "16:9", "sound": "off"
}'

参考视频、元素和多镜头组合必须遵循本页限制;有参考视频时关闭 sound。

参数不符合模型契约时,创建接口会返回带 request ID 的 4xx。异步任务也可能在创建成功后进入 failed;轮询响应中的 error_code 和 error_message 才是该任务的最终原因。不要把同一请求改成另一种 JSON 结构重试。

本页只覆盖 Modelflare 的模型生成/编辑调用。搜索或地图增强、声音管理、元素库管理等资源型接口不属于本页的公开调用范围,也不需要作为模型请求字段传入。

本模型按视频秒计费。请查看模型价格页查看当前销售价、参考原价和完整规格。

媒体契约 · v1

契约 ID: media.kling-o1.v1Adapter: video.kling.omni.v1@v1指纹: 64a427a3f22b5fe4674625e1d0b00f331fc9e2fcc37837e604944c682ec00002

官方来源: Kuaishou Kling

契约参数

Intent 字段控件选项
ratioselect16:9 / 9:16 / 1:1
resolutionselect720p / 1080p
durationselect3 / 5 / 8 / 10
audioswitch—

支持能力

  • allowed_values · ratio · 16:9, 9:16, 1:1
  • allowed_values · resolution · 720p, 1080p
  • allowed_values · duration · 3, 5, 8, 10
  • max_assets · reference_asset_ids · 7

结构化请求示例

text

Intent

{
  "audio": false,
  "duration": 3,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p"
}

上游请求

{
  "aspect_ratio": "16:9",
  "duration": "3",
  "mode": "std",
  "model_name": "kling-o1",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "sound": "off"
}

reference

Intent

{
  "audio": false,
  "duration": 3,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p"
}

上游请求

{
  "aspect_ratio": "16:9",
  "duration": "3",
  "image_list": [
    {
      "image_url": "https://example.com/reference.png"
    }
  ],
  "mode": "std",
  "model_name": "kling-o1",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "sound": "off"
}