视频
kling-3.0 API
通过 Modelflare 异步视频入口使用精确的 kling-3.0 模型 ID。
使用精确模型 ID kling-3.0。请求中的模型名必须与本页完全一致。
请求参数:duration=5resolution=1080pratio=16:9
提示词:Stop-motion claymation style: a small orange clay fox sneaks through a miniature felt forest, pauses, sniffs a glowing mushroom and jumps back in surprise. Handmade textures, visible fingerprints on the clay, soft tabletop lighting, charming and playful, no text.
{ "model": "kling-3.0", "prompt": "Stop-motion claymation style: a small orange clay fox sneaks through a miniature felt forest, pauses, sniffs a glowing mushroom and jumps back in surprise. Handmade textures, visible fingerprints on the clay, soft tabletop lighting, charming and playful, 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。
Authorization: Bearer YOUR_MODELFLARE_API_KEYcurl https://modelflare.dev/v1/videos \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model_name": "kling-3.0", "prompt": "一只白猫在雨夜霓虹街道上奔跑,电影感跟拍", "duration": "5", "mode": "std" }'任务查询与下载
Section titled “任务查询与下载”提交成功后保存任务 ID。使用 GET /v1/videos/{task_id} 轮询,完成后使用 GET /v1/videos/{task_id}/content 下载;结果地址可能过期,应及时转存。
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 Legacy 使用 model_name 和统一的 text2video / image2video 请求结构。具体模式、分辨率和音频档位以当前模型的官方页面与价格页为准。
| 字段 | 必填 | 说明 |
|---|---|---|
model_name |
是 | kling-3.0 |
prompt |
条件 | 文生视频必填;图生视频可与图片组合 |
image |
条件 | 首帧图片 URL 或 Base64 |
image_tail |
否 | 可选尾帧图片 |
video_url |
条件 | Kling 3.0 motion-control 的参考视频 |
image_list |
否 | Omni/O1 或多媒体工作流中的图片列表 |
negative_prompt |
否 | 负向提示词 |
mode |
否 | std / pro / 4k(视模型而定) |
duration |
否 | 3–15 秒(字符串) |
multi_shot |
否 | 是否启用多镜头分镜 |
sound |
否 | 支持时生成同步音效 |
camera_control |
否 | 运镜控制(模型支持时) |
输入与输出限制
Section titled “输入与输出限制”Kling Legacy 请求使用 model_name;mode、duration、image / image_tail、sound 和 camera_control 是否可用取决于具体模型。最低计费秒数和分辨率档位以价格页逐项列出的模型规格为准。
官方工作流示例
Section titled “官方工作流示例”Legacy 模型根据工作流选择 model_name、首帧/尾帧或 motion-control 字段;固定时长和音频限制以本页表格为准。
curl https://modelflare.dev/v1/videos \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model_name": "kling-3.0", "prompt": "转移动作并保持人物身份", "image": "https://example.com/character.png", "video_url": "https://example.com/motion.mp4", "duration": "5", "mode": "std" }'错误与失败任务
Section titled “错误与失败任务”参数不符合模型契约时,创建接口会返回带 request ID 的 4xx。异步任务也可能在创建成功后进入 failed;轮询响应中的 error_code 和 error_message 才是该任务的最终原因。不要把同一请求改成另一种 JSON 结构重试。
本页只覆盖 Modelflare 的模型生成/编辑调用。搜索或地图增强、声音管理、元素库管理等资源型接口不属于本页的公开调用范围,也不需要作为模型请求字段传入。
本模型按视频秒计费。请查看模型价格页查看当前销售价、参考原价和完整规格。
媒体契约 · v1
官方来源: Kuaishou Kling
契约参数
| Intent 字段 | 控件 | 选项 |
|---|---|---|
ratio | select | 16:9 / 9:16 / 1:1 |
resolution | select | 720p / 1080p / 4k |
duration | select | 3 / 5 / 8 / 10 / 15 |
audio | switch | — |
支持能力
allowed_values·ratio· 16:9, 9:16, 1:1allowed_values·resolution· 720p, 1080p, 4kallowed_values·duration· 3, 5, 8, 10, 15max_assets·reference_asset_ids· 2
结构化请求示例
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-3.0",
"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": "https://example.com/reference.png",
"mode": "std",
"model_name": "kling-3.0",
"prompt": "A red paper kite over a quiet harbour at dusk.",
"sound": "off"
}