Flux.1 Kontext [pro] API

blackforestlabs/flux-kontext-pro
FLUX.1 Kontext [pro] enables fast, consistent multi-step image editing and generation with text and image inputs.
Output
$0.052 / gen (variable)
Released
May 29, 2025

Overview

Flux.1 Kontext Pro Description

FLUX.1 Kontext Pro is Black Forest Labs’ breakthrough in-context image model. Unlike traditional text-to-image systems that start from scratch every time, Kontext Pro understands both your text prompt and any reference images you feed it. It performs surgical local edits, full-scene transformations, and maintains perfect character, style, and identity across multiple iterations.

Built on a rectified flow transformer architecture with 12 billion parameters, it delivers FLUX-level visual quality while pioneering true iterative workflows. You can edit an image once, then edit the result again, and again without losing facial features, clothing details, lighting mood, or brand style.

It replaces clunky multi-model pipelines with a single, reliable endpoint. No more stitching together separate tools for generation, editing, and consistency checks. Just one fast, powerful call.

  • Lower cost, higher value: At just $0.052 per generation, you get premium Black Forest Labs performance without the premium markup you’ll see on other platforms.
  • Higher rate limits out of the box: Scale to thousands of images per minute without begging for custom enterprise plans.
  • Unified billing across 400+ models: One dashboard, one invoice, one API key. Switch between FLUX variants, LLMs, or voice models instantly without new accounts or separate billing.
  • Blazing-fast global inference: Our optimized infrastructure delivers 8-10 second generations with 99.9% uptime. No more waiting 30-40 seconds like on some competitors.
  • Enterprise-ready reliability : Commercial licensing included, full prompt and output safety filters, and detailed usage analytics.

Technical Specifications

  • Generation speed: 8-10 seconds per image (up to 8× faster than leading competitors)
  • Model architecture: 12B parameter rectified flow transformer
  • Resolution: Native 1024×1024 with flexible aspect ratios
  • Input types: Text-only or text + reference images (single or multiple URLs)
  • Benchmark performance: Top ELO ratings exceeding 1100 across image generation and editing leaderboards. Highest scores in character preservation and text editing tasks.
  • Safety: Built-in content filters with adjustable tolerance levels

Compared to ByteDance BAGEL (40+ seconds) or OpenAI GPT-4o image generation, FLUX.1 Kontext Pro wins on speed, consistency, and cost every single time.

API Pricing:

  • $0.052 per generation

Performance Metrics

FLUX models (shown in purple) consistently achieve top performance with ELO ratings often exceeding 1100, demonstrating the strong capabilities of the Flux.1 Kontext model family in various image generation and editing benchmarks.

Key Capabilities

In-Context Generation & Editing

Feed it a reference image (or several) plus a text prompt, and watch magic happen. The model intelligently merges visual context with your instructions, perfect for “change the background to a cyberpunk city but keep the character exactly the same.”

Surgical Local Edits

Want to tweak just the hat on your character while leaving everything else untouched? FLUX.1 Kontext Pro does regional edits with surgical precision. No more “everything changed” disasters.

Unmatched Character & Style Consistency

This is where Kontext Pro destroys the competition. Facial features, body type, clothing details, art style — everything stays locked in across completely different scenes and multiple editing turns. Marketers building avatar libraries or game devs creating consistent characters finally get a model that actually delivers.

Iterative Multi-Step Workflows

Build images step by step with minimal latency. Start with a base character → add accessories → change environment → refine lighting. Each generation builds directly on the previous one. Perfect for rapid prototyping and A/B testing visuals.

Classic Text-to-Image at FLUX Quality

Don’t need a reference image? Drop a detailed prompt and get stunning results with excellent prompt adherence, beautiful typography, and complex compositions.

Flexible Aspect Ratios & Parameters

Choose from 21:9, 16:9, 4:3, 1:1, 9:16 and more. Fine-tune with guidance_scale (1-20), safety_tolerance (1-6), seeds, and batch generation (up to 4 images per call).

Real-World Use Cases For FLUX.1 Kontext Pro

E-commerce & Product Marketing

‍Upload a product photo and instantly generate it in new lifestyles, colors, or environments, no expensive photoshoots required. Maintain exact branding across every variation.

Social Media & Content Creation Tools

