Flux Kontext Pro Text to Image API

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

Flux Kontext Pro Text to Image transforms natural language prompts into high-fidelity images with sharp typography and fast inference. It adheres to layout instructions while preserving natural contrast and object textures.

Get API Key
Input
Required0/2000
Optional
Optional
OutputIdle

Generated images will appear here

Estimated cost: 8 credits · $0.040

8 credits ($0.040) per generation.

Continue using

Examples

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 is a professional text-to-image foundation model by Black Forest Labs. Powered by an advanced flow-matching architecture, it unifies expressive image synthesis with prompt adherence, natively rendering crisp typography on signs and posters. Generating outputs in 5–6 seconds, it delivers a balanced, cost-effective pipeline for commercial design.

Why Choose Flux Kontext Pro Text to Image API?

  • Precise In-Image Typography RenderingOvercomes traditional AI text distortion by accurately generating legible words, slogans, and branding on signs, product packaging, and editorial posters.

  • Fast 5–6s Flow-Matching InferenceLeverages an efficient rectified flow architecture to generate standard 1024×1024 images in just 5–6 seconds, accelerating creative iteration.

  • Strong Prompt and Spatial AdherenceInterprets multi-subject instructions, perspective depth, and realistic studio illumination to faithfully translate detailed descriptive concepts into visual scenes.

  • Native Aspect Ratio FlexibilitySupports 7 standard aspect ratios from portrait (9:16, 9:21) to landscape (16:9, 21:9), maintaining consistent ~1MP resolution across varied display formats.

Parameters

ParameterRequirementDescription
promptRequired

Describe the image to generate using 1–2,000 characters, including at least one non-whitespace character.

sizeOptional

Output aspect ratio. Defaults to 1:1.

Default1:14:33:416:99:1621:99:21
output_formatOptional

Output image file format: png or jpg.

pngjpg

How to Use

  1. Draft a Structured PromptDescribe the core subject, composition, artistic medium, and lighting; use double quotes around specific words or phrases to guide precise typography.

  2. Configure Aspect Ratio and FormatSelect the ideal aspect ratio (such as 16:9 for landscape banners or 9:16 for mobile screens) and specify png or jpg format.

  3. Submit Task and Retrieve ImageCall the unified generation endpoint to obtain a task_id, then poll the status endpoint or supply a callback_url to download the final image URL.

Pricing

Each generation costs 8 credits ($0.040) and returns one high-fidelity image.

UsageRateDetails
Standard generation8 credits/generation · $0.040/generationApplies to every size aspect ratio and output_format option

Best Use Cases

  • Commercial Posters and Brand CampaignsDesign event posters and promotional visuals complete with crisp, legible typography and cohesive art direction in a single step.

  • Ecommerce Product and Packaging StillsGenerate clean studio backgrounds, accurate marble or wood reflections, and realistic packaging scenes for digital storefronts.

  • Editorial Illustrations and Visual StoryboardsRapidly explore diverse art movements, architectural concepts, and cinematic frames with consistent textural richness.

Pro Tips

  • Enclose in-image text in quotes: Use clear phrasing like a sign that reads "VINTAGE COFFEE" in bold serif typography to ensure accurate spelling and font rendering.
  • Specify perspective and lighting: Terms such as three-point studio lighting, rim light, and 50mm lens perspective provide clear guidance for authentic spatial depth.
  • Match aspect ratio to layout needs: Choose 9:16 for vertical stories, 16:9 for cinematic headers, and 1:1 for square social posts to avoid downstream cropping.

Notes

  • Text-only input scope: This endpoint generates images strictly from text prompts; for image editing or modification using reference pictures, use Flux Kontext Pro Edit.
  • Character limits: Prompts must contain between 1 and 2,000 characters after trimming leading and trailing whitespace.
  • Standard billing: Every generation is billed at a fixed 8 credits ($0.040); failed requests due to unexpected system errors are automatically credited back.

Related Models

Flux Kontext Pro Text to Image API Frequently Asked Questions

What is the Flux Kontext Pro Text to Image API?

Flux Kontext Pro Text to Image is a Black Forest Labs model for high-fidelity text-to-image generation. It produces standard ~1MP resolution images from natural-language prompts, featuring state-of-the-art in-image typography rendering, authentic studio lighting, and fast 5–6 second inference speeds. Built on an advanced flow-matching transformer architecture, it preserves natural perspective and physical light transport while adhering strictly to spatial layout instructions. You can call it programmatically or try it from the playground above.

Does Flux Kontext Pro Text to Image support in-image typography?

Yes. The model is specifically optimized for rendering legible text on signs, packaging, labels, and posters. To achieve the best results, enclose the desired words in quotation marks within your prompt, such as a sign saying "BFL STUDIO", and describe the font style and placement.

How fast does Flux Kontext Pro Text to Image generate an image?

Under normal operating conditions and network latency, the median end-to-end generation time is approximately 5 to 6 seconds. This interactive speed makes it well suited for real-time applications, creative prototyping, and high-throughput production workflows.

What aspect ratios are supported by Flux Kontext Pro Text to Image?

The endpoint supports 7 standard ratios: 1:1, 4:3, 3:4, 16:9, 9:16, 21:9, and 9:21. The default ratio is 1:1 (1024×1024 pixels). All supported ratios maintain a total pixel count of roughly 1 megapixel for uniform detail.

How can I control lighting and depth of field in Flux Kontext Pro Text to Image?

Incorporate descriptive photographic terms directly in your prompt, such as golden hour sunlight, soft studio diffuser, f/1.8 aperture, or macro lens focus. The flow-matching architecture interprets these visual cues to render accurate reflections and optical blur.

How is Flux Kontext Pro Text to Image billed?

Each completed image generation incurs a flat rate of 8 credits ($0.040). This predictable rate applies regardless of chosen aspect ratio or output format. Insufficient credit errors are prevented at submission, and system failures are automatically refunded.

When should I choose Flux Kontext Pro over Max for text prompts?

Flux Kontext Pro is the recommended choice for most daily production and iterative design tasks due to its fast 5–6 second latency and cost efficiency. Choose Flux Kontext Max when dealing with highly complex paragraphs, multi-line typography layouts, or intricate micro-textures requiring maximum prompt adherence.