Kling 4.0 Flash 参考转视频 API: 图像转视频

使用参考图像、视频和元素生成 Kling 4.0 Flash 视频。时长 3-20 秒,720p,支持原生音频。按次付费,无需订阅。 Kling 4.0 Flash Reference-to-Video 可根据参考图像、参考视频和具名元素生成 3-20 秒、720p 的片段,并带有原生音频;可在提示词中通过 @tags 引用这些素材。

交互式模型控制

Kling 4.0 Flash Reference-to-Video 可根据参考图像、参考视频和具名元素生成 3-20 秒、720p 的片段,并带有原生音频;可在提示词中通过 @tags 引用这些素材。

📝

概览

关于此模型

Kling 4.0 Flash Reference-to-Video 可根据你的素材生成 3-20 秒、720p 的片段,并带有原生音频:最多可提供 10 张参考图像、5 个参考视频和 7 个具名元素(每个元素可包含 2-4 张图像或一段 3-8 秒的角色视频),素材总数最多为 15 个。在提示词中使用 @image_1、@video_1 或 @name 提及每个素材,并通过元素的 voice_url 绑定角色音频。不提供素材时,它会按纯文本生成视频处理。如需 1080p、30 秒片段和独立音色,请使用 Kling 4.0 Reference to Video;如需为单张静态图像制作动画,请使用 Kling 4.0 Flash Keyframe to Video。

1角色:通过图像或视频元素,让具名角色在不同场景中保持一致。
2音色:通过元素的 voice_url 将参考音色绑定到角色。
3视频引导镜头:重用参考视频中的运动和场景,可保留或移除原始声音。
4广告:将产品、模特和背景参考组合成一个快速、低成本的镜头。
💰

价格与价值

成本分析

muapiapp$0.094 每秒(每个 5 秒片段 $0.47)

文本、关键帧和参考图像请求按生成视频每秒 $0.094/s 计费;若包含参考视频或视频元素,则按每秒 $0.126/s 计费。仅支持 720p。

** 竞品价格根据相似模型架构和使用层级估算。

⚙️

技术详情

配置参数

提示词string

Video description (max 8000 chars). Reference materials with @image_1, @video_1 or @name for elements/voices.

默认值@Hero sits at the desk in @video_1, picks up the doll from @image_1, and greets using @Narrator
参考图像 URLarray

最多 10 参考图像. Mention as @image_1, @image_2, ... in array order.

默认值undefined
参考视频 URLarray

最多 5 参考视频 (2-30s each, 30s combined). Mention as @video_1, @video_2, ...

默认值undefined
保留原声boolean

Keep the original audio of the 参考视频 (only applies when video_urls is set).

默认值false
Elementsarray

最多 7 named subjects (at most 3 can use video). Each needs 2-4 images or one 3-8 second video, not both. Mention each as @name.

默认值-
时长int

Video length (秒) (3-20).

默认值5
分辨率枚举(1 个选项)

Output resolution (Kling 4.0 Flash is 720p only).

默认值720p
画面比例枚举(5 个选项)

Output aspect ratio. Defaults to auto when reference media is provided, otherwise 16:9.

默认值-
📖

实施指南

开发者文档

如何使用 Kling 4.0 Flash Reference to Video

  1. 收集素材:提供 image_urls(最多 10 个)、video_urls(最多 5 个;与视频元素合计时为 2-20 秒)和 elements(最多 7 个,其中带视频的最多 3 个)。

  2. 在提示词中提及素材:@image_1、@video_1 按数组顺序对应;@Hero 使用某个元素的 name。每次提及都必须与请求中的素材匹配。

  3. 配置输出:设置 duration(3-20 秒)、aspect_ratio(auto、16:9、9:16、1:1、21:9)和 keep_original_sound。输出始终为 720p。

  4. 提交并获取结果:轮询 /api/v1/predictions/{request_id}/result,或传入 webhook_url。

curl -X POST https://api.muapi.ai/api/v1/kling-4.0-flash-reference-to-video \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"prompt": "@Hero sits at the desk, picks up the doll from @image_1 and greets the camera", "image_urls": ["https://example.com/doll.png"], "elements": [{"name": "Hero", "image_urls": ["https://example.com/hero-front.jpg", "https://example.com/hero-side.jpg"], "tag": "character", "voice_url": "https://example.com/hero-voice.mp3"}], "duration": 10}'
❓

常见问题

常见问答

时长和分辨率限制是什么?

每个片段时长为 3 到 20 秒,仅支持 720p。

我可以使用多少个参考素材?

最多可使用 10 张图像、5 个视频和 7 个元素(带视频的元素最多 3 个),素材总数最多为 15 个。参考视频与视频元素合计不得超过 5 个,且总时长必须为 2-20 秒。

如何在提示词中引用素材?

按数组顺序使用 @image_1、@video_1,或使用 @name 引用元素。提及的素材若不存在或不匹配,请求将被拒绝。

如何添加音色?

Flash 不支持独立音色。请在角色元素上设置 voice_url,将参考音频绑定到该角色。

如何计算价格?

按生成视频的秒数计费:使用参考图像或不提供参考素材时为 $0.094/s;包含参考视频或视频元素时为 $0.126/s。5 秒片段的费用分别为 $0.47 或 $0.63。

如何获取结果?

该接口为异步接口。轮询 /api/v1/predictions/{request_id}/result,或传入 webhook_url,以便在视频就绪时收到通知。