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.
llms.txt/api/docs/llms.txtIndex of every page with a one-line summary and its Markdown URL. Small; load it first.llms-full.txt/api/docs/llms-full.txtEvery page in one file, live model tables and prices included. For long-context models.{page}.md/api/docs/quick-start.mdAny docs URL plus .md returns that page as Markdown. The Copy Markdown button copies the same text.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.
nano-banana-2-1Google's newest Nano Banana: 1K / 2K / 4K output, up to 14 references and extreme aspect ratios.

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

nano-banana-proNative 2K with 4K output, precise typography and composition control.

nano-bananaFast text-to-image and image editing with strong character consistency.

nano-banana-2-liteBudget Nano Banana 2 at 1K.

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

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

seedream-5Text-to-image and reference-image editing with 2K, 3K and 4K output.
Model previews are AI-created concept artwork inspired by each model name, not sample outputs from the listed models.
Video models

seedance-2Text-to-video, first-frame animation and first/last-frame transitions, with optional generated audio.

seedance-2-fastText-to-video, first-frame animation and first/last-frame transitions, with optional generated audio.

seedance-2-miniText-to-video, first-frame animation and first/last-frame transitions, with optional generated audio.

veo-3-1Veo 3.1 Fast and Quality with native audio, text, frame and Fast reference-image generation.
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.