Flux1 AIDevelopers
Flux1 AI API docs

Flux1 AI API

Build with Nano Banana, GPT Image, Seedream, Seedance and Veo. Generate images and video, edit with references, and track every request through one API.

  • Base URL https://flux1.ai/api/v1
  • Authentication Authorization: Bearer fx1_live_…
  • Format JSON request bodies, JSON responses
  • Docs for agents /api/docs/llms.txt — every page as Markdown

Build with an AI agent

Using Claude Code, Cursor or Codex? Hand it the Markdown docs instead of this page. Paste the prompt below, or see For agents for the AGENTS.md snippet.

prompt.txt
Read https://flux1.ai/api/docs/llms.txt first. It lists every Flux1 AI API docs page as Markdown. Open the pages you need before writing code, and answer from those docs only; do not guess field names or prices.

Key facts: base URL https://flux1.ai/api/v1. Auth header "Authorization: Bearer $FLUX1_API_KEY", server-side only. POST /v1/generations returns 202 with an id; poll GET /v1/generations/{id} every 2-3 seconds until the status is succeeded, failed or rejected. Send a unique Idempotency-Key with every POST.

Image models

Choose a model for its complete parameter reference, credit prices and ready-to-copy cURL, Node.js and Python examples.

auto · 1:1 · 2:3
GeminiNano Banana 2.1
nano-banana-2-1

Google's newest Nano Banana: 1K / 2K / 4K output, up to 14 references and extreme aspect ratios.

from 12 credits / image1K–4K14 references60–90s
Nano Banana 2 concept preview
GeminiNano Banana 2
nano-banana-2

Multi-subject consistency and 1K / 2K / 4K output with extreme aspect ratios.

from 10 credits / image1K–4K14 references10–20s
Nano Banana Pro concept preview
GeminiNano Banana Pro
nano-banana-pro

Native 2K with 4K output, precise typography and composition control.

from 14 credits / image1K–4K14 references10–20s
Nano Banana concept preview
GeminiNano Banana
nano-banana

Fast text-to-image and image editing with strong character consistency.

6 credits / image1K14 references10–15s
Nano Banana 2 Lite concept preview
GeminiNano Banana 2 Lite
nano-banana-2-lite

Budget Nano Banana 2 at 1K.

6 credits / image1K14 references8–15s
GPT Image 2.5 concept preview
OpenAIGPT Image 2.5
gpt-image-2-5

OpenAI's latest image model: sharp text and precise edits at 1K, 2K or 4K, in Flare or Sunburst.

from 12 credits / image1K–4K16 references30–60s
GPT Image 2 concept preview
OpenAIGPT Image 2
gpt-image-2

OpenAI text-to-image and image editing with reliable prompt following.

12 credits / image1K15 references15–30s
auto · 1:1 · 4:3
DoubaoSeedream 5.0 Pro
seedream-5-0-pro

ByteDance's flagship Seedream: plans dense layouts, text and multi-reference edits at 1K, 1.5K or 2K.

from 6 credits / image1K–2K10 references60–180s
auto · 1:1 · 4:3
DoubaoSeedream 5.0 Flash
seedream-5-0-flash

The fast, low-cost Seedream 5.0 tier: images and edits up to 2K in seconds, one flat price.

3 credits / image1K–2K10 references10–20s
Seedream 5.0 Lite concept preview
DoubaoSeedream 5.0 Lite
seedream-5

Text-to-image and reference-image editing with 2K, 3K and 4K output.

6 credits / image2K–4K14 references

Model previews are AI-created concept artwork inspired by each model name, not sample outputs from the listed models.

Video models

How it works

Every generation is asynchronous. POST /v1/generations validates the request, charges the credits for it, hands the job to the model provider and returns 202 Accepted with a generation id. You then GET /v1/generations/{id} until status leaves queued. There are no webhooks in v1; polling every 2–3 seconds is the expected pattern.

Credits are shared with the web app: the same balance and per-model prices. Pre-debit rejections cost nothing; check credits_refunded to confirm a refund. Uncertain submissions may require review. Use Idempotency-Key for retries. Persisted image tasks also appear in My Images.

The API is included with every paid plan and credit pack. Create keys at Settings → API Keys and follow every request under Settings → API Logs. Free and gifted credits alone do not unlock it.

Where to start