OpenAPI reference

Manage API Key

Create image and video tasks, inspect model capabilities, and retrieve generated results with the REST API. The public interface is fixed at v1.

Quickstart

Every /openapi/v1/* endpoint uses API Key authentication. Send a Bearer Token in the request header and never call it directly from browser code.

Base URL
https://open-api.flux-art.ai
Authorization
Bearer fa_live_...
Idempotency: Image and video requests require an 8–128 character Idempotency-Key using letters, digits, periods, underscores, colons, or hyphens. Reuse it for timeout or 5xx retries.
curl -X POST 'https://open-api.flux-art.ai/openapi/v1/images/generations' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: image-order-20260714-0001' \
  -d '{
    "model": "gemini-2.5-flash-image",
    "mode": "generate",
    "prompt": "A product photo in soft daylight",
    "count": 1
  }'
Successful creation: 201 Created with data.status set to queued means the task was created and entered the queue; it is not an error. Save data.id, then poll the Location URL or the task endpoint for the result.

Model catalog

Models and capabilities change over time. Read the catalog first instead of hard-coding the full model set.

GET/openapi/v1/models

Returns image and video models plus supported sizes, ratios, durations, resolutions, and other capabilities.

curl 'https://open-api.flux-art.ai/openapi/v1/models' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Image generation

Each request creates one image task; the public endpoint fixes count=1.

POST/openapi/v1/images/generations

Common request fields

model
Required image model ID.
mode
Required workflow mode: use generate for text-to-image, or edit when submitting image_urls for editing or reference generation.
prompt
Required; at least three non-whitespace characters.
count
Fixed at 1.
image_urls
Required in edit or reference-image mode; must be a public HTTPS URL accessible to the model.
aspect_ratio
Optional image aspect ratio.
size / resolution
Optional image size or resolution.size is used by GPT Image 2, Nano Banana, Seedream, Qwen Image 2.0, Wan, and Kling; resolution is used by Grok Imagine.
curl -X POST 'https://open-api.flux-art.ai/openapi/v1/images/generations' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: image-edit-20260714-0001' \
  -d '{
    "model": "gemini-2.5-flash-image",
    "mode": "edit",
    "prompt": "Keep the subject and use a studio background",
    "count": 1,
    "image_urls": ["https://cdn.example.com/input.jpg"],
    "aspect_ratio": "16:9"
  }'

Video generation

Supports text-to-video, image-to-video, and selected video editing capabilities.

POST/openapi/v1/videos/generations

Common request fields

model
Required video model ID.
video_mode
Required video mode, such as t2v, i2v_first, multimodal_ref, or v2v_edit; it must be supported by the model.
prompt
Required; at least three non-whitespace characters.
image_urls
Optional first frame, last frame, or reference images.
source_video_url
Optional source video for editing or extension.
duration
Optional supported model duration.
resolution
Optional, for example 720p.
ratio / aspect_ratio
Optional video ratio.ratio is used by Seedance and HappyHorse; aspect_ratio by Grok Video, Kling Video, and HappyHorse.
curl -X POST 'https://open-api.flux-art.ai/openapi/v1/videos/generations' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: video-order-20260714-0001' \
  -d '{
    "model": "doubao-seedance-2-0-260128",
    "video_mode": "t2v",
    "prompt": "A slow push through a city at night",
    "duration": 10,
    "resolution": "720p",
    "ratio": "16:9"
  }'

Task queries

A new task returns 201 Created; idempotent replay returns the original task and 200 OK. Response headers include Location and Idempotent-Replayed.

  • queuedQueued
  • processingProcessing
  • succeededSucceeded
  • failedFailed
  • canceledCanceled
GET/openapi/v1/tasks/{task_id}

Read one OpenAPI task for the current account. On success, obtain image or video URLs from output.

curl 'https://open-api.flux-art.ai/openapi/v1/tasks/TASK_ID' \
  -H 'Authorization: Bearer YOUR_API_KEY'
GET/openapi/v1/tasks

Query tasks with cursor pagination. Account-level task reads are limited to 120 per minute.

limit
Items per page.
cursor
Cursor returned by the previous page.
type
image or video.
status
queued, processing, succeeded, failed, or canceled.

Error handling

Every public API error contains error.code, message, and request_id. Provide request id and task id to support—never the full API Key.

  • 400
    invalid_request / invalid_media_url

    Correct parameters or media URLs; do not retry unchanged.

  • 401
    invalid_api_key

    Check whether the key is missing, regenerated, or revoked.

  • 402
    insufficient_points / membership_required

    Add points or upgrade the required membership.

  • 404
    task_not_found

    Verify the task ID and owning account.

  • 409
    idempotency_key_reused

    Use a new key for a different request; retry later if processing.

  • 422
    validation_error

    Correct request fields using details.

  • 429
    rate_limit / concurrent_limit

    Follow Retry-After or wait for existing tasks.

  • 5xx
    internal_error / service_unavailable

    Retry with backoff and keep the original idempotency key.

Model pricing

OpenAPI and the web app share the current Flux Art account's credit balance, membership benefits, and active discounts. Credits are deducted from the same account after a task is created; an insufficient balance returns 402 and no task is created.

Image models

Image tasks are charged per image. Size and quality affect consumption for selected models.

GPT Image 2

gpt-image-2
Current billing rate 50%
Credit consumption details
ConfigurationCredit consumption
Low · 1KOriginal price40Discounted price20credits / image
Low · 2KOriginal price80Discounted price40credits / image
Low · 4KOriginal price120Discounted price60credits / image
Medium · 1KOriginal price80Discounted price40credits / image
Medium · 2KOriginal price120Discounted price60credits / image
Medium · 4KOriginal price160Discounted price80credits / image
High · 1KOriginal price180Discounted price90credits / image
High · 2KOriginal price360Discounted price180credits / image
High · 4KOriginal price600Discounted price300credits / image

Nano Banana 2 Lite

gemini-3.1-flash-lite-image
Current billing rate 50%
Credit consumption details
ConfigurationCredit consumption
Per imageOriginal price100Discounted price50credits / image

Nano Banana 2

gemini-3.1-flash-image-preview
Current billing rate 50%
Credit consumption details
ConfigurationCredit consumption
512Original price80Discounted price40credits / image
1KOriginal price160Discounted price80credits / image
2KOriginal price200Discounted price100credits / image
4KOriginal price320Discounted price160credits / image

Nano Banana

gemini-2.5-flash-image
Current billing rate 50%
Credit consumption details
ConfigurationCredit consumption
Per imageOriginal price70Discounted price35credits / image

Nano Banana Pro

gemini-3-pro-image-preview
Current billing rate 50%
Credit consumption details
ConfigurationCredit consumption
1KOriginal price240Discounted price120credits / image
2KOriginal price320Discounted price160credits / image
4KOriginal price400Discounted price200credits / image

Grok Imagine Image

grok-imagine-image
Credit consumption details
ConfigurationCredit consumption
Per image100credits / image

Grok Imagine Image Pro

grok-imagine-image-pro
Credit consumption details
ConfigurationCredit consumption
Per image250credits / image

Seedream 5.0 Pro

doubao-seedream-5-0-pro-260628
Credit consumption details
ConfigurationCredit consumption
1K120credits / image
2K240credits / image

Seedream 5.0

doubao-seedream-5-0-260128
Credit consumption details
ConfigurationCredit consumption
Per image60credits / image

Seedream 4.5

doubao-seedream-4-5-251128
Credit consumption details
ConfigurationCredit consumption
Per image60credits / image

Wan 2.7 Pro

wan2.7-image-pro
Credit consumption details
ConfigurationCredit consumption
Per image250credits / image

Wan 2.7

wan2.7-image
Credit consumption details
ConfigurationCredit consumption
Per image200credits / image

Qwen Image 2.0 Pro

qwen-image-2.0-pro
Credit consumption details
ConfigurationCredit consumption
Per image150credits / image

Qwen Image 2.0

qwen-image-2.0
Credit consumption details
ConfigurationCredit consumption
Per image120credits / image

Qwen Image Max

qwen-image-max
Credit consumption details
ConfigurationCredit consumption
Per image120credits / image

Qwen Image Edit Max

qwen-image-edit-max
Credit consumption details
ConfigurationCredit consumption
Per image160credits / image

Qwen MT Image

qwen-mt-image
Credit consumption details
ConfigurationCredit consumption
Per image150credits / image

Z-Image Turbo

z-image-turbo
Credit consumption details
ConfigurationCredit consumption
Per image80credits / image

Wan 2.6 T2I

wan2.6-t2i
Credit consumption details
ConfigurationCredit consumption
Per image150credits / image

Wan 2.6 Image

wan2.6-image
Credit consumption details
ConfigurationCredit consumption
Per image150credits / image

Wan 2.5 T2I

wan2.5-t2i-preview
Credit consumption details
ConfigurationCredit consumption
Per image150credits / image

Wan 2.5 I2I

wan2.5-i2i-preview
Credit consumption details
ConfigurationCredit consumption
Per image120credits / image

Wan 2.2 Flash

wan2.2-t2i-flash
Credit consumption details
ConfigurationCredit consumption
Per image100credits / image

Wan 2.2 Plus

wan2.2-t2i-plus
Credit consumption details
ConfigurationCredit consumption
Per image100credits / image

Midjourney V7 Imagine

mj_imagine
Credit consumption details
ConfigurationCredit consumption
Per image60credits / image

Midjourney V7 Blend

mj_blend
Credit consumption details
ConfigurationCredit consumption
Per image60credits / image

Kling Image O1

kling-image-o1
Credit consumption details
ConfigurationCredit consumption
1K90credits / image
2K90credits / image
1K90credits / image
2K90credits / image

Kling V3 Omni Image

kling-v3-omni-image
Credit consumption details
ConfigurationCredit consumption
1K90credits / image
2K90credits / image
4K170credits / image
1K90credits / image
2K90credits / image
4K170credits / image

Kling V3 Image

kling-v3-image
Credit consumption details
ConfigurationCredit consumption
1K90credits / image
2K90credits / image
1K90credits / image
2K90credits / image

Kling V2.1 Image

kling-v2-1-image
Credit consumption details
ConfigurationCredit consumption
1K50credits / image
2K50credits / image
1K90credits / image
2K90credits / image
1K170credits / image
2K170credits / image

Kling V2 New Image

kling-v2-new-image
Credit consumption details
ConfigurationCredit consumption
1K90credits / image

Kling V2 Image

kling-v2-image
Credit consumption details
ConfigurationCredit consumption
1K50credits / image
2K50credits / image
1K90credits / image
2K90credits / image
1K170credits / image
2K170credits / image

Kling V1.5 Image

kling-v1-5-image
Credit consumption details
ConfigurationCredit consumption
1K50credits / image
1K90credits / image

Kling V1 Image

kling-v1-image
Credit consumption details
ConfigurationCredit consumption
1K20credits / image
1K20credits / image

Video models

Video tasks are charged by generated duration. The table uses the model configuration and production cost calculator to show the actual cost of each model's default 5-second task; resolution, audio, and video-input mode affect the final cost.

Grok Video

grok-video-3
Credit consumption details
ConfigurationCredit consumption
Base generation · 480p · 5 seconds500credits / task
Base generation · 720p · 5 seconds750credits / task

HappyHorse 1.0

happyhorse-1.0
Credit consumption details
ConfigurationCredit consumption
Base generation · 720P · 5 seconds1,450credits / task
Base generation · 1080P · 5 seconds2,250credits / task

HappyHorse 1.1

happyhorse-1.1
Credit consumption details
ConfigurationCredit consumption
Base generation · 720P · 5 seconds1,750credits / task
Base generation · 1080P · 5 seconds2,500credits / task

Seedance 2.0

doubao-seedance-2-0-260128
Credit consumption details
ConfigurationCredit consumption
Base generation · 480p · 5 seconds700credits / task
Base generation · 720p · 5 seconds1,500credits / task
Base generation · 1080p · 5 seconds3,750credits / task
Base generation · 4k · 5 seconds7,500credits / task
Single video input · 480p · 5 seconds800credits / task
Single video input · 720p · 5 seconds1,650credits / task
Single video input · 1080p · 5 seconds4,050credits / task
Single video input · 4k · 5 seconds8,100credits / task
Multiple video inputs · 480p · 5 seconds1,700credits / task
Multiple video inputs · 720p · 5 seconds3,600credits / task
Multiple video inputs · 1080p · 5 seconds9,000credits / task
Multiple video inputs · 4k · 5 seconds18,000credits / task

Each video task's total is rounded up to 50 credits

Seedance 2.0 Mini

doubao-seedance-2-0-mini-260615
Credit consumption details
ConfigurationCredit consumption
Base generation · 480p · 5 seconds550credits / task
Base generation · 720p · 5 seconds1,100credits / task
Single video input · 480p · 5 seconds3,000credits / task
Single video input · 720p · 5 seconds6,000credits / task
Multiple video inputs · 480p · 5 seconds6,600credits / task
Multiple video inputs · 720p · 5 seconds13,200credits / task

Each video task's total is rounded up to 50 credits

Seedance 2.0 Fast

doubao-seedance-2-0-fast-260128
Credit consumption details
ConfigurationCredit consumption
Base generation · 480p · 5 seconds550credits / task
Base generation · 720p · 5 seconds1,200credits / task
Single video input · 480p · 5 seconds600credits / task
Single video input · 720p · 5 seconds1,300credits / task
Multiple video inputs · 480p · 5 seconds1,350credits / task
Multiple video inputs · 720p · 5 seconds2,850credits / task

Each video task's total is rounded up to 50 credits

Seedance 1.5 Pro

doubao-seedance-1-5-pro-251215
Credit consumption details
ConfigurationCredit consumption
Base generation · 480p · 5 seconds150credits / task
Base generation · 720p · 5 seconds300credits / task
Base generation · 1080p · 5 seconds600credits / task
Generate audio · 480p · 5 seconds250credits / task
Generate audio · 720p · 5 seconds550credits / task
Generate audio · 1080p · 5 seconds1,200credits / task

Each video task's total is rounded up to 50 credits

Seedance 1.0 Pro

doubao-seedance-1-0-pro-250528
Credit consumption details
ConfigurationCredit consumption
Base generation · 480p · 5 seconds250credits / task
Base generation · 720p · 5 seconds500credits / task
Base generation · 1080p · 5 seconds1,100credits / task

Each video task's total is rounded up to 50 credits

Seedance 1.0 Pro Fast

doubao-seedance-1-0-pro-fast-251015
Credit consumption details
ConfigurationCredit consumption
Base generation · 480p · 5 seconds100credits / task
Base generation · 720p · 5 seconds150credits / task
Base generation · 1080p · 5 seconds350credits / task

Each video task's total is rounded up to 50 credits

Kling V3 Omni

kling-v3-omni
Credit consumption details
ConfigurationCredit consumption
Base generation · undefined · 3 seconds750credits / task
Base generation · undefined · 3 seconds1,020credits / task
Base generation · undefined · 3 seconds3,750credits / task
Generate audio · undefined · 3 seconds1,020credits / task
Generate audio · undefined · 3 seconds1,260credits / task
Generate audio · undefined · 3 seconds3,750credits / task
Single video input · undefined · 3 seconds1,140credits / task
Single video input · undefined · 3 seconds1,500credits / task
Single video input · undefined · 3 seconds3,750credits / task

Kling Video O1

kling-video-o1
Credit consumption details
ConfigurationCredit consumption
Base generation · undefined · 5 seconds1,250credits / task
Base generation · undefined · 5 seconds1,700credits / task
Single video input · undefined · 5 seconds1,900credits / task
Single video input · undefined · 5 seconds2,500credits / task

Kling V3

kling-v3
Credit consumption details
ConfigurationCredit consumption
Base generation · undefined · 3 seconds750credits / task
Base generation · undefined · 3 seconds1,020credits / task
Base generation · undefined · 3 seconds3,750credits / task
Generate audio · undefined · 3 seconds1,140credits / task
Generate audio · undefined · 3 seconds1,500credits / task
Generate audio · undefined · 3 seconds3,750credits / task

Kling V2.6

kling-v2-6
Credit consumption details
ConfigurationCredit consumption
Base generation · undefined · 5 seconds650credits / task
Base generation · undefined · 5 seconds1,050credits / task
Generate audio · undefined · 5 seconds2,100credits / task

Kling V2.5 Turbo

kling-v2-5-turbo
Credit consumption details
ConfigurationCredit consumption
Base generation · undefined · 5 seconds650credits / task
Base generation · undefined · 5 seconds1,050credits / task

Kling V2.1 Master

kling-v2-1-master
Credit consumption details
ConfigurationCredit consumption
Base generation · undefined · 5 seconds4,200credits / task

Kling V2.1

kling-v2-1
Credit consumption details
ConfigurationCredit consumption
Base generation · undefined · 5 seconds850credits / task
Base generation · undefined · 5 seconds1,500credits / task

Kling V2 Master

kling-v2-master
Credit consumption details
ConfigurationCredit consumption
Base generation · undefined · 5 seconds4,200credits / task

Kling V1.6

kling-v1-6
Credit consumption details
ConfigurationCredit consumption
Base generation · undefined · 5 seconds850credits / task
Base generation · undefined · 5 seconds1,500credits / task

Kling V1.5

kling-v1-5
Credit consumption details
ConfigurationCredit consumption
Base generation · undefined · 5 seconds850credits / task
Base generation · undefined · 5 seconds1,500credits / task

Kling V1

kling-v1
Credit consumption details
ConfigurationCredit consumption
Base generation · undefined · 5 seconds450credits / task
Base generation · undefined · 5 seconds1,500credits / task