LiteLLMModels

Flux.2 Flex API Pricing

Flux.2 Flex is available through LiteLLM. It has a 32,000-token context window.

By Black Forest LabsModel ID azure_ai/FLUX.2-flexPrices updated Checked
Context window
32,000 tokens
Providers
1
Added to LiteLLM
September 18, 2026

Flux.2 Flex pricing by provider

1 listing across 1 provider. Token prices are in US dollars per 1M tokens. The highlighted row is the price quoted above.

ProviderModel name in LiteLLMContext
Azure AI Foundryazure_ai/FLUX.2-flex32K

Flux.2 Flex features

Input: text, image. Output: image.

Use Flux.2 Flex with LiteLLM

Call Flux.2 Flex through the LiteLLM Python SDK, or put it behind the LiteLLM proxy and send OpenAI-format requests to /v1/images/generations. LiteLLM tracks the cost of every request at these prices.

Python SDK
from litellm import image_generation

response = image_generation(
    model="azure_ai/FLUX.2-flex",
    prompt="A cute baby sea otter",
)
Call the proxy
curl http://0.0.0.0:4000/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-1234" \
  -d '{
    "model": "flux.2-flex",
    "prompt": "A cute baby sea otter",
    "n": 1,
    "size": "1024x1024"
  }'

Flux.2 Flex FAQ

What is the context window of Flux.2 Flex?

Flux.2 Flex has a 32,000-token context window.

When did LiteLLM add Flux.2 Flex?

Flux.2 Flex was added to LiteLLM's model price file on September 18, 2026.

Sources

Prices come from LiteLLM's open-source model_prices_and_context_window.json, which LiteLLM uses to calculate the cost of every request. Provider pricing pages:

LiteLLM docs: Azure AI Foundry.

Provider pages: Azure AI Foundry.