Flux Kontext Pro Text to Image API

blackforestlabs/flux-kontext-pro/text-to-image
size · output_format

Flux Kontext Pro Text to Image 将自然语言提示词转化为高保真图像,支持行业领先的文字排版渲染与快速推理。它在严格遵循构图指令的同时,保持自然景深层次与锐利的主体质感。

获取 API 密钥
Input
必填0/2000
可选
可选
Output待生成

生成的图片将在此处显示

预估费用: 8 credits · $0.040

每次生成 8 credits($0.040)。

继续使用

示例

pro-text-to-image-01-output.png

A wide documentary photograph on an empty two-lane gravel road in western Kansas in late June, minutes before a tornado forms. A massive rotating supercell fills the upper two thirds of the sky: a striated, layered mesocyclone shaped like a stacked saucer, dark slate-green underneath, with a low rotating wall cloud on the left side and a thin shaft of hail glowing white behind it. On the right half of the frame, a dusty silver pickup truck is parked on the road shoulder with both front doors open and a tripod-mounted weather instrument mast on its roof. Two storm chasers stand in front of the truck: a tall woman in a faded red windbreaker holds a tablet showing a radar map and points toward the wall cloud; a shorter man in a grey hoodie and baseball cap crouches beside her with a camera on a small tripod. Behind them, golden wheat stubble fields stretch to a flat horizon where a thin strip of warm sunlight breaks under the storm base, lighting the grass and the side of the truck in gold while everything above is dark and heavy. A barbed-wire fence and a leaning wooden utility pole run along the left edge. Strong wind bends the grass and lifts dust from the road. 24mm lens, eye level, sharp foreground, natural color, realistic cloud structure, film grain. No text, no logos, no watermark.

pro-text-to-image-02-output.jpg

A tall vertical Japanese woodblock print illustration with bold saturated printed color, full-bleed so the image fills the entire frame edge to edge with no border, no margin, no title box and no cartouche. At the top, a jagged snow-covered peak stands against a deep Prussian blue sky that fades to pale blue with a bokashi gradient, with falling snow printed as small white dots. In the middle, a zigzag mountain path climbs between snow-laden pine trees with indigo trunks, and a tiny thatched teahouse with a glowing orange paper lantern sits halfway up. At the bottom, exactly three small travelers walk in a line across a wooden plank bridge over a frozen blue stream: first a man in a wide straw hat and straw rain cape leaning on a staff, second a porter with a wooden frame pack, third a man holding the reins of a brown packhorse with a bright vermilion saddle blanket. Flat areas of color, bold black keyblock outlines, visible wood grain in the sky and snow, slight color misregistration. Palette: Prussian blue, indigo, white, soft grey and vermilion accents. Pure image with no characters or writing of any kind.

pro-text-to-image-03-output.jpg

A detailed isometric cutaway illustration of a modular Antarctic research station raised on hydraulic stilts above an ice shelf, with the front wall removed to reveal six connected rooms. From left to right: a laboratory with a microscope, sample freezer and ice cores in clear tubes on a rack; a small kitchen with a steaming pot and four people eating at a table; a bunk room with two stacked beds and one person reading; a communications room with a radio operator wearing headphones in front of screens; a gym with a treadmill; and a garage with an orange snowmobile and a tracked vehicle. On the roof: a weather mast with a spinning anemometer, solar panels and a satellite dish. Outside, a blizzard blows snow across the scene, a line of emperor penguins walks past the stilts, and a red flag marks a trail to a distant fuel depot. Clean vector-like line work, soft pastel shading, cool blue-white exterior contrasted with warm yellow interior lighting, consistent isometric perspective, every room clearly readable. No text, no labels, no logos, no watermark.

Flux Kontext Pro Text to Image

Flux Kontext Pro Text to Image 是 Black Forest Labs 研发的专业级文生图大模型。模型依托流匹配架构,将高质量文本合成与上下文理解深度融合,在复杂空间构图与语义遵循上表现优异,并原生支持清晰自然的英文字符排版。配合 5–6 秒快速生成,为广告设计与数字创意提供高性价比生产力。

为什么选择 Flux Kontext Pro Text to Image API?

  • 卓越的画面文字与排版渲染突破传统文生图模型的文字形变难题,原生支持在海报、路牌、包装与标语上精准渲染指定英文单词与符号,满足商业视觉设计对排版清晰度的严苛要求。

  • 5–6 秒快速流匹配推理基于精简高效的流匹配转换架构,在保证高保真画质与光影细节的前提下实现约 5–6 秒快速出图,显著提升创意探索与批量生产的迭代效率。

  • 强提示词语义与物理光影遵循深度解析长文本提示词中的多主体互动、空间前后景层次与摄影级光影朝向,精准还原真实物理环境反射与材质肌理。

  • 多画幅比例原生自由适配灵活支持从竖屏 9:16、9:21 到横屏 16:9、21:9 等 7 种主流构图比例,输出约 100 万像素标准画质,完美契合自媒体封面、横版海报与宽屏展布场景。

参数说明

参数要求说明
prompt必填

描述要生成的图片内容,长度为 1–2,000 个字符,包含至少一个非空白字符。

