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

使用参考图片、视频、元素和音色生成 Kling 4.0 视频。时长 3-30s,分辨率 720p/1080p,支持原生音频。按次生成付费,无需订阅。 Kling 4.0 参考生视频可根据参考图片、参考视频、命名元素和音色生成 3-30 秒、分辨率为 720p/1080p 的片段,并支持原生音频;所有素材都可在提示词中通过 @tags 引用。

交互式模型控制

Kling 4.0 参考生视频可根据参考图片、参考视频、命名元素和音色生成 3-30 秒、分辨率为 720p/1080p 的片段,并支持原生音频;所有素材都可在提示词中通过 @tags 引用。

📝

概览

关于此模型

Kling 4.0 参考生视频可根据你提供的素材生成 3-30 秒、分辨率为 720p 或 1080p 的片段,并支持原生音频。素材包括最多 10 张参考图片、5 个参考视频、7 个命名元素(每个元素包含 2-4 张图片或一段 3-8 秒的角色视频)以及 3 个音色,总素材数最多为 15 个。在提示词中使用 @image_1、@video_1 或 @name 提及各项素材。不提供素材时,该功能会按普通文生视频方式运行。如需通过静帧控制片段,请使用 Kling 4.0 关键帧生视频。

1角色:通过图片或视频元素,让命名角色在不同场景中保持一致。
2音色:将参考音色绑定到角色,让角色在片段中开口说话。
3视频引导镜头:复用参考视频的动作和场景,可保留或不保留原声。
4广告:将产品、模特和背景参考素材组合成一个镜头。
💰

价格与价值

成本分析

muapiapp720p 每秒 $0.157(每段 5s 视频 $0.785)

720p 为 $0.157/s,1080p 为 $0.235/s。使用参考视频或视频元素时:720p 为 $0.094/s,1080p 为 $0.141/s;按参考视频秒数加输出秒数计费(最低按输出时长的 2 倍计费)。

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

⚙️

技术详情

配置参数

提示词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, each {name, image_urls (2-4) or video_url (3-8s), tag?, description?, voice_url?}. Mention as @name.

默认值-
Voicesarray

最多 3 named voices, each {name, audio_url}. Mention as @name.

默认值-
时长int

Video length (秒) (3-30).

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

输出分辨率。

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

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

默认值-
📖

实施指南

开发者文档

如何使用 Kling 4.0 参考生视频

  1. 收集素材:提供任意 image_urls(最多 10 个)、video_urls(最多 5 个,每个 2-30s,合计 30s)、elements(最多 7 个)和 voices(最多 3 个)。

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

  3. 配置输出:设置 duration(3-30s)、resolution(720p 或 1080p)、aspect_ratio(auto、16:9、9:16、1:1、21:9)和 keep_original_sound。

  4. 提交并获取结果:此端点为异步接口——轮询 /api/v1/predictions/{request_id}/result,或传入 webhook_url。

curl -X POST https://api.muapi.ai/api/v1/kling-4.0-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 using @Narrator", "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"}], "voices": [{"name": "Narrator", "audio_url": "https://example.com/narrator.mp3"}], "duration": 10, "resolution": "1080p"}'
❓

常见问题

常见问答

时长和分辨率限制是多少?

每段时长为 3 到 30 秒,分辨率为 720p 或 1080p。

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

最多可使用 10 张图片、5 个视频(每个 2-30s,合计 30s)、7 个元素(其中视频元素最多 3 个)和 3 个音色,总素材数最多为 15 个。

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

按数组顺序使用 @image_1、@video_1 引用图片和视频,或使用 @name 引用元素和音色。若提及的素材没有对应项,请求将被拒绝。

它会生成音频吗?

会生成原生音频。传入参考视频时,将 keep_original_sound 设为 true,即可保留视频原声。

如何计算价格?

按输出视频秒数计费:720p 为 $0.157/s,1080p 为 $0.235/s。使用参考视频或视频元素时,费率为 720p $0.094/s、1080p $0.141/s;按参考视频秒数加输出秒数计费,且最低按输出时长的 2 倍计费。

如何获取结果?

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