‍Build apps that generate consistent creator avatars, YouTube thumbnails, or Instagram carousels in seconds. Your users will love the speed and visual coherence.

Game Development & Storytelling

‍Create character sheets, environment concepts, and narrative scenes where the hero looks identical from frame to frame. Iterative editing makes storyboarding lightning fast.

Education & Training Materials

‍Generate custom diagrams, historical scenes, or scientific illustrations with consistent visual language across entire lesson modules.

Enterprise Design Systems

‍Teams maintain brand-consistent visuals at scale, from pitch decks to internal dashboards, without hiring extra designers.

Code Samples

Text-to-Image Code Sample

‍

Text-to-Image Parameters

  • prompt [str]: The text prompt describing the content, style, or composition of the image to be generated.
  • num_images [int]: The number of images to generate
  • seed [int]: The random seed for image generation
  • aspect_ratio [ 21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:21 ]: The aspect ratio for the image
  • guidance_scale [1-20]: The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you.
  • safety_tolerance [1-6]: The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive.

‍

Image-to-Image Code Sample

‍

Image-to-Image Parameters

  • prompt [str]: The text prompt describing the content, style, or composition of the image to be generated.
  • image_url [str | list of str]: One or more image URLs used as visual references. The model merges them into a single image following the prompt instructions.
  • num_images [int]: Number of image variations to generate. Each image is a different attempt to combine the reference images (from the image_url parameter) according to the prompt.
  • seed [int]: The random seed for image generation
  • aspect_ratio [ 21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:21 ]: The aspect ratio for the image
  • guidance_scale [1-20]: The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you.
  • safety_tolerance [1-6]: The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive.

Use cases

  • Professional designers, advertisers, and editorial teams for creative visual production
  • Content creators for precise, consistent, character- and style-focused iterative editing
  • Artists, prototypers, and enterprises needing high-speed, localized image transformations
  • Cloud platforms and interactive playgrounds for scaled, precision image editing

‍

How to use Flux.1 Kontext [pro] API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to blackforestlabs/flux-kontext-pro.
import requests

r = requests.post(
    "https://api.aimlapi.com/v1/images/generations",
    headers={"Authorization": "Bearer " + AIMLAPI_KEY},
    json={
      "model": "blackforestlabs/flux-kontext-pro",
      "prompt": "A cat holding a sign that says hello"
    },
)
print(r.json())
const r = await fetch("https://api.aimlapi.com/v1/images/generations", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "blackforestlabs/flux-kontext-pro",
    "prompt": "A cat holding a sign that says hello"
  }),
});
console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/images/generations \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"blackforestlabs/flux-kontext-pro","prompt":"A cat holding a sign that says hello"}'

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Flux.1 Kontext [pro] API Pricing

TypePrice
Output
$0.052 / gen (variable)

Flux.1 Kontext [pro] Benchmarks

BenchmarkScoreWhat it measuresSourceRetrieved
Image Editing Arena
912
Human preference Elo from blind pairwise comparisons of edited images, measured independently by Artificial AnalysisSourceSeptember 21, 2026

Flux.1 Kontext [pro] vs other models

ModelInputOutputContextBest for
$0.052 / gen (variable)
Image generation at scale
$0.325 / 1M tokens
$78 / 1M tokens
128K tokens
Image generation at scale
$6.5 / 1M tokens
$39 / 1M tokens
Image generation at scale
$0.325 / gen
Image generation at scale
$0.0195 / MP (variable)
Image generation at scale

Frequently asked questions

Flux.1 Kontext [pro] takes image, text as input and returns image.

Flux.1 Kontext [pro] became available on May 29, 2025.

Flux.1 Kontext [pro] is priced at $0.052 / gen (variable).

Flux.1 Kontext [pro] is billed per generation — a fixed charge per output rather than by prompt length.

Yes, Flux.1 Kontext [pro] accepts image input as well as a text prompt.

Flux.1 Kontext [pro] was built by Black Forest Labs.

Send a request to https://api.aimlapi.com/v1/images/generations with blackforestlabs/flux-kontext-pro as the model id.

Yes. Flux.1 Kontext [pro] is served through AI/ML API, so the same key and endpoint format used for other models applies.

Start building with Flux.1 Kontext [pro]

Get API Key
1000+ models, one API.