Skip to content
No models found
OpenRouter
© 2026 OpenRouter, Inc

Product

  • Chat
  • Rankings
  • Apps
  • Models
  • Providers
  • Pricing
  • Enterprise
  • Labs

Company

  • About
  • Announcements
  • CareersHiring
  • Privacy
  • Terms of Service
  • Support
  • State of AI
  • Works With OR
  • Data

Developer

  • Documentation
  • API Reference
  • SDK
  • Status

Connect

  • Discord
  • GitHub
  • LinkedIn
  • X
  • YouTube
Favicon for black-forest-labs

Black Forest Labs: FLUX.2 Pro

black-forest-labs/flux.2-pro

Compare

A high-end image generation and editing model focused on frontier-level visual quality and reliability. It delivers strong prompt adherence, stable lighting, sharp textures, and consistent character/style reproduction across multi-reference inputs. Designed for production workloads, it balances speed and quality while supporting text-to-image and image editing up to 4 MP resolution.

Pricing is as follows, per the docs(opens in new tab): Input: We charge $0.015 for each megapixel on the input (i.e. reference images for editing) Output: The first megapixel is charged $0.03 and then each subsequent MP will be charged $0.015.

Modalities

Price

$0.03/megapixel

Context

47K

Weekly Tokens

467M

Released

Nov 25, 2025

OverviewProvidersPerformancePricingBenchmarksAppsActivityUptimeAPI

Sample code and API for FLUX.2 Pro

OpenRouter normalizes requests and responses across providers for you.

1

Get your API key

Create an API key from your OpenRouter dashboard and set it as an environment variable:

2

Make your first request

Use black-forest-labs/flux.2-pro with the OpenRouter API:

OpenRouter supports image generation models that only output images and not text. These models can create images from text prompts when you specify modalities: ["image"] in your request. The generated images are returned as base64-encoded data URLs in the assistant message. Learn more about image generation.

In the examples below, the OpenRouter-specific headers are optional. Setting them allows your app to appear on the OpenRouter leaderboards.

Using third-party SDKs

For information about using third-party SDKs and frameworks with OpenRouter, please see our frameworks documentation.

3

Enable streaming

Add "stream": true to your request body to receive responses as server-sent events:

Endpoint

Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.

POSThttps://openrouter.ai/api/v1/chat/completions
AuthorizationBearer $OPENROUTER_API_KEY
Content-Typeapplication/json
HTTP-Refereroptional — your site URL, for rankings
X-Titleoptional — your site name, for rankings
Modelblack-forest-labs/flux.2-pro

Creates a streaming or non-streaming response using the OpenAI Responses API format.

Docs
POSThttps://openrouter.ai/api/v1/responses
AuthorizationBearer $OPENROUTER_API_KEY
Content-Typeapplication/json
HTTP-Refereroptional — your site URL, for rankings
X-Titleoptional — your site name, for rankings
Modelblack-forest-labs/flux.2-pro

Parameters

NameTypeDefaultDescription
seedinteger—If specified, the inferencing will sample deterministically, such that repeated requests with the same seed and parameters should return the same result.