跳转到内容
打开 Castaly控制台

视频

kling-3.0-turbo API

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

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

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

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

提示词:A skateboarder launches a kickflip over a concrete stair set in a skate park at golden hour. Low-angle slow-motion tracking shot, the board spins under his feet, dust and sunlight flare, he lands and rolls past the camera. Realistic physics, cinematic sports film, no text.

生成该示例的请求
{
"model": "kling-3.0-turbo",
"prompt": "A skateboarder launches a kickflip over a concrete stair set in a skate park at golden hour. Low-angle slow-motion tracking shot, the board spins under his feet, dust and sunlight flare, he lands and rolls past the camera. Realistic physics, cinematic sports film, 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": "kling-3.0-turbo",
"prompt": "一只白猫在雨夜霓虹街道上奔跑,电影感跟拍",
"settings": {"duration": 5, "resolution": "720p"}
}'

提交成功后保存任务 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 3.0 Turbo 通过 URL 路径选择模型,不在请求体放 model_name。文生视频和首帧图生视频使用不同的官方路径。

字段 必填 说明
prompt 是 文生视频提示词,最长限制以官方页面为准
contents[] 条件 图生视频时包含 prompt 与 first_frame
settings.resolution 否 720p / 1080p
settings.aspect_ratio 否 16:9 / 9:16 / 1:1
settings.duration 否 3–15 秒
options.watermark_info 否 水印配置

文生视频与首帧图生视频分别使用 prompt 或 contents[]。输出 720p/1080p,时长 3–15 秒;多镜头最多 6 个镜头。

Turbo 使用升级版 contents/settings/options 请求结构;模型 ID 位于 Modelflare 的 model 字段,调用统一从 /v1/videos 进入。

终端窗口bash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-3.0-turbo",
"contents": [{"type": "prompt", "text": "列车缓慢驶过雨夜城市"}],
"settings": {"resolution": "1080p", "aspect_ratio": "16:9", "duration": 5},
"options": {"watermark_info": {"enabled": false}}
}'
终端窗口bash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-3.0-turbo",
"contents": [{"type": "prompt", "text": "角色转身看向窗外"}, {"type": "first_frame", "url": "https://example.com/first.png"}],
"settings": {"resolution": "1080p", "duration": 5}
}'

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

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

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

媒体契约 · v1

契约 ID: media.kling-3-0-turbo.v1Adapter: video.kling.turbo.v1@v1指纹: f7a701ee39bdcc6314f56777e8a6a52982a7bc918e4c9a2a00bf03435da425d3

官方来源: Kuaishou Kling

契约参数

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

支持能力

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

结构化请求示例

text

Intent

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

上游请求

{
  "contents": [
    {
      "text": "A red paper kite over a quiet harbour at dusk.",
      "type": "prompt"
    }
  ],
  "settings": {
    "aspect_ratio": "16:9",
    "duration": 3,
    "resolution": "720p"
  }
}

reference

Intent

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

上游请求

{
  "contents": [
    {
      "text": "A red paper kite over a quiet harbour at dusk.",
      "type": "prompt"
    },
    {
      "type": "first_frame",
      "url": "https://example.com/reference.png"
    }
  ],
  "settings": {
    "aspect_ratio": "16:9",
    "duration": 3,
    "resolution": "720p"
  }
}