Annual Sale!Get 30% offClaim Now→

Developer API · v1 live

Every model.
One API key.

Generate images and video with Nano Banana, GPT Image, Seedream, Seedance and Veo through one request shape, billed with the credits you already have.

Included with every paid plan and credit pack. Sign in to create a key.

  • 12 models live
  • Same credits as the app
  • Refunds on failure
curl https://flux1.ai/api/v1/generations \
  -H "Authorization: Bearer $FLUX1_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana-2",
    "prompt": "product photo of a ceramic mug, soft daylight",
    "aspect_ratio": "1:1",
    "resolution": "1K"
  }'

Model catalog

12 models live, one endpoint

Open a model for its parameters, credit prices and copy-ready examples. GET /v1/models always returns the current list.

Full model reference

Image8

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

What you get

Built for the code you already write

One request shape for every model

Swap the model id, keep the code. Image and video models take the same JSON body and return the same job object.

Same credits as the app

API calls draw from your existing balance at the per-model price you see in the generator. No separate API plan, no second invoice.

Async jobs, simple polling

Submit and get an id back immediately. Poll it every few seconds until the file is ready on a CDN URL; most images finish in 10 to 20 seconds.

Refunds and logs built in

Failed generations return their credits automatically, and every request, including rejected ones, is listed in your console with its status and cost.

Agent-ready docs

Let your coding agent read the docs

Every docs page is also served as plain Markdown. Paste this prompt into Claude Code, Cursor or Codex and it integrates from the real reference instead of guessing.

/api/docs/markdown
prompt.txt
Read the Flux1 AI API docs at https://flux1.ai/api/docs/markdown and open the linked model pages you need. Answer from those docs only.

My question: how do I generate a 5-second Seedance 2.0 video from an image with Node.js, then poll until it is ready?

How it works

Three steps to your first generation

  1. 01

    Pick a plan

    Any paid plan or credit pack includes the API. There is no separate API plan: the credits you already have are the credits the API spends.

    See plans
  2. 02

    Create a key

    Open the console and create a key. It is shown once, so store it on your server. Up to 5 active keys per account, revocable any time.

    Open API Keys
  3. 03

    Ship

    Plain REST with JSON. Submit, poll the id it returns, download the file. Every request, including rejected ones, shows up under API Logs.

    Quick start

Questions

What does the API cost?

The same credits as the web app, at the same per-model price: Nano Banana from 6 credits an image, Nano Banana 2 from 10. There is no separate API subscription, and failed generations are refunded automatically.

Which models are included?

12 models today: seedance-2, seedance-2-fast, seedance-2-mini, veo-3-1, seedream-5, nano-banana, nano-banana-pro, nano-banana-2, nano-banana-2-1, nano-banana-2-lite, gpt-image-2-5, gpt-image-2. More of the Flux1 AI catalog follows. GET /v1/models always returns the live list with prices and options.

How do I get access?

Buy any plan or credit pack, then create a key in the console under API Keys. Free and gifted credits do not unlock the API. Accounts that abuse the API can be disabled.

Are there webhooks?

Not in v1. Poll GET /v1/generations/{id} every 2 to 3 seconds; the response carries the status, the output URLs and whether credits were refunded. An Idempotency-Key header for safe retries is on the roadmap.

Is there an SDK?

The API is plain REST over HTTPS with JSON bodies, so it works from any language. The docs include complete cURL, Node.js and Python examples that submit and poll a generation.

Your key is one click away.

Create it in the console, paste it into the sample above, and the first generation is billed like any other in your account.

Included with every paid plan and credit pack. Sign in to create a key.