flux-kontext-pro

由 Black Forest Labs 提供图像

通过官方 Flux 渠道提交提示词和参考图,用 Flux Kontext Pro 按上下文编辑。

更新于:
输入提示词文本
模型8款可用
返回方式异步结果链接
价格3 quota / 张
Lo-fi illustration turned into a photoreal indoor sceneIllustration to photo示例 01
Freiburg selfie scene covered in snowSnow-covered Freiburg示例 02
Waterfront building reimagined as a ceremonial kite archiveHarbor kite archive示例 03
Wide cinematic gas station swallowed by crimson fog with green overhead lightsCrimson fog gas station示例 04
生成示例

从提示词到成图

Make this a 90s cartoon

Remove the background

Abstract expressionist painting Pop Art and cubism early 20 century, straight lines and solids, cute cat face without body, warm colors, green, intricate details, hologram floating in space, a vibrant digital illustration, black background, flat color, 2D, strong lines.

Replace 'joy' with 'Pro'

Replace text with 'COOL!!'

Transform the reference subject into a high-fashion editorial scene inside a vast Victorian glasshouse during a thunderstorm, preserving facial identity, silver hair, and elegant silhouette. Surround the subject with towering tropical leaves, wet stone flooring, scattered fallen petals, and misted glass panes streaked with rain. Outfit evolved into sculptural avant-garde couture in black lacquered fabric with subtle emerald accents, dramatic tailoring, refined textures, and striking accessories. Cinematic natural storm light, reflections in puddles, soft fog, deep contrast, sophisticated composition, premium magazine aesthetic, ultra-detailed materials, poised and enigmatic mood.

Change the car color to red

Change the background to a beach while keeping the person in the exact same position, scale, and pose. Maintain identical subject placement, camera angle, framing, and perspective. Only replace the environment around them

Close-up of a vintage car hood under heavy rain, droplets cascading down the deep cherry-red paint, windshield blurred with streaks of water, glowing headlights diffused through mist, reflections of crimson neon signage spelling "FLUX" dancing across the wet chrome grille, steam rising from the engine, ambient red light enveloping the scene, moody composition, shallow depth of field, monochromatic red palette, cinematic lighting with glossy textures.

模型能力

flux-kontext-pro 能做什么

根据提示词生成

提交简洁提示词,通过一个 TTAPI 任务获取图像结果。

常用参数

设置提示词、模型、输出参数和回调即可接入。

异步查询

通过轮询或 Webhook 接收结果,避免耗时生成阻塞界面。

接入产品

Flux 2 Pro 的输出可以展示、保存或交给后续流程处理。

计费

按操作计费,单位为 quota

按模型、操作和输出设置扣除 quota。

图像生成与编辑官方定价
模型TTAPI 计费计费单位
flux-kontext-pro3 quota/ 次请求
API 请求

请求头与提交参数

使用 TTAPI 密钥,按下方字段向接口发送请求。

生成POST
/bfl/v1/flux-kontext-pro

提交 flux-kontext-pro 图像任务。

查看接口文档
POSThttps://api.ttapi.io/bfl/v1/flux-kontext-pro

请求头

TT-API-KEYstring必填

填写 TTAPI API 密钥。

Content-Typestring必填

使用 application/json。

请求体

promptstring必填

描述目标图像。

input_imagestring选填

参考图 URL 或 Base64 内容。

input_image_2string选填

第二张参考图,仅适用于支持该参数的 Flux.2 模型。

input_image_3string选填

第三张参考图,仅适用于支持该参数的 Flux.2 模型。

input_image_4string选填

第四张参考图,仅适用于支持该参数的 Flux.2 模型。

widthstring选填

所需输出宽度。

heightstring选填

所需输出高度。

seedstring选填

用于复现生成结果的随机种子。

output_formatenum选填

可选 jpeg 或 png,取决于模型支持。

safety_tolerancestring选填

模型支持的内容安全容忍度。

webhook_urlstring选填

异步任务完成时通知的回调 URL。

查看 TTAPI 接入文档
接入示例

发送请求并获取结果

复制当前模型的请求地址、鉴权请求头和请求体。

curl --request POST \
  --url https://api.ttapi.io/bfl/v1/flux-kontext-pro \
  --header "TT-API-KEY: $TTAPI_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"prompt":"editorial portrait in soft window light","output_format":"jpeg","webhook_url":"https://example.com/webhooks/flux"}'