flux-kontext-proFLUX.1 Kontext 是支持图片编辑和文生图的上下文感知模型系列,提供 Pro 与 Max 两个版本、可预测的按张计费和异步任务处理。

Image link valid for 72 hours
透明定价,无隐藏费用。按量付费,用多少付多少。
* 实际费用以最终输出为准。
以图片编辑为核心,提供明确的输出控制和统一异步流程
需要视觉上下文时传参考图,也可不传参考图直接文生图
创建账号、完成鉴权,然后提交并轮询统一图片任务
登录 APIMart 并为余额充值;同一余额可用于平台支持的多个模型。
在控制台创建密钥,并在 Authorization 请求头中以 Bearer Token 方式发送。
向 /v1/images/generations 发送 POST 请求,读取 data[0].task_id,再轮询 /v1/tasks/{task_id},直至 completed 或 failed。
模型选择、输入、控制参数、计费和任务行为说明
FLUX.1 Kontext 是 Black Forest Labs 的上下文感知图片模型系列,主要用于根据文本指令编辑图片,也支持纯文生图。
flux-kontext-pro 更快、成本更低,标准价为 $0.04/张,单次请求实测约 6 秒;flux-kontext-max 定位更高输出质量,标准价为 $0.08/张,单次请求实测约 9 秒。
两个版本均按每张生成图片固定标准价计费,不受宽高比和参考图数量影响:Pro 为 $0.04,Max 为 $0.08。账号倍率或折扣可能影响实扣金额,请以任务结果记录的费用为准。
image_urls 最多可传四个 URL,输出图与全部参考图的总像素不得超过 9MP。多参考图属于实验性能力,并且每个 URL 都必须能从公网直接访问。
Kontext 输出恒约 1MP,resolution 不生效,传入 width 或 height 会被拒绝。size 可填写九种支持比例之一,也可填写 WIDTHxHEIGHT 像素串;像素串会换算为最接近的支持比例。16:9 与 9:16 的实际输出比例可能偏差约 4%。
通过 output_format 选择 png、jpeg 或 webp。seed 为可选参数,默认随机;在输入相同的情况下复用固定 seed,有助于复现结果。
可能会。实测中,即使没有显式开启 prompt_upsampling,flux-kontext-max 也扩写了提示词。若必须严格保持原始措辞,请将提示词改写视为可能行为并检查输出。
提交生成请求后,使用返回的 task_id 轮询,直到 completed 或 failed。失败任务会自动退款。参考图 URL 必须公网可达;会拦截数据中心流量的图床可能导致抓取失败,建议使用稳定的公网地址。
探索同类型的其他模型。

Seedance 4.5
Seedream 4.5 API delivers cutting-edge text-to-image generation. Create 4K resolution images with precise text rendering, multi-reference style fusion, and unified editing capabilities.

Seedance 4.0
Seedream 4.0 API is text-to-image and image editing model. Generate 4K images with industry-leading text rendering, batch processing, and multi-reference support.

Flux 2
Flux 2 delivers state-of-the-art AI image generation and editing. Create photorealistic images from text with Flux 2 Pro, edit existing images with natural language using Flux 2 Flex, and maintain style consistency with multi-reference support.

Nano banana pro
Nano Banana 2 API is powered by Google's Gemini 3 Pro Image Preview- the most advanced AI image generation model with 4K native output, multi-step planning workflow, and built-in quality analysis. Features 340% faster processing and professional-grade editing capabilities.