> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kymaapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FLUX.2 Pro

> FLUX.2 Pro is a photorealistic image generation and editing model optimized for high-fidelity visual synthesis and multi-reference blending. Developers building creative pipelines or marketing asset tools should use it when output quality and reference accuracy take priority over raw generation speed.

## Overview

FLUX.2 Pro is BFL's 32B parameter image model, built for photorealistic generation and unified generation-and-editing workflows. It accepts text prompts and reference images, supporting blends of up to ten source inputs. The model achieves approximately 60% accuracy when rendering text inside generated images.

On Kyma, the model runs through an OpenAI-compatible interface using a single API key for all endpoints. Requests receive automatic failover if a serving path degrades, and responses return the exact cost in usage.cost alongside the X-Kyma-Model header. Prompt caching is enabled, billing repeated prompt prefixes at this model's cached input rate.

The model operates at a medium speed tier and does not support structured outputs or reasoning chains. It outputs images only and cannot generate text, code, or audio. Complex multi-reference layouts may require iterative prompting to align precisely with source compositions.

## Specs

| Field              | Value                                                              |
| ------------------ | ------------------------------------------------------------------ |
| Model ID           | `flux-2-pro`                                                       |
| Best for           | Photo realism, multi-reference blend, hero shots, gen+edit unified |
| Context window     | 0                                                                  |
| Input modalities   | Text, Image                                                        |
| Output modalities  | Image                                                              |
| Tool calling       | Yes                                                                |
| Structured outputs | Yes                                                                |
| Prompt caching     | Yes                                                                |
| Speed              | Medium                                                             |
| Cost band          | Balanced                                                           |
| Release stage      | Stable                                                             |

## Pricing

|        | Per 1M tokens |
| ------ | :-----------: |
| Input  |     \$0.20    |
| Output |     \$0.60    |

## Use this when

* **Photorealistic Product Shots** — Generate high-fidelity marketing imagery from text prompts and reference photos.
* **Multi-Reference Image Blending** — Combine up to ten source images into a single cohesive visual composition.
* **Unified Generation and Editing** — Apply targeted edits to existing images within the same generation pipeline.
* **Text-Integrated Visual Assets** — Create images containing rendered text with moderate accuracy for banners or mockups.

## Not ideal for

Do not use this model for tasks requiring fast batch processing, structured data extraction, or precise typography beyond basic labels.

## Pick something else when

* You need faster generation for rapid prototyping: use [`flux-1.1-ultra`](/models/flux-1.1-ultra) or [`imagen-4-fast`](/models/imagen-4-fast).
* You require precise typography or layout control: use [`recraft-v4-pro`](/models/recraft-v4-pro) or [`ideogram-v3`](/models/ideogram-v3).
* You need scalable vector graphics instead of raster images: use [`recraft-v4-vector`](/models/recraft-v4-vector) or [`recraft-v4-vector-pro`](/models/recraft-v4-vector-pro).

## Example

```python theme={null}
from openai import OpenAI

client = OpenAI(base_url="https://kymaapi.com/v1", api_key="ky-...")

response = client.chat.completions.create(
    model="flux-2-pro",
    messages=[{"role": "user", "content": "..."}],
)
```

## Agent query example

Ask the API which models fit, instead of hardcoding an id:

```bash theme={null}
curl "https://kymaapi.com/v1/models?recommended_for=generate-images&tools=true&quality_tier=frontier-open"
```

## FAQ

**Can I use the same API key for FLUX.2 Pro as I do for text models?**

Yes, Kyma uses a single API key across all models with an OpenAI-compatible base URL.

**How does prompt caching affect billing for this model?**

Repeated prompt prefixes are billed at this model's cached input rate, reducing costs for iterative editing workflows.

**Does the model support structured JSON outputs?**

No, FLUX.2 Pro only outputs images and does not support structured output formatting or reasoning chains.