size可选

输出图片的宽高比,默认 1:1。

默认值1:14:33:416:99:1621:99:21
output_format可选

输出图片的文件格式,可选 png 或 jpg。

pngjpg

使用方法

  1. 撰写结构化提示词详细描述主体外观、艺术风格、构图透视与光线氛围;如需在画面中渲染特定文字,请使用半角双引号将文字括起并指明排版位置。

  2. 选择画幅与格式参数根据发布媒介选择合适的画幅比例(如社交媒体选用 9:16,横版海报选用 16:9 等),并指定 png 或 jpg 文件格式。

  3. 提交任务并异步取回结果调用统一 API 端点提交任务获取 task_id,通过轮询状态接口或配置 callback_url 异步接收生成完成的高清图片 URL。

计费说明

每次生成 8 credits($0.040),输出 1 张高保真图片。

用量价格说明
标准生成8 credits/次 · $0.040/次适用于所有 size 比例与 output_format 格式选项

适用场景

  • 品牌营销与商业海报设计一键生成融合特定英文品牌名、标语与艺术背景的活动主视觉,大幅缩短排版与原画设计周期。

  • 电商产品展示与氛围图精细模拟摄影棚柔光、大理石反光与复杂布景,为电商品牌提供高保真商业静物与场景视觉素材。

  • 数字插画与概念视觉探索借助流匹配模型丰富的美学理解,快速生成不同艺术流派、赛博朋克或写实风格的高质感概念原画。

实用技巧

  • 精确渲染文字建议:在提示词中使用半角双引号明确框定文字(如 a neon sign that says "CYBER"),并描述字体风格与发光质感,引导模型精准绘制字形。
  • 强化空间与景深描述:明确定义前景、中景与远景的对应元素(如 foreground, midground, background),使画面更具三维纵深感与电影级镜头感。
  • 多画幅灵活运用:生成前根据画面主体结构匹配比例,人物肖像推荐 3:4 或 9:16,宏大风景或影视概念推荐 16:9 或 21:9。

注意事项

  • 纯文本任务边界:本端点专用于文本生成图像,不接收图片输入;如需基于源图进行指令编辑或微调,请调用 Flux Kontext Pro Edit 端点。
  • 提示词字符限制:去除首尾空白字符后,提示词长度需在 1 至 2,000 字符之间。
  • 固定费用结算:每次生成固定扣除 8 credits($0.040),任务若因系统异常未成功生成将自动退还扣除积分。

相关模型

Flux Kontext Pro Text to Image API 常见问题

Flux Kontext Pro Text to Image API 是什么?

Flux Kontext Pro Text to Image 是 Black Forest Labs 用于高质量文本生成图像的流匹配大模型。它根据自然语言提示词生成约 100 万像素高保真图像,具备业内领先的画面文字排版能力、逼真的摄影光影质感与 5–6 秒快速推理表现。基于先进的流匹配与多模态统一 Transformer 架构,它在严格遵循提示词物理空间逻辑的同时,保持出色的构图平衡与细腻材质细节。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。

Flux Kontext Pro Text to Image 支持在画面中渲染文字吗?

支持。模型具备卓越的文字排版渲染能力,原生支持在招牌、书本、包装和海报等物体表面清晰呈现指定的英文单词与短语。在提示词中建议使用半角双引号精确框定待渲染文本(例如 "FLUX"),并明确指出字体的排版位置与材质质感。

Flux Kontext Pro Text to Image 生成一张图片通常需要多久?

在标准网络与正常系统负载下,单张图片的端到端生成耗时中位数约为 5 至 6 秒。得益于流匹配推理加速架构,该端点可在保证高保真画质的同时维持极快的响应速度,适合用于高并发生产与实时交互场景。

Flux Kontext Pro Text to Image 支持哪些画幅比例?

支持 1:1、4:3、3:4、16:9、9:16、21:9、9:21 共 7 种主流画幅比例。默认比例为 1:1(1024×1024 像素),无论选择哪种比例,输出总像素量均稳定在约 100 万像素,确保不同宽高下画面精度一致。

Flux Kontext Pro Text to Image 如何控制画面景深与光影质感?

可以通过在提示词中加入具体的专业摄影术语来精确引导,例如指定光照类型(如 soft studio lighting、golden hour sunlight)、镜头焦段与光圈(如 85mm lens, f/1.4 shallow depth of field),模型将准确理解并在画面中营造自然柔和的虚化景深与真实反光。

Flux Kontext Pro Text to Image 单次调用如何计费?

计费规则简单透明,每次成功生成固定消耗 8 credits(折合 $0.040)。该费率适用于所有画幅比例与输出格式选项,任务提交后预扣积分,若因系统异常未成功返回结果将全额自动返还。

提示词较长时该选用 Flux Kontext Pro 还是 Max?

对于日常商业制作、标准海报与高频创意探索,Flux Kontext Pro 具备极佳的画质与 5–6 秒响应速度,性价比出众;若提示词包含极其复杂的段落级空间关系、密集多行文字排版或极限微观材质要求,推荐选用旗舰级 Flux Kontext Max 端点以获得极致的语义遵循能力。