🔥 Black Friday AI API deals are live· 🎬 Seedance 2.5 — 20% off, up to 42% below market, until Nov 30Ends in--d --:--:--See deals →

Kling 4.0 Image Edit: AI 图像编辑器

使用 Kling 4.0 Image Edit API,基于最多 10 张参考图编辑和合成图像。支持命名元素、系列模式和最高 8K 输出。按生成次数付费,无需订阅。 Kling 4.0 Image Edit 可基于最多 10 张参考图和命名主体编辑、合成图像,并支持 series 模式以及 2K、4K 或 8K 输出。

交互式模型控制

Kling 4.0 Image Edit 可基于最多 10 张参考图和命名主体编辑、合成图像,并支持 series 模式以及 2K、4K 或 8K 输出。

📝

概览

关于此模型

Kling 4.0 Image Edit 可基于最多 10 张参考图编辑和合成图像,你可以在提示词中通过 @image_1、@image_2 调用这些图片。命名的 elements 可让你从 2-4 个角度固定角色、道具或服装,并通过 @name 重复使用;series 模式则可生成风格连贯的一组图像。输出分辨率为 2K、4K 或 8K,支持九种宽高比。若要仅通过提示词生成,请参阅 Kling 4.0 Text to Image;若要生成长页面,请参阅 Kling 4.0 Long Image。

1角色一致性:借助 elements 和 series 模式,让同一角色或产品在一组场景中保持一致。
2产品摄影:将参考照片中的产品置入全新的场景和风格中。
3分镜与营销活动:通过一次请求生成连贯的画面序列。
4海报与文字渲染:在图像中渲染带引号的文字,用于海报和广告。
💰

价格与价值

成本分析

muapiapp每张图 $0.066 起(2K,1 张参考图)

按次生成,无需订阅。

Fal.ai暂不可用

未列出 Kling 4.0 Image Edit。

Replicate暂不可用

未列出 Kling 4.0 Image Edit。

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

⚙️

技术详情

配置参数

提示词string

Text prompt (max 20000 characters). Mention 参考图像 as @image_1, @image_2 in array order and elements as @name. Put text to render inside quotation marks.

默认值A red apple on a white table, studio lighting, photorealistic
图像 URLarray

Reference images (1-10) to edit or compose. Mention them in the prompt as @image_1, @image_2 in array order.

默认值https://static.aiquickdraw.com/tools/example/1764851484363_ScV1s2aq.webp
Elementsarray

可选的 subjects for this task, mentioned in the prompt as @name. Images plus elements cannot exceed 10.

默认值-
模式枚举(2 个选项)

default: standard generation (count 1-9). series: a coherent set of images (count 2-10).

默认值default
分辨率枚举(3 个选项)

Output resolution. 2k/4k usually return PNG, 8k returns JPEG.

默认值2k
画面比例枚举(9 个选项)

Output aspect ratio. auto lets the model choose from the prompt and references.

默认值auto
图像数量integer

Number of images to generate (1-9 in default mode, 2-10 in series mode).

默认值1
📖

实施指南

开发者文档

如何使用 Kling 4.0 Image Edit API

  1. 编写编辑提示词(最多 20,000 个字符)。将要渲染的文字放在引号内。

  2. 添加参考图:在 images_list 中传入 1-10 个 URL,并按顺序通过 @image_1、@image_2 提及它们。在 elements 中添加命名主体(每个主体 2-4 张图片),并通过 @name 提及。参考图与元素合计不能超过 10 个。

  3. 选择 mode、resolution、aspect_ratio 和 count:default 模式返回 1-9 张图像,series 模式返回 2-10 张连贯的图像。分辨率为 2k、4k 或 8k。

  4. 提交并轮询返回的 request_id,或传入 webhook URL。

curl -X POST https://api.muapi.ai/api/v1/kling-4.0-image-edit \
  -H "x-api-key: $MUAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Place @image_1 on a marble kitchen counter, soft morning light", "images_list": ["https://example.com/product.png"], "resolution": "2k", "aspect_ratio": "1:1", "count": 1}'
❓

常见问题

常见问答

什么是 Kling 4.0 Image Edit?

Kling 4.0 Image Edit 是 Kling 的图像编辑模型。它可基于最多 10 张参考图和命名元素编辑、合成图像,并通过 series 模式生成风格连贯的一组图像。

Kling 4.0 Image Edit API 的费用是多少?

每张输出图像的费用为 $0.063(2K)、$0.094(4K)和 $0.157(8K),每张输入图另收 $0.003。例如,1 张 2K 输出图加 1 张参考图的费用为 $0.066;2 张 4K 输出图加 3 张参考图的费用为 $0.197。

如何在提示词中使用参考图?

将 URL 列在 `images_list` 中,并按相同顺序通过 `@image_1`、`@image_2` 提及它们。如果引用了未提供的图像,会返回验证错误。

什么是 series 模式?

将 `mode` 设为 `series`,并将 `count` 设为 2-10,即可生成风格连贯的一组图像,例如同一角色一天中的不同场景。在 `default` 模式下,`count` 可以设为 1-9。

支持哪些分辨率和宽高比?

分辨率为 2k、4k 和 8k(2k 和 4k 通常返回 PNG,8k 返回 JPEG)。宽高比包括 auto、9:16、2:3、3:4、1:1、4:3、3:2、16:9 和 21:9。

如何获取结果?

请求采用异步处理:提交任务后,轮询返回的 `request_id`,或传入 `webhook` URL,以便在任务完成时收到通知。

是否提供用于测试的沙盒?

是。沙盒 API 密钥会立即返回模拟结果,且不会扣除额度。