Flux 3 Max API, Flux 3 Klien API, Flux Kontext, Flux Dev, Flux Pro, Flux 2 Pro, Flux Schnell API: Pricing, Documentation

by Black Forest Labs

Flux by Black Forest Labs represents the cutting edge of open AI image generation, offering multiple model variants including Dev, Pro, and Schnell for different use cases. Through Pixazo's API, developers can access all Flux versions for generating highly detailed, photorealistic images from text prompts. The API supports advanced features like image-to-image transformation, style control, and batch processing for production workflows.

Get API Key
Flux API

Models Version

WELCOME BONUS

Get 10% Cashback on Your First Payment (up to $500)

Add funds and get 10% cashback on your first payment (up to $500).

Claim Your Cashback →

FLUX 3 Max API Documentation

Generate a video from a text prompt with FLUX 3 Max. You choose the length (duration, 5 to 20 seconds), the resolution (resolution, 720p or 1080p) and the frame shape (aspect_ratio). Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/flux-3-max/v1/text-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Video - FLUX 3 Max

Request Code

POST https://gateway.pixazo.ai/flux-3-max/v1/text-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A red panda walks along a mossy log in a sunlit forest, pausing to sniff the air.",
  "duration": 5,
  "resolution": "720p"
}
import requests

url = "https://gateway.pixazo.ai/flux-3-max/v1/text-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A red panda walks along a mossy log in a sunlit forest, pausing to sniff the air.",
  "duration": 5,
  "resolution": "720p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/flux-3-max/v1/text-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "A red panda walks along a mossy log in a sunlit forest, pausing to sniff the air.",
  "duration": 5,
  "resolution": "720p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/flux-3-max/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A red panda walks along a mossy log in a sunlit forest, pausing to sniff the air.", "duration": 5, "resolution": "720p"}'

Output

{
  "request_id": "flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/flux-3-max/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "A red panda walks along a mossy log in a sunlit forest, pausing to sniff the air.", "duration": 5, "resolution": "720p"}'

Callback Payload (success)

{
  "request_id": "flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-max",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-3-max",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—Non-empty textWhat happens in the video: the scene, the action, the camera movement and the mood.
durationNointeger55–20Requested length of the video in whole seconds. Billing is per requested second.
resolutionNostring"720p"720p, 1080pOutput resolution, written exactly as listed. 1080p costs more per second.
aspect_ratioNostring"auto"auto, 21:9, 2:1, 16:9, 4:3, 1:1, 3:4, 9:16Frame shape of the video; auto gives 16:9 for a text prompt. It does not change the amount billed.
generate_audioNobooleantruetrue, falseWhether to generate audio for the video. Turning audio on or off does not change the price.
reasoning_levelNostring"high"low, highHow much effort the model spends reasoning about your prompt. It does not change the amount billed.
seedNointegerRandom0–2147483647Seed for the random generator; leave it out for a random seed. It does not change the amount billed.

Good to know

  • Each request returns one video. batch_size, num_images, number_of_images, n and count are rejected — send one request per video.
  • Set the length with duration, in whole seconds from 5 to 20 (5 when you leave it out); seconds, num_frames, frames_per_second and music_length_ms are rejected.
  • Set the resolution with resolution: 720p or 1080p, written exactly as listed (720p when you leave it out).
  • Send every field at the top level of the JSON body, with the text in prompt; parameters, content and text are rejected.
  • Text-to-video takes no images: image_url, end_image_url, keyframes, image_urls, image and images are rejected (use the Image to Video or Keyframes to Video operation).
  • Omit a field instead of sending null.
  • Use the JSON types shown: duration and seed are whole numbers (5, not "5"), and generate_audio is true or false, not a string.
  • Results are always returned as a URL in output.media_url; sync_mode is accepted only as false.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url, webhook_mode and callback_url in the JSON body are rejected.
  • Options this API does not offer are rejected: model, videos and video_url.

Length and Resolution

Set duration to the length you want in whole seconds, from 5 to 20; 5 applies when you leave it out. Set resolution to one of the values below; 720p applies when you leave it out. Billing is per second of the requested duration at the rate for the requested resolution, so a longer or higher-resolution video costs more.

resolutionNote
720pThe default; the lower cost per second
1080pThe higher cost per second

Example: an 8-second vertical video at 1080p

{
  "prompt": "A paper boat drifts down a rain-soaked street at dusk, reflections on the water.",
  "aspect_ratio": "9:16",
  "duration": 8,
  "resolution": "1080p"
}

Aspect Ratio

Set aspect_ratio to auto, 21:9, 2:1, 16:9, 4:3, 1:1, 3:4 or 9:16; auto applies when you leave it out, and auto gives 16:9 for a text prompt. It does not change the amount billed.

Audio

Audio is generated with the video unless you set generate_audio to false. Turning audio on or off does not change the price.

Example: turn audio off and use low reasoning

{
  "prompt": "Waves roll onto a quiet beach at sunrise.",
  "generate_audio": false,
  "reasoning_level": "low",
  "duration": 5,
  "resolution": "720p"
}

Example Request

{
  "prompt": "A red panda walks along a mossy log in a sunlit forest, pausing to sniff the air.",
  "duration": 5,
  "resolution": "720p"
}

Example Response

{
  "request_id": "flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a stringsynchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
aspect_ratio not one of the allowed values (written exactly as listed)synchronous 400
reasoning_level not one of the allowed values (written exactly as listed)synchronous 400
generate_audio not true or false — for example the string "true"synchronous 400
duration not a whole number from 5 to 20 — for example 4, 21 or the string "5"synchronous 400
seed not a whole number from 0 to 2147483647 — for example -1, 2147483648 or the string "0"synchronous 400
sync_mode set to anything other than false (results are always returned as a URL in output.media_url)synchronous 400
batch_size, num_images, number_of_images, n, count (one video per request)synchronous 400
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration, in whole seconds)synchronous 400
parameters, content, text (send the fields at the top level of the JSON body, the text in prompt)synchronous 400
image_url, end_image_url (images go to the Image to Video operation)synchronous 400
keyframes (keyframes go to the Keyframes to Video operation)synchronous 400
image_urls, image, images (text-to-video takes no images)synchronous 400
videos, video_url (this API takes no input video)synchronous 400
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
model (not offered on this API)synchronous 400
stream (not accepted by this operation)synchronous 400
A prompt the model refuses, for example under its content policystatus: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing prompt (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'prompt' is required",
  "violations": [
    "'prompt' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'resolution' must be one of: \"720p\", \"1080p\" (got \"4K\")",
  "violations": [
    "'resolution' must be one of: \"720p\", \"1080p\" (got \"4K\")"
  ]
}

A value out of range (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be <= 20 (got 21)",
  "violations": [
    "'duration' must be <= 20 (got 21)"
  ]
}

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be integer (got string)",
  "violations": [
    "'duration' must be integer (got string)"
  ]
}

More than one video per request (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'num_images' must be one of:  (got 2); 'num_images' is not supported: FLUX 3 Max returns one video per request. Send one request per video.",
  "violations": [
    "'num_images' must be one of:  (got 2)",
    "'num_images' is not supported: FLUX 3 Max returns one video per request. Send one request per video."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-max",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — flux-3-max for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/flux-3-max/v1/text-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of the requested duration, at the rate for the requested resolution: the amount is the per-second rate for resolution (720p when you leave it out) times duration (5 seconds when you leave it out). Higher resolutions cost more per second. The prompt, seed, aspect ratio, reasoning level and audio setting do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rate is shown in the pricing panel on this page.

FLUX 3 Max API Pricing

Billed per second of video at the requested resolution (720p or 1080p); turning audio on or off does not change the price. 720p and 5 seconds are the defaults; duration can be 5 to 20 seconds.

ResolutionPrice (USD)
720p / per second$0.17
1080p / per second$0.29
Image to Video

FLUX 3 Max API Documentation

Animate an image with FLUX 3 Max: send the first frame in image_url (and, optionally, the last frame in end_image_url) with a prompt describing how the video unfolds. You choose the length (duration, 5 to 20 seconds) and the resolution (resolution, 720p or 1080p). Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/flux-3-max/v1/image-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Video - FLUX 3 Max

Request Code

POST https://gateway.pixazo.ai/flux-3-max/v1/image-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 5,
  "resolution": "720p"
}
import requests

url = "https://gateway.pixazo.ai/flux-3-max/v1/image-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 5,
  "resolution": "720p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/flux-3-max/v1/image-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 5,
  "resolution": "720p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/flux-3-max/v1/image-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.", "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "duration": 5, "resolution": "720p"}'

Output

{
  "request_id": "flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/flux-3-max/v1/image-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.", "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "duration": 5, "resolution": "720p"}'

Callback Payload (success)

{
  "request_id": "flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-max",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-3-max",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
image_urlYesstring—One image: a publicly reachable https URL (recommended) or a data URIThe first frame of the video. Use a PNG, JPEG or WebP file.
promptYesstring—Non-empty textHow the video unfolds from the image: the motion, the camera movement and the mood.
end_image_urlNostring—One image: a publicly reachable https URL (recommended) or a data URIOptional last frame of the video (PNG, JPEG or WebP).
durationNointeger55–20Requested length of the video in whole seconds. Billing is per requested second.
resolutionNostring"720p"720p, 1080pOutput resolution, written exactly as listed. 1080p costs more per second.
aspect_ratioNostring"auto"auto, 21:9, 2:1, 16:9, 4:3, 1:1, 3:4, 9:16Frame shape of the video; auto follows your image. It does not change the amount billed.
generate_audioNobooleantruetrue, falseWhether to generate audio for the video. Turning audio on or off does not change the price.
reasoning_levelNostring"high"low, highHow much effort the model spends reasoning about your prompt. It does not change the amount billed.
seedNointegerRandom0–2147483647Seed for the random generator; leave it out for a random seed. It does not change the amount billed.

Good to know

  • Each request returns one video. batch_size, num_images, number_of_images, n and count are rejected — send one request per video.
  • Set the length with duration, in whole seconds from 5 to 20 (5 when you leave it out); seconds, num_frames, frames_per_second and music_length_ms are rejected.
  • Set the resolution with resolution: 720p or 1080p, written exactly as listed (720p when you leave it out).
  • Send every field at the top level of the JSON body, with the text in prompt; parameters, content and text are rejected.
  • Send the first frame as image_url and, optionally, the last frame as end_image_url; keyframes, image_urls, image and images are rejected.
  • Omit a field instead of sending null.
  • Use the JSON types shown: duration and seed are whole numbers (5, not "5"), and generate_audio is true or false, not a string.
  • Results are always returned as a URL in output.media_url; sync_mode is accepted only as false.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url, webhook_mode and callback_url in the JSON body are rejected.
  • Options this API does not offer are rejected: model, videos and video_url.

Length and Resolution

Set duration to the length you want in whole seconds, from 5 to 20; 5 applies when you leave it out. Set resolution to one of the values below; 720p applies when you leave it out. Billing is per second of the requested duration at the rate for the requested resolution, so a longer or higher-resolution video costs more.

resolutionNote
720pThe default; the lower cost per second
1080pThe higher cost per second

Example: an 8-second video at 1080p

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "Slow orbit around the subject, soft morning light.",
  "duration": 8,
  "resolution": "1080p"
}

Source Image

  • Send the first frame in image_url: a publicly reachable https URL (recommended) or a data URI such as data:image/png;base64,.... A list of images is rejected.
  • Optionally send the last frame in end_image_url, in the same form.
  • Use PNG, JPEG or WebP files. Each image is downloaded when you submit: a URL that cannot be downloaded, or a very large file, may be refused at once with a 400, with nothing charged.
  • Set the frame shape with aspect_ratio; auto follows your image. With aspect_ratio left on auto, the video keeps the aspect ratio of your image.
  • Describe how the video unfolds in prompt (required).

Example: set both the first and the last frame

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "end_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "The subject turns away and back again.",
  "duration": 6,
  "resolution": "720p"
}

Audio

Audio is generated with the video unless you set generate_audio to false. Turning audio on or off does not change the price. With generate_audio left on, image-to-video output includes generated sound.

Example Request

{
  "prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 5,
  "resolution": "720p"
}

Example Response

{
  "request_id": "flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or the image could not be downloaded. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. An image that cannot be downloaded is also refused at submit with a 400, and its hold is released at once: nothing is charged. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a stringsynchronous 400
Missing or empty image_url, or image_url sent as anything other than a single stringsynchronous 400
An image_url that cannot be downloaded when you submit, or that returns a web page or an empty file instead of an image (the hold is released at once: nothing is charged)synchronous 400
An end_image_url that cannot be downloaded when you submit (the hold is released at once: nothing is charged)synchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
aspect_ratio not one of the allowed values (written exactly as listed)synchronous 400
reasoning_level not one of the allowed values (written exactly as listed)synchronous 400
generate_audio not true or false — for example the string "true"synchronous 400
duration not a whole number from 5 to 20 — for example 4, 21 or the string "5"synchronous 400
seed not a whole number from 0 to 2147483647 — for example -1, 2147483648 or the string "0"synchronous 400
end_image_url not a stringsynchronous 400
sync_mode set to anything other than false (results are always returned as a URL in output.media_url)synchronous 400
batch_size, num_images, number_of_images, n, count (one video per request)synchronous 400
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration, in whole seconds)synchronous 400
parameters, content, text (send the fields at the top level of the JSON body, the text in prompt)synchronous 400
keyframes (keyframes go to the Keyframes to Video operation)synchronous 400
image_urls, image, images (send the first frame as image_url)synchronous 400
videos, video_url (this API takes no input video)synchronous 400
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
model (not offered on this API)synchronous 400
stream (not accepted by this operation)synchronous 400
An image the model cannot use, for example a file that is not an imagestatus: "ERROR"
A prompt or image the model refuses, for example under its content policystatus: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing image_url (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'image_url' is required",
  "violations": [
    "'image_url' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'resolution' must be one of: \"720p\", \"1080p\" (got \"1440p\")",
  "violations": [
    "'resolution' must be one of: \"720p\", \"1080p\" (got \"1440p\")"
  ]
}

A value out of range (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be >= 5 (got 4)",
  "violations": [
    "'duration' must be >= 5 (got 4)"
  ]
}

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be integer (got string)",
  "violations": [
    "'duration' must be integer (got string)"
  ]
}

A field this API does not accept (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'video_url' must be one of:  (got \"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg\"); 'video_url' is not supported: this API takes no input video.",
  "violations": [
    "'video_url' must be one of:  (got \"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg\")",
    "'video_url' is not supported: this API takes no input video."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-max",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — flux-3-max for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/flux-3-max/v1/image-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of the requested duration, at the rate for the requested resolution: the amount is the per-second rate for resolution (720p when you leave it out) times duration (5 seconds when you leave it out). Higher resolutions cost more per second. The prompt, seed, aspect ratio, reasoning level and audio setting do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rate is shown in the pricing panel on this page.

FLUX 3 Max API Pricing

Billed per second of video at the requested resolution (720p or 1080p); the start image, an optional end image and turning audio on or off do not change the price. 720p and 5 seconds are the defaults; duration can be 5 to 20 seconds.

ResolutionPrice (USD)
720p / per second$0.17
1080p / per second$0.29
Keyframes to Video

FLUX 3 Max API Documentation

Generate a video that passes through 1 to 10 keyframe images with FLUX 3 Max: pin each image to a position in keyframes and describe in prompt how the video moves between them. You choose the length (5 to 20 seconds) and the resolution (720p or 1080p). Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/flux-3-max/v1/keyframes-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Keyframes to Video - FLUX 3 Max

Request Code

POST https://gateway.pixazo.ai/flux-3-max/v1/keyframes-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "The scene moves smoothly from the first keyframe to the second, soft morning light.",
  "keyframes": [
    {
      "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
      "frame_index": 0
    },
    {
      "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
      "frame_index": 120
    }
  ],
  "duration": 5,
  "resolution": "720p"
}
import requests

url = "https://gateway.pixazo.ai/flux-3-max/v1/keyframes-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "The scene moves smoothly from the first keyframe to the second, soft morning light.",
  "keyframes": [
    {
      "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
      "frame_index": 0
    },
    {
      "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
      "frame_index": 120
    }
  ],
  "duration": 5,
  "resolution": "720p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/flux-3-max/v1/keyframes-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "The scene moves smoothly from the first keyframe to the second, soft morning light.",
  "keyframes": [
    {
      "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
      "frame_index": 0
    },
    {
      "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
      "frame_index": 120
    }
  ],
  "duration": 5,
  "resolution": "720p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/flux-3-max/v1/keyframes-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "The scene moves smoothly from the first keyframe to the second, soft morning light.", "keyframes": [{"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "frame_index": 0}, {"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "frame_index": 120}], "duration": 5, "resolution": "720p"}'

Output

{
  "request_id": "flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/flux-3-max/v1/keyframes-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "The scene moves smoothly from the first keyframe to the second, soft morning light.", "keyframes": [{"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "frame_index": 0}, {"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "frame_index": 120}], "duration": 5, "resolution": "720p"}'

Callback Payload (success)

{
  "request_id": "flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-max",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-3-max",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
keyframesYesarray—1–10 objectsThe images the video passes through. Each item is an object with image_url (a PNG, JPEG or WebP image: an https URL is recommended, a data URI is accepted) and frame_index: a whole number from 0 to duration × 24, different for every keyframe.
promptYesstring—Non-empty textHow the video moves between the keyframes.
durationNointeger55–20Requested length of the video in whole seconds. Billing is per requested second.
resolutionNostring"720p"720p, 1080pOutput resolution, written exactly as listed. 1080p costs more per second.
aspect_ratioNostring"auto"auto, 21:9, 2:1, 16:9, 4:3, 1:1, 3:4, 9:16Frame shape of the video; auto follows the first keyframe image. It does not change the amount billed.
generate_audioNobooleantruetrue, falseWhether to generate audio for the video. Turning audio on or off does not change the price.
reasoning_levelNostring"high"low, highHow much effort the model spends reasoning about your prompt. It does not change the amount billed.
seedNointegerRandom0–2147483647Seed for the random generator; leave it out for a random seed. It does not change the amount billed.

Good to know

  • Each request returns one video. batch_size, num_images, number_of_images, n and count are rejected — send one request per video.
  • Set the length with duration, in whole seconds from 5 to 20 (5 when you leave it out); seconds, num_frames, frames_per_second and music_length_ms are rejected.
  • Set the resolution with resolution: 720p or 1080p, written exactly as listed (720p when you leave it out).
  • Send every field at the top level of the JSON body, with the text in prompt; parameters, content and text are rejected.
  • Send 1 to 10 keyframes, each an object with image_url and frame_index (a whole number from 0 to duration × 24, different for every keyframe); image_url, end_image_url, image_urls, image and images are rejected.
  • Omit a field instead of sending null.
  • Use the JSON types shown: duration and seed are whole numbers (5, not "5"), and generate_audio is true or false, not a string.
  • Results are always returned as a URL in output.media_url; sync_mode is accepted only as false.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url, webhook_mode and callback_url in the JSON body are rejected.
  • Options this API does not offer are rejected: model, videos and video_url.

Length and Resolution

Set duration to the length you want in whole seconds, from 5 to 20; 5 applies when you leave it out. Set resolution to one of the values below; 720p applies when you leave it out. Billing is per second of the requested duration at the rate for the requested resolution, so a longer or higher-resolution video costs more.

resolutionNote
720pThe default; the lower cost per second
1080pThe higher cost per second

Example: three keyframes over 10 seconds at 1080p

{
  "prompt": "The camera follows the subject from one keyframe to the next.",
  "keyframes": [
    {
      "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
      "frame_index": 0
    },
    {
      "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
      "frame_index": 120
    },
    {
      "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
      "frame_index": 240
    }
  ],
  "duration": 10,
  "resolution": "1080p"
}

Keyframes

  • Send 1 to 10 items in keyframes. Each item is an object with image_url and frame_index.
  • frame_index is the position of the image in the video: a whole number from 0 (the first frame) to duration × 24 (the last frame), different for every keyframe. For a 5-second video, 120 is the last frame.
  • Use PNG, JPEG or WebP images, as publicly reachable https URLs (recommended) or data URIs. Very many or very large inputs may be refused at once with a 400, with nothing charged; so may a URL that cannot be downloaded.
  • A keyframe set the model cannot use, such as a frame_index above duration × 24 or used twice, ends the request with status: "ERROR", and its hold is released.

Example: pin the last frame of a 6-second video (6 x 24 = 144)

{
  "prompt": "The subject walks toward the camera.",
  "keyframes": [
    {
      "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
      "frame_index": 0
    },
    {
      "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
      "frame_index": 144
    }
  ],
  "duration": 6,
  "resolution": "720p"
}

Aspect Ratio

Set aspect_ratio to auto, 21:9, 2:1, 16:9, 4:3, 1:1, 3:4 or 9:16; auto applies when you leave it out, and auto follows the first keyframe image. It does not change the amount billed.

Audio

Audio is generated with the video unless you set generate_audio to false. Turning audio on or off does not change the price.

Example Request

{
  "prompt": "The scene moves smoothly from the first keyframe to the second, soft morning light.",
  "keyframes": [
    {
      "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
      "frame_index": 0
    },
    {
      "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
      "frame_index": 120
    }
  ],
  "duration": 5,
  "resolution": "720p"
}

Example Response

{
  "request_id": "flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or an input could not be downloaded. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. An input that cannot be downloaded is also refused at submit with a 400, and so may be very many or very large inputs; the hold is then released at once: nothing is charged. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a stringsynchronous 400
Missing or empty keyframes, keyframes not a list, or more than 10 itemssynchronous 400
A keyframe image_url that cannot be downloaded when you submit, or very many or very large inputs (the hold is released at once: nothing is charged)synchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
aspect_ratio not one of the allowed values (written exactly as listed)synchronous 400
reasoning_level not one of the allowed values (written exactly as listed)synchronous 400
generate_audio not true or false — for example the string "true"synchronous 400
duration not a whole number from 5 to 20 — for example 4, 21 or the string "5"synchronous 400
seed not a whole number from 0 to 2147483647 — for example -1, 2147483648 or the string "0"synchronous 400
sync_mode set to anything other than false (results are always returned as a URL in output.media_url)synchronous 400
batch_size, num_images, number_of_images, n, count (one video per request)synchronous 400
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration, in whole seconds)synchronous 400
parameters, content, text (send the fields at the top level of the JSON body, the text in prompt)synchronous 400
image_url, end_image_url, image_urls, image, images (send the images inside keyframes)synchronous 400
videos, video_url (this API takes no input video)synchronous 400
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
model (not offered on this API)synchronous 400
stream (not accepted by this operation)synchronous 400
A keyframe the model cannot use, for example a file that is not an image, or a frame_index above duration × 24 or used twicestatus: "ERROR"
A prompt or keyframe the model refuses, for example under its content policystatus: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing keyframes (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'keyframes' is required",
  "violations": [
    "'keyframes' is required"
  ]
}

More than 10 keyframes (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'keyframes' must have at most 10 items (got 11)",
  "violations": [
    "'keyframes' must have at most 10 items (got 11)"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'aspect_ratio' must be one of: \"auto\", \"21:9\", \"2:1\", \"16:9\", \"4:3\", \"1:1\", \"3:4\", \"9:16\" (got \"32:9\")",
  "violations": [
    "'aspect_ratio' must be one of: \"auto\", \"21:9\", \"2:1\", \"16:9\", \"4:3\", \"1:1\", \"3:4\", \"9:16\" (got \"32:9\")"
  ]
}

A length field other than duration (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seconds' must be one of:  (got 8); 'seconds' is not supported. Set the length with 'duration' (whole seconds, 5-20).",
  "violations": [
    "'seconds' must be one of:  (got 8)",
    "'seconds' is not supported. Set the length with 'duration' (whole seconds, 5-20)."
  ]
}

More than one video per request (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'num_images' must be one of:  (got 2); 'num_images' is not supported: FLUX 3 Max returns one video per request. Send one request per video.",
  "violations": [
    "'num_images' must be one of:  (got 2)",
    "'num_images' is not supported: FLUX 3 Max returns one video per request. Send one request per video."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "flux-3-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-max",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — flux-3-max for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/flux-3-max/v1/keyframes-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of the requested duration, at the rate for the requested resolution: the amount is the per-second rate for resolution (720p when you leave it out) times duration (5 seconds when you leave it out). Higher resolutions cost more per second. The prompt, seed, aspect ratio, reasoning level and audio setting do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rate is shown in the pricing panel on this page.

FLUX 3 Max API Pricing

Billed per second of video at the requested resolution (720p or 1080p); the number of keyframes (1 to 10) and turning audio on or off do not change the price. 720p and 5 seconds are the defaults; duration can be 5 to 20 seconds.

ResolutionPrice (USD)
720p / per second$0.17
1080p / per second$0.29
2. FLUX 3 Klein

FLUX 3 Klein API Documentation

Generate an image from text with FLUX 3 Klein: describe it in prompt and, optionally, choose the shape with aspect_ratio and the size with resolution. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the image from output.media_url.

POST https://gateway.pixazo.ai/flux-3-klein/v1/text-to-image

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Image - FLUX 3 Klein

Request Code

POST https://gateway.pixazo.ai/flux-3-klein/v1/text-to-image
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A red fox standing in fresh snow at sunrise, soft golden light, pine forest in the background",
  "aspect_ratio": "16:9",
  "resolution": "1k"
}
import requests

url = "https://gateway.pixazo.ai/flux-3-klein/v1/text-to-image"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A red fox standing in fresh snow at sunrise, soft golden light, pine forest in the background",
  "aspect_ratio": "16:9",
  "resolution": "1k"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/flux-3-klein/v1/text-to-image", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "A red fox standing in fresh snow at sunrise, soft golden light, pine forest in the background",
  "aspect_ratio": "16:9",
  "resolution": "1k"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/flux-3-klein/v1/text-to-image' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A red fox standing in fresh snow at sunrise, soft golden light, pine forest in the background", "aspect_ratio": "16:9", "resolution": "1k"}'

Output

{
  "request_id": "flux-3-klein_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-klein_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/flux-3-klein/v1/text-to-image' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "A red fox standing in fresh snow at sunrise, soft golden light, pine forest in the background", "aspect_ratio": "16:9", "resolution": "1k"}'

Callback Payload (success)

{
  "request_id": "flux-3-klein_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-klein",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.jpg"
    ],
    "media_type": "image/jpeg"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "flux-3-klein_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-3-klein",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—Non-empty textA description of the image: framing, subject, background and lighting.
aspect_ratioNostring"1:1"21:9, 2:1, 16:9, 3:2, 7:5, 4:3, 5:4, 1:1, 4:5, 3:4, 5:7, 2:3, 9:16, 1:2, 9:21, autoThe shape of the output image. auto lets the model choose the shape from the prompt. The aspect ratio does not change the amount billed.
resolutionNostring"1k"768sq, 1k, 1.5k, 2k, 4kThe size tier of the output image: 768sq is 768 by 768 pixels at 1:1, and 1k, 1.5k, 2k and 4k are about 1, 2, 4 and 16 megapixels (see Output Size and Layout below). The tier sets the amount billed per image.
seedNointeger—Whole number from 0 to 4294967295The same seed and the same request give the same image again; a new seed gives a new variation.

Good to know

  • Each request returns one image. batch_size, num_images, number_of_images, n and count are rejected — send one request per image.
  • This API makes still images and has no length setting. duration, seconds, num_frames, frames_per_second and music_length_ms are rejected.
  • Send every field at the top level of the JSON body; parameters, input, content and text are rejected.
  • To edit or compose images, use the FLUX 3 Klein edit API: POST https://gateway.pixazo.ai/flux-3-klein-edit/v1/edit-image. image_urls, image_url and image are rejected here.
  • images is not accepted by text to image. Use the FLUX 3 Klein edit API to edit or combine images.
  • Leave aspect_ratio out for a square image (1:1) and resolution out for 1k.
  • image_size is no longer accepted: FLUX 3 Klein now takes aspect_ratio (for example "16:9") and resolution (768sq, 1k, 1.5k, 2k or 4k) instead.
  • output_format is no longer accepted: the output is always a JPEG image.
  • bounding_boxes, enable_prompt_expansion and enable_safety_checker are not supported on this API.
  • sync_mode is not supported on this API: requests are asynchronous; poll the status URL for the result.
  • Use the JSON types shown: prompt, aspect_ratio and resolution are strings, and seed is a whole number. aspect_ratio and resolution take exactly the values listed.
  • Omit a field instead of sending null.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url, webhook_mode and callback_url in the JSON body are rejected.
  • stream is not supported: the result is delivered when the job completes.
  • Options this API does not offer are rejected: width, height, steps and safety_tolerance.

Output Size and Layout

  • Choose the layout with aspect_ratio: wide (21:9 to 5:4), square (1:1) or tall (4:5 to 9:21). 1:1 applies when you leave it out; auto lets the model choose the shape from the prompt.
  • Choose the size with resolution: 768sq is 768 by 768 pixels at 1:1; 1k (the default) is about 1 megapixel, 1.5k about 2, 2k about 4 and 4k about 16 megapixels. The exact width and height vary with the aspect ratio; the area is about the same for every ratio.
  • The resolution tier sets the amount billed; the aspect ratio does not: see How Billing Is Measured below.

Example: a wide image at a higher resolution

{
  "prompt": "A quiet harbor town at sunrise, fishing boats and soft mist over the water",
  "aspect_ratio": "21:9",
  "resolution": "2k"
}

Example: a tall image with a fixed seed

{
  "prompt": "A red lighthouse on a rocky cliff at dusk, waves breaking below",
  "aspect_ratio": "9:16",
  "resolution": "1.5k",
  "seed": 1234
}

Example Request

{
  "prompt": "A red fox standing in fresh snow at sunrise, soft golden light, pine forest in the background",
  "aspect_ratio": "16:9",
  "resolution": "1k"
}

Example Response

{
  "request_id": "flux-3-klein_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-klein_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is too long, out of range or not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a stringsynchronous 400
aspect_ratio not one of the allowed values (written exactly as listed)synchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
seed not a whole number from 0 to 4294967295 — for example -1, 4294967296 or the string "0"synchronous 400
image_size — “'image_size' is no longer accepted: FLUX 3 Klein now takes 'aspect_ratio' (for example "16:9") and 'resolution' (768sq, 1k, 1.5k, 2k or 4k) instead.”synchronous 400
output_format — “'output_format' is no longer accepted: the output is always a JPEG image.”synchronous 400
bounding_boxes — “'bounding_boxes' is not supported on this API.”synchronous 400
enable_prompt_expansion — “'enable_prompt_expansion' is not supported on this API.”synchronous 400
enable_safety_checker — “'enable_safety_checker' is not supported on this API.”synchronous 400
sync_mode — “'sync_mode' is not supported on this API: requests are asynchronous; poll the status URL for the result.”synchronous 400
images — “'images' is not accepted by text to image. Use the FLUX 3 Klein edit API to edit or combine images.”synchronous 400
width — “'width' is not accepted: choose the shape with 'aspect_ratio' and the size with 'resolution' (768sq, 1k, 1.5k, 2k or 4k).”synchronous 400
height — “'height' is not accepted: choose the shape with 'aspect_ratio' and the size with 'resolution' (768sq, 1k, 1.5k, 2k or 4k).”synchronous 400
steps — “'steps' is not accepted on this API.”synchronous 400
safety_tolerance — “'safety_tolerance' is not accepted on this API.”synchronous 400
image_urls, image_url, image (to edit an image, use the FLUX 3 Klein edit API)synchronous 400
batch_size, num_images, number_of_images, n, count (one image per request)synchronous 400
duration, seconds, num_frames, frames_per_second, music_length_ms (this API makes still images)synchronous 400
parameters, input, content, text (send the fields at the top level of the JSON body)synchronous 400
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
stream (the result is delivered when the job completes)synchronous 400
A request the model refuses, for example under its content policystatus: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing prompt (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'prompt' is required",
  "violations": [
    "'prompt' is required"
  ]
}

A resolution not written exactly as listed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'resolution' must be one of: \"768sq\", \"1k\", \"1.5k\", \"2k\", \"4k\" (got \"2K\")",
  "violations": [
    "'resolution' must be one of: \"768sq\", \"1k\", \"1.5k\", \"2k\", \"4k\" (got \"2K\")"
  ]
}

An image sent to text to image (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'image_urls' must be one of:  (got [\"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg\"]); 'image_urls' is not accepted by text to image. Use the FLUX 3 Klein edit API to edit or combine images.",
  "violations": [
    "'image_urls' must be one of:  (got [\"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg\"])",
    "'image_urls' is not accepted by text to image. Use the FLUX 3 Klein edit API to edit or combine images."
  ]
}

More than one image per request (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'num_images' must be one of:  (got 2); 'num_images' is not supported: each request returns one image. Send one request per image.",
  "violations": [
    "'num_images' must be one of:  (got 2)",
    "'num_images' is not supported: each request returns one image. Send one request per image."
  ]
}

image_size from the earlier version of this API (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'image_size' must be one of:  (got \"1k\"); 'image_size' is no longer accepted: FLUX 3 Klein now takes 'aspect_ratio' (for example \"16:9\") and 'resolution' (768sq, 1k, 1.5k, 2k or 4k) instead.",
  "violations": [
    "'image_size' must be one of:  (got \"1k\")",
    "'image_size' is no longer accepted: FLUX 3 Klein now takes 'aspect_ratio' (for example \"16:9\") and 'resolution' (768sq, 1k, 1.5k, 2k or 4k) instead."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the image from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/flux-3-klein_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "flux-3-klein_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-klein",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.jpg"
    ],
    "media_type": "image/jpeg"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — flux-3-klein for this endpoint.
output.media_urlarray of stringsURL of the image (one JPEG file per request).
output.media_typestringimage/jpeg.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/flux-3-klein/v1/text-to-image.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the image from output.media_url.

How Billing Is Measured

Billing is measured per generated image at the rate for the resolution tier in the request — 1k when you leave it out. Each request generates one image. The aspect ratio, the seed and the prompt do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rate is shown in the pricing panel on this page.

FLUX 3 Klein API Pricing

Billed per image by the resolution parameter (768sq, 1k, 1.5k, 2k, 4k); aspect ratio does not change the price. 1k is the default. One image per request.

ResolutionPrice (USD)
Per image (768sq, 768×768)$0.0095
Per image (1k, ~1 MP, default)$0.0095
Per image (1.5k, ~2 MP)$0.0117
Per image (2k, ~4 MP)$0.0148
Per image (4k, ~16 MP)$0.0358
Image to Image (Image Editing)

FLUX 3 Klein API Documentation

Edit or compose images with FLUX 3 Klein: send one to ten images in image_urls, describe the result in prompt and, optionally, choose the shape with aspect_ratio and the size with resolution. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the image from output.media_url.

POST https://gateway.pixazo.ai/flux-3-klein-edit/v1/edit-image

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Image (Image Editing) - FLUX 3 Klein Edit

Request Code

POST https://gateway.pixazo.ai/flux-3-klein-edit/v1/edit-image
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "The same scene as a soft watercolor painting",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "aspect_ratio": "auto",
  "resolution": "1k"
}
import requests

url = "https://gateway.pixazo.ai/flux-3-klein-edit/v1/edit-image"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "The same scene as a soft watercolor painting",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "aspect_ratio": "auto",
  "resolution": "1k"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/flux-3-klein-edit/v1/edit-image", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "The same scene as a soft watercolor painting",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "aspect_ratio": "auto",
  "resolution": "1k"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/flux-3-klein-edit/v1/edit-image' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "The same scene as a soft watercolor painting", "image_urls": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"], "aspect_ratio": "auto", "resolution": "1k"}'

Output

{
  "request_id": "flux-3-klein-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-klein-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/flux-3-klein-edit/v1/edit-image' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "The same scene as a soft watercolor painting", "image_urls": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"], "aspect_ratio": "auto", "resolution": "1k"}'

Callback Payload (success)

{
  "request_id": "flux-3-klein-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-klein-edit",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.jpg"
    ],
    "media_type": "image/jpeg"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "flux-3-klein-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-3-klein-edit",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—Non-empty textA complete caption of the result, with the edit folded in. Refer to the images by their order: the first image, the second image.
image_urlsYesarray—1–10 publicly reachable https URLs (recommended) or base64 data URIs of images, each at least 256 pixels on each side and at most 16 megapixelsThe images to edit or compose from, in order; the first one is the image being edited.
aspect_ratioNostring"auto"21:9, 2:1, 16:9, 3:2, 7:5, 4:3, 5:4, 1:1, 4:5, 3:4, 5:7, 2:3, 9:16, 1:2, 9:21, autoThe shape of the output image. auto keeps the aspect ratio of the first image. The aspect ratio does not change the amount billed.
resolutionNostring"1k"768sq, 1k, 1.5k, 2k, 4kThe size tier of the output image: 768sq is 768 by 768 pixels at 1:1, and 1k, 1.5k, 2k and 4k are about 1, 2, 4 and 16 megapixels (see Images and Size below). The tier sets the amount billed per image.
seedNointeger—Whole number from 0 to 4294967295The same seed and the same request give the same image again; a new seed gives a new variation.

Good to know

  • Each request returns one image. batch_size, num_images, number_of_images, n and count are rejected — send one request per image.
  • This API makes still images and has no length setting. duration, seconds, num_frames, frames_per_second and music_length_ms are rejected.
  • Send every field at the top level of the JSON body; parameters, input, content and text are rejected.
  • Send one to ten images in image_urls, as publicly reachable https URLs (recommended) or base64 data URIs, and refer to them in prompt by their order: the first image, the second image. Each image must be at least 256 pixels on each side and at most 16 megapixels.
  • Leave aspect_ratio out (auto) to keep the aspect ratio of the first image, and resolution out for 1k.
  • image_url and image are rejected: send the images as a list in image_urls.
  • images is not accepted: send the reference images as image_urls (1 to 10 image URLs).
  • image_size is no longer accepted: FLUX 3 Klein now takes aspect_ratio (for example "16:9") and resolution (768sq, 1k, 1.5k, 2k or 4k) instead.
  • output_format is no longer accepted: the output is always a JPEG image.
  • bounding_boxes, enable_prompt_expansion and enable_safety_checker are not supported on this API.
  • sync_mode is not supported on this API: requests are asynchronous; poll the status URL for the result.
  • Use the JSON types shown: image_urls is a list of strings, prompt, aspect_ratio and resolution are strings, and seed is a whole number. aspect_ratio and resolution take exactly the values listed.
  • Omit a field instead of sending null.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url, webhook_mode and callback_url in the JSON body are rejected.
  • stream is not supported: the result is delivered when the job completes.
  • Options this API does not offer are rejected: width, height, steps and safety_tolerance.

Images and Size

  • Send one to ten images in image_urls and refer to them in prompt by their order. Each image must be at least 256 pixels on each side and at most 16 megapixels.
  • aspect_ratio sets the shape of the output: auto, the default, keeps the aspect ratio of the first image; any other value from the list replaces it.
  • resolution sets the size, whatever the size of the images you send: 768sq is 768 by 768 pixels at 1:1; 1k (the default) is about 1 megapixel, 1.5k about 2, 2k about 4 and 4k about 16 megapixels. The exact width and height vary with the aspect ratio; the area is about the same for every ratio.
  • Only the output image is billed, at the rate for its resolution tier; the images you send are not: see How Billing Is Measured below.

Example: compose two images

{
  "prompt": "The person from the first image standing in the scene of the second image",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "aspect_ratio": "16:9",
  "resolution": "1k"
}

Example: a new shape at a higher resolution

{
  "prompt": "The same photo in a warm evening light",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "aspect_ratio": "3:4",
  "resolution": "2k"
}

Example Request

{
  "prompt": "The same scene as a soft watercolor painting",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "aspect_ratio": "auto",
  "resolution": "1k"
}

Example Response

{
  "request_id": "flux-3-klein-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-klein-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is too long, out of range or not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a stringsynchronous 400
Missing or empty image_urls, image_urls not a list, or more than 10 itemssynchronous 400
aspect_ratio not one of the allowed values (written exactly as listed)synchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
seed not a whole number from 0 to 4294967295 — for example -1, 4294967296 or the string "0"synchronous 400
image_size — “'image_size' is no longer accepted: FLUX 3 Klein now takes 'aspect_ratio' (for example "16:9") and 'resolution' (768sq, 1k, 1.5k, 2k or 4k) instead.”synchronous 400
output_format — “'output_format' is no longer accepted: the output is always a JPEG image.”synchronous 400
bounding_boxes — “'bounding_boxes' is not supported on this API.”synchronous 400
enable_prompt_expansion — “'enable_prompt_expansion' is not supported on this API.”synchronous 400
enable_safety_checker — “'enable_safety_checker' is not supported on this API.”synchronous 400
sync_mode — “'sync_mode' is not supported on this API: requests are asynchronous; poll the status URL for the result.”synchronous 400
images — “'images' is not accepted: send the reference images as 'image_urls' (1 to 10 image URLs).”synchronous 400
width — “'width' is not accepted: choose the shape with 'aspect_ratio' and the size with 'resolution' (768sq, 1k, 1.5k, 2k or 4k).”synchronous 400
height — “'height' is not accepted: choose the shape with 'aspect_ratio' and the size with 'resolution' (768sq, 1k, 1.5k, 2k or 4k).”synchronous 400
steps — “'steps' is not accepted on this API.”synchronous 400
safety_tolerance — “'safety_tolerance' is not accepted on this API.”synchronous 400
image_url, image (send the images as a list in image_urls)synchronous 400
batch_size, num_images, number_of_images, n, count (one image per request)synchronous 400
duration, seconds, num_frames, frames_per_second, music_length_ms (this API makes still images)synchronous 400
parameters, input, content, text (send the fields at the top level of the JSON body)synchronous 400
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
stream (the result is delivered when the job completes)synchronous 400
An image that cannot be read, for example a file that is not an imagestatus: "ERROR"
A request the model refuses, for example under its content policystatus: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing image_urls (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'image_urls' is required",
  "violations": [
    "'image_urls' is required"
  ]
}

More than 10 images (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'image_urls' must have at most 10 items (got 11)",
  "violations": [
    "'image_urls' must have at most 10 items (got 11)"
  ]
}

An image sent as image_url (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'image_urls' is required; 'image_url' must be one of:  (got \"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg\"); 'image_url' is not accepted. Send the images as 'image_urls': a list of 1 to 10 public URLs or base64 data URIs.",
  "violations": [
    "'image_urls' is required",
    "'image_url' must be one of:  (got \"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg\")",
    "'image_url' is not accepted. Send the images as 'image_urls': a list of 1 to 10 public URLs or base64 data URIs."
  ]
}

image_size from the earlier version of this API (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'image_size' must be one of:  (got \"1k\"); 'image_size' is no longer accepted: FLUX 3 Klein now takes 'aspect_ratio' (for example \"16:9\") and 'resolution' (768sq, 1k, 1.5k, 2k or 4k) instead.",
  "violations": [
    "'image_size' must be one of:  (got \"1k\")",
    "'image_size' is no longer accepted: FLUX 3 Klein now takes 'aspect_ratio' (for example \"16:9\") and 'resolution' (768sq, 1k, 1.5k, 2k or 4k) instead."
  ]
}

More than one image per request (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'num_images' must be one of:  (got 2); 'num_images' is not supported: each request returns one image. Send one request per image.",
  "violations": [
    "'num_images' must be one of:  (got 2)",
    "'num_images' is not supported: each request returns one image. Send one request per image."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the image from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/flux-3-klein-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "flux-3-klein-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-klein-edit",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.jpg"
    ],
    "media_type": "image/jpeg"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — flux-3-klein-edit for this endpoint.
output.media_urlarray of stringsURL of the image (one JPEG file per request).
output.media_typestringimage/jpeg.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/flux-3-klein-edit/v1/edit-image.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the image from output.media_url.

How Billing Is Measured

Billing is measured per generated image at the rate for the resolution tier in the request — 1k when you leave it out. Each request generates one image. The images you send in image_urls are not billed. The aspect ratio, the seed and the prompt do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rate is shown in the pricing panel on this page.

FLUX 3 Klein API Pricing

Billed per image by the resolution parameter (768sq, 1k, 1.5k, 2k, 4k); reference images (up to 10) and aspect ratio do not change the price. 1k is the default. One image per request.

ResolutionPrice (USD)
Per image (768sq, 768×768)$0.0095
Per image (1k, ~1 MP, default)$0.0095
Per image (1.5k, ~2 MP)$0.0117
Per image (2k, ~4 MP)$0.0148
Per image (4k, ~16 MP)$0.0358
3. FLUX 3 Image

FLUX 3 Image API Documentation

Generate an image from a text prompt with FLUX 3 Image, Black Forest Labs' newest image model: detailed, well-composed images in native 2K and 4K, with precise layout control and improved text rendering. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the image from output.media_url.

POST https://gateway.pixazo.ai/flux-3-image/v1/text-to-image

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Image - FLUX 3 Image

Request Code

POST https://gateway.pixazo.ai/flux-3-image/v1/text-to-image
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A red fox leaping over a stream in a pine forest, low-angle wildlife photograph",
  "aspect_ratio": "16:9",
  "resolution": "1k"
}
import requests

url = "https://gateway.pixazo.ai/flux-3-image/v1/text-to-image"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A red fox leaping over a stream in a pine forest, low-angle wildlife photograph",
  "aspect_ratio": "16:9",
  "resolution": "1k"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/flux-3-image/v1/text-to-image", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "A red fox leaping over a stream in a pine forest, low-angle wildlife photograph",
  "aspect_ratio": "16:9",
  "resolution": "1k"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/flux-3-image/v1/text-to-image' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A red fox leaping over a stream in a pine forest, low-angle wildlife photograph", "aspect_ratio": "16:9", "resolution": "1k"}'

Output

{
  "request_id": "flux-3-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/flux-3-image/v1/text-to-image' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "A red fox leaping over a stream in a pine forest, low-angle wildlife photograph", "aspect_ratio": "16:9", "resolution": "1k"}'

Callback Payload (success)

{
  "request_id": "flux-3-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-image",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.jpg"
    ],
    "media_type": "image/jpeg"
  },
  "created_at": "2026-10-03T10:04:54.387Z",
  "completed_at": "2026-10-03 10:05:21"
}

Failure callback shape

{
  "request_id": "flux-3-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-3-image",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—Non-empty textWhat to generate. Text you want on the image can be written exactly as it should appear — for example a sign reading "OPEN".
aspect_ratioNostring"auto"auto, 21:9, 2:1, 16:9, 3:2, 7:5, 4:3, 5:4, 1:1, 4:5, 3:4, 5:7, 2:3, 9:16, 1:2Shape of the output. auto leaves the shape to the model; set a ratio when the shape matters.
resolutionNostring"1k"768sq, 1k, 2k, 4kOutput resolution tier — see Resolution Tiers below. Higher tiers take longer; 4k can take several minutes. The tier sets the amount billed per image.
enable_prompt_expansionNobooleanfalsetrue, falseRewrites a short prompt into a fuller description while keeping your intent.
safety_toleranceNointeger20–4Content-safety strictness: 0 is the strictest, 4 the most permissive.
output_formatNostring"jpeg"jpeg, pngFile format of the generated image.

Good to know

  • To edit an image or combine several, use the FLUX 3 Image Edit endpoint; image_urls and image_url are rejected here.
  • Each request returns one image. num_images may be left out or set to 1; batch_size, n, count and number_of_images are rejected — send one request per image.
  • sync_mode is not supported — a request with sync_mode: true is rejected. The finished image is always delivered as a URL through the status endpoint.
  • Values are case-sensitive: use 1k, 2k, 4k — not 1K.
  • FLUX 3 Image takes no seed: repeating a request gives a new variation.
  • Omit optional fields you do not use — do not send them as null.

Resolution Tiers

resolution sets the approximate pixel count of the output and aspect_ratio sets its shape. Delivered dimensions can differ slightly from the nominal size, because they are rounded to multiples of 16. Higher tiers take longer — 4k can take several minutes. The tier sets the amount billed per image; the aspect ratio does not.

TierApproximate output
768sq768 × 768 at 1:1 (about 0.6 MP)
1kAbout 1 MP — 1024 × 1024 at 1:1 (the default)
2kAbout 4 MP — for example about 2048 × 2048 at 1:1
4kAbout 16 MP — for example about 4096 × 4096 at 1:1

Aspect ratios

auto, 21:9, 2:1, 16:9, 3:2, 7:5, 4:3, 5:4, 1:1, 4:5, 3:4, 5:7, 2:3, 9:16, 1:2. auto (the default) leaves the shape to the model; set a ratio when the shape matters.

Example Request

{
  "prompt": "A red fox leaping over a stream in a pine forest, low-angle wildlife photograph",
  "aspect_ratio": "16:9",
  "resolution": "1k"
}

Example Response

{
  "request_id": "flux-3-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid parameters — a required field is missing, or a value has the wrong type, is out of range or is not one of the allowed values. Rejected before any hold is placed on your balance.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Most parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need an image to be fetched or the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what to fix. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty promptsynchronous 400
resolution, aspect_ratio, output_format or version not one of the allowed values (values are case-sensitive; version accepts only latest)synchronous 400
safety_tolerance not an integer from 0 to 4, or enable_prompt_expansion not true / falsesynchronous 400
num_images other than 1, or any of batch_size, n, count, number_of_imagessynchronous 400
sync_mode set to truesynchronous 400
image_urls or image_url (send edits to the FLUX 3 Image Edit endpoint)synchronous 400
webhook_url, webhook_mode or wait_seconds in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers and the ?wait_seconds= query parameter)synchronous 400
A prompt refused by the provider's content policystatus: "ERROR"

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the image from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/flux-3-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "flux-3-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-image",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.jpg"
    ],
    "media_type": "image/jpeg"
  },
  "created_at": "2026-10-03T10:04:54.387Z",
  "completed_at": "2026-10-03 10:05:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — flux-3-image for this endpoint.
output.media_urlarray of stringsURL of the generated image (one per request) — JPEG by default, PNG when output_format is png.
output.media_typestringimage/jpeg, or image/png when output_format is png.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/flux-3-image/v1/text-to-image.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 5–10 seconds, or use a Webhook instead.
  4. When status is COMPLETED, download the image from output.media_url.

How billing is measured

Billing is measured per generated image at the rate for the resolution tier in the request — 1k when you leave it out. Each request generates one image. The aspect ratio, output format and prompt expansion do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails.

The current rate is shown in the pricing panel on this page.

FLUX 3 Image API Pricing

Billed per image by the resolution parameter (768sq, 1k, 2k, 4k); aspect ratio does not change the price. 1k is the default. One image per request.

ResolutionPrice (USD)
Per image (768sq, 768×768)$0.041
Per image (1k, ~1 MP, default)$0.048
Per image (2k, ~4 MP)$0.10
Per image (4k, ~16 MP)$0.607
Image to Image (Image Editing)

FLUX 3 Image API Documentation

Edit an image with a text prompt using FLUX 3 Image: make precise local edits without changing the rest of the image, or combine up to 10 reference images into one well-composed result. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the image from output.media_url.

POST https://gateway.pixazo.ai/flux-3-image-edit/v1/edit-image

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Edit - FLUX 3 Image

Request Code

POST https://gateway.pixazo.ai/flux-3-image-edit/v1/edit-image
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "Replace the background of image 1 with a sunlit beach at golden hour and keep the subject unchanged",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "resolution": "1k"
}
import requests

url = "https://gateway.pixazo.ai/flux-3-image-edit/v1/edit-image"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "Replace the background of image 1 with a sunlit beach at golden hour and keep the subject unchanged",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "resolution": "1k"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/flux-3-image-edit/v1/edit-image", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "Replace the background of image 1 with a sunlit beach at golden hour and keep the subject unchanged",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "resolution": "1k"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/flux-3-image-edit/v1/edit-image' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "Replace the background of image 1 with a sunlit beach at golden hour and keep the subject unchanged", "image_urls": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"], "resolution": "1k"}'

Output

{
  "request_id": "flux-3-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/flux-3-image-edit/v1/edit-image' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "Replace the background of image 1 with a sunlit beach at golden hour and keep the subject unchanged", "image_urls": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"], "resolution": "1k"}'

Callback Payload (success)

{
  "request_id": "flux-3-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-image-edit",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.jpg"
    ],
    "media_type": "image/jpeg"
  },
  "created_at": "2026-10-03T10:04:54.387Z",
  "completed_at": "2026-10-03 10:05:21"
}

Failure callback shape

{
  "request_id": "flux-3-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-3-image-edit",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—Non-empty textWhat to change, or how to combine the images. Refer to the inputs by position — image 1, image 2 and so on.
image_urlsYesarray of strings—1–10 publicly reachable https URLs or data URIs; each image at least 256 px per side and at most 4 MPThe images to edit or combine, in order: image 1 to image 10. Image 1 sets the output shape when aspect_ratio is auto.
aspect_ratioNostring"auto"auto, 21:9, 2:1, 16:9, 3:2, 7:5, 4:3, 5:4, 1:1, 4:5, 3:4, 5:7, 2:3, 9:16, 1:2Shape of the output. auto matches image 1.
resolutionNostring"1k"768sq, 1k, 2k, 4kOutput resolution tier — see Resolution Tiers below. Higher tiers take longer; 4k can take several minutes. The tier sets the amount billed per image.
enable_prompt_expansionNobooleanfalsetrue, falseRewrites a short prompt into a fuller description while keeping your intent and the role of each image.
safety_toleranceNointeger20–4Content-safety strictness: 0 is the strictest, 4 the most permissive.
output_formatNostring"jpeg"jpeg, pngFile format of the generated image.

Good to know

  • Send the images as image_urls, an array, even for a single image; image_url is rejected.
  • Image URLs must be https and publicly reachable, or data URIs.
  • Each request returns one image. num_images may be left out or set to 1; batch_size, n, count and number_of_images are rejected — send one request per image.
  • sync_mode is not supported — a request with sync_mode: true is rejected. The finished image is always delivered as a URL through the status endpoint.
  • Values are case-sensitive: use 1k, 2k, 4k — not 1K.
  • FLUX 3 Image takes no seed: repeating a request gives a new variation.
  • Omit optional fields you do not use — do not send them as null.

Resolution Tiers

resolution sets the approximate pixel count of the output and aspect_ratio sets its shape. Delivered dimensions can differ slightly from the nominal size, because they are rounded to multiples of 16. Higher tiers take longer — 4k can take several minutes. The tier sets the amount billed per image; the aspect ratio does not.

TierApproximate output
768sq768 × 768 at 1:1 (about 0.6 MP)
1kAbout 1 MP — 1024 × 1024 at 1:1 (the default)
2kAbout 4 MP — for example about 2048 × 2048 at 1:1
4kAbout 16 MP — for example about 4096 × 4096 at 1:1

Aspect ratios

auto, 21:9, 2:1, 16:9, 3:2, 7:5, 4:3, 5:4, 1:1, 4:5, 3:4, 5:7, 2:3, 9:16, 1:2. auto (the default) matches the shape of image 1.

Reference Images

  • Send 1 to 10 images in image_urls. Order matters: the first is image 1, the second image 2, and so on — refer to them that way in the prompt.
  • Precise local edits: send one image and describe only the change; the rest of the image is kept.
  • Combining: send several images and say what to take from each — for example the jacket from image 2 on the person in image 1.
  • With aspect_ratio: "auto" (the default) the output takes its shape from image 1.
  • Each image must be at least 256 pixels on each side and at most 4 megapixels, given as a publicly reachable https URL or a data URI.
  • Reference images are not billed separately: the number of images you send does not change the amount.

Example: combine two images

{
  "prompt": "Put the jacket from image 2 on the person in image 1, keeping the pose and background of image 1",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
    "https://your-cdn.example.com/jacket.jpg"
  ],
  "resolution": "1k"
}

Example Request

{
  "prompt": "Replace the background of image 1 with a sunlit beach at golden hour and keep the subject unchanged",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "resolution": "1k"
}

Example Response

{
  "request_id": "flux-3-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid parameters — a required field is missing, or a value has the wrong type, is out of range or is not one of the allowed values. Rejected before any hold is placed on your balance.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Most parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need an image to be fetched or the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what to fix. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, or missing image_urls (an empty array counts as missing)synchronous 400
More than 10 image_urls, or image_urls sent as a string instead of an arraysynchronous 400
resolution, aspect_ratio, output_format or version not one of the allowed values (values are case-sensitive; version accepts only latest)synchronous 400
safety_tolerance not an integer from 0 to 4, or enable_prompt_expansion not true / falsesynchronous 400
num_images other than 1, or any of batch_size, n, count, number_of_imagessynchronous 400
sync_mode set to truesynchronous 400
image_url (singular): send the images as image_urlssynchronous 400
webhook_url, webhook_mode or wait_seconds in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers and the ?wait_seconds= query parameter)synchronous 400
An image URL that is not reachable, or a file that is not a supported imagestatus: "ERROR"
An image under 256 pixels on a side, or over the provider's size limitstatus: "ERROR"
A prompt or image refused by the provider's content policystatus: "ERROR"

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the image from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/flux-3-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "flux-3-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-image-edit",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.jpg"
    ],
    "media_type": "image/jpeg"
  },
  "created_at": "2026-10-03T10:04:54.387Z",
  "completed_at": "2026-10-03 10:05:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — flux-3-image-edit for this endpoint.
output.media_urlarray of stringsURL of the generated image (one per request) — JPEG by default, PNG when output_format is png.
output.media_typestringimage/jpeg, or image/png when output_format is png.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/flux-3-image-edit/v1/edit-image.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 5–10 seconds, or use a Webhook instead.
  4. When status is COMPLETED, download the image from output.media_url.

How billing is measured

Billing is measured per generated image at the rate for the resolution tier in the request — 1k when you leave it out. Each request generates one image. The aspect ratio, output format, prompt expansion and the number of reference images do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails.

The current rate is shown in the pricing panel on this page.

FLUX 3 Image API Pricing

Billed per image by the resolution parameter (768sq, 1k, 2k, 4k); reference images (up to 10) and aspect ratio do not change the price. 1k is the default. One image per request.

ResolutionPrice (USD)
Per image (768sq, 768×768)$0.041
Per image (1k, ~1 MP, default)$0.048
Per image (2k, ~4 MP)$0.10
Per image (4k, ~16 MP)$0.607
4. Flux Video Upscale

Flux Video Upscale API Documentation

POST https://gateway.pixazo.ai/flux-video-upscale/v1/video-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Flux Video Upscale generate request

Request Code

POST https://gateway.pixazo.ai/flux-video-upscale/v1/video-to-video
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "video_url": "https://v3b.fal.media/files/b/0a93a27d/-iFpecUCsSdwXVMevsZa3_output_5s_448x256.mp4",
  "upscale_factor": 2,
  "creativity": 1,
  "safety_tolerance": 2
}
import requests

url = "https://gateway.pixazo.ai/flux-video-upscale/v1/video-to-video"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "video_url": "https://v3b.fal.media/files/b/0a93a27d/-iFpecUCsSdwXVMevsZa3_output_5s_448x256.mp4",
    "upscale_factor": 2,
    "creativity": 1,
    "safety_tolerance": 2
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/flux-video-upscale/v1/video-to-video";
const headers = {
  "Content-Type": "application/json",
  "Cache-Control": "no-cache",
  "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
  "video_url": "https://v3b.fal.media/files/b/0a93a27d/-iFpecUCsSdwXVMevsZa3_output_5s_448x256.mp4",
  "upscale_factor": 2,
  "creativity": 1,
  "safety_tolerance": 2
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/flux-video-upscale/v1/video-to-video" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "video_url": "https://v3b.fal.media/files/b/0a93a27d/-iFpecUCsSdwXVMevsZa3_output_5s_448x256.mp4",
    "upscale_factor": 2,
    "creativity": 1,
    "safety_tolerance": 2
  }'

Output

{
  "request_id": "flux-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your generate request to receive a POST callback instead of polling.

X-Webhook-URL: https://your-server.com/webhook/callback

Request Parameters - Flux Video Upscale generate request

Parameter Required Type Default Allowed values / range Description
video_urlYesstring—non-empty; ≤ 50 MB, ≤20 secondsPublicly accessible URL of the input MP4 video. Must be ≤20 seconds and ≤50 MB.
upscale_factorNonumber21.5 – 3Output scaling factor. Any value in the range is accepted, including fractional values such as 1.5 or 2.5. The source aspect ratio is preserved. This also sets your price: the per-second rate is chosen from the OUTPUT height (your source height × this factor), and anything at or below 1080 is charged at the 1080p rate. See the pricing table below.
creativityNointeger10, 1Use 0 for a source-faithful upscale or 1 for creative detail enhancement. Send it as a number, not a quoted string.
promptNostring—≤ 5000 charactersOptional text description used to guide creative detail enhancement (the creativity: 1 mode).
safety_toleranceNointeger20 – 4Moderation strictness. Lower values are stricter: 0 is the strictest and 4 the most permissive.

Example Request

{
  "video_url": "https://v3b.fal.media/files/b/0a93a27d/-iFpecUCsSdwXVMevsZa3_output_5s_448x256.mp4",
  "upscale_factor": 2,
  "creativity": 1,
  "safety_tolerance": 2
}

Response

{
  "request_id": "flux-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_API_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-video-upscale' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "flux-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-video-upscale",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "flux-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-video-upscale",
  "error": null,
  "output": { "media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-video-upscale_019dxxxx/output.mp4"], "media_type": "video/mp4" },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstringWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Flux Video Upscale API Pricing

ResolutionPrice (USD)
Creative, up to 1080p / per second (default)$0.20
Creative, up to 2K / per second$0.35
Creative, 4K / per second$0.79
Precise, up to 1080p / per second$0.14
Precise, up to 2K / per second$0.25
Precise, 4K / per second$0.55
5. FLUX 3 Video

FLUX 3 Video API Documentation

Generate video with synchronised audio from a text prompt alone, up to 20 seconds at HD or FHD. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video.

POST https://gateway.pixazo.ai/flux-3-video/v1/text-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Video - FLUX 3 Video

Request Code

POST https://gateway.pixazo.ai/flux-3-video/v1/text-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A cozy ramen shop on a rainy Tokyo night, steam rising from the broth. Rain patter and quiet kitchen sounds.",
  "resolution": "hd",
  "duration": 5
}
import requests

url = "https://gateway.pixazo.ai/flux-3-video/v1/text-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A cozy ramen shop on a rainy Tokyo night, steam rising from the broth. Rain patter and quiet kitchen sounds.",
  "resolution": "hd",
  "duration": 5
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/flux-3-video/v1/text-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "A cozy ramen shop on a rainy Tokyo night, steam rising from the broth. Rain patter and quiet kitchen sounds.",
  "resolution": "hd",
  "duration": 5
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/flux-3-video/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A cozy ramen shop on a rainy Tokyo night, steam rising from the broth. Rain patter and quiet kitchen sounds.", "resolution": "hd", "duration": 5}'

Output

{
  "request_id": "flux-3-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request. Video renders take minutes rather than seconds, so a webhook is usually the better fit here.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/flux-3-video/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "A cozy ramen shop on a rainy Tokyo night, steam rising from the broth. Rain patter and quiet kitchen sounds.", "resolution": "hd", "duration": 5}'

Callback Payload (success)

{
  "request_id": "flux-3-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-video-text-to-video",
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-08-05T11:20:04.102Z",
  "completed_at": "2026-08-05T11:23:58.870Z"
}

Failure callback shape

{
  "request_id": "flux-3-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-3-video-text-to-video",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on each status change.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—1 character or moreFree-form description of the video. When generate_audio is on, the soundtrack is derived from this prompt too — describing the sound (“rain patter, quiet kitchen”) shapes what you get.
aspect_ratioNostringautoauto, 21:9, 2:1, 16:9, 4:3, 1:1, 3:4, 9:16Output aspect ratio. auto picks one from the prompt and any reference media.
durationNointeger or stringautoa whole number 5–20, or autoLength of the clip in seconds. auto fits the content. Duration does not change the price.
resolutionNostringhdhd, fhdfhd runs the result through the video upsampler and costs more — see Pricing.
generate_audioNobooleantruetrue, falseGenerate a synchronised soundtrack alongside the video.
safety_toleranceNointeger20–4Moderation tolerance, 0 (strictest) to 4. Sexual content is capped at 3 and hate content at 2 regardless of what you request; any request carrying reference media is capped at 2.

Notes

Nothing but a prompt is required. Add aspect_ratio and duration when you need a specific shape or length.

Example Request

{
  "prompt": "A cozy ramen shop on a rainy Tokyo night, steam rising from the broth. Rain patter and quiet kitchen sounds.",
  "resolution": "hd",
  "duration": 5
}

Example Response

{
  "request_id": "flux-3-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — a missing or out-of-range parameter. The message names the field.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
429Too many requests.
500Internal server error.

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED (or ERROR), then download output.media_url. A render typically takes a few minutes.

curl 'https://gateway.pixazo.ai/v2/requests/status/flux-3-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "flux-3-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-video-text-to-video",
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-08-05T11:20:04.102Z",
  "completed_at": "2026-08-05T11:23:58.870Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
output.media_urlarrayURL of the generated mp4 (24fps, with audio unless disabled).
output.media_typestringMIME type of the video — video/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Pricing

Billed as a flat price per render, set by the resolution you request. Duration does not change the price — a 20-second clip costs the same as a 5-second one.

RequestCost per video
Text to Video at hd$0.17
Text to Video at fhd$0.29

Failed requests are not billed.

FLUX 3 Video API Pricing

ResolutionPrice (USD)
hd$0.17
fhd$0.29
Keyframes to Video

FLUX 3 Video API Documentation

Animate one or more still images into video with synchronised audio. Supply up to ten keyframes, optionally pinned to a second on the timeline. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video.

POST https://gateway.pixazo.ai/flux-3-video/v1/keyframes-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Keyframes to Video - FLUX 3 Video

Request Code

POST https://gateway.pixazo.ai/flux-3-video/v1/keyframes-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A cozy ramen shop on a rainy Tokyo night, steam rising from the broth. Rain patter and quiet kitchen sounds.",
  "keyframes": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
  "resolution": "hd",
  "duration": 5
}
import requests

url = "https://gateway.pixazo.ai/flux-3-video/v1/keyframes-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A cozy ramen shop on a rainy Tokyo night, steam rising from the broth. Rain patter and quiet kitchen sounds.",
  "keyframes": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
  "resolution": "hd",
  "duration": 5
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/flux-3-video/v1/keyframes-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "A cozy ramen shop on a rainy Tokyo night, steam rising from the broth. Rain patter and quiet kitchen sounds.",
  "keyframes": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
  "resolution": "hd",
  "duration": 5
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/flux-3-video/v1/keyframes-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A cozy ramen shop on a rainy Tokyo night, steam rising from the broth. Rain patter and quiet kitchen sounds.", "keyframes": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png", "resolution": "hd", "duration": 5}'

Output

{
  "request_id": "flux-3-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request. Video renders take minutes rather than seconds, so a webhook is usually the better fit here.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/flux-3-video/v1/keyframes-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "A cozy ramen shop on a rainy Tokyo night, steam rising from the broth. Rain patter and quiet kitchen sounds.", "keyframes": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png", "resolution": "hd", "duration": 5}'

Callback Payload (success)

{
  "request_id": "flux-3-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-video-image-to-video",
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-08-05T11:20:04.102Z",
  "completed_at": "2026-08-05T11:23:58.870Z"
}

Failure callback shape

{
  "request_id": "flux-3-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-3-video-image-to-video",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on each status change.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—1 character or moreFree-form description of the video. When generate_audio is on, the soundtrack is derived from this prompt too — describing the sound (“rain patter, quiet kitchen”) shapes what you get.
keyframesYesstring or array—1–10 images, optionally timedThe image(s) to animate, each a public https url or a base64 data URI. Accepts a single image; a single [seconds, image] pair; up to 10 untimed images (one starts the video, two start and end it, more are spread evenly); or up to 10 [seconds, image] pairs. Three or more untimed images require an explicit whole-number duration.
aspect_ratioNostringautoauto, 21:9, 2:1, 16:9, 4:3, 1:1, 3:4, 9:16Output aspect ratio. auto picks one from the prompt and any reference media.
durationNointeger or stringautoa whole number 5–20, or autoLength of the clip in seconds. auto fits the content. Duration does not change the price.
resolutionNostringhdhd, fhdfhd runs the result through the video upsampler and costs more — see Pricing.
generate_audioNobooleantruetrue, falseGenerate a synchronised soundtrack alongside the video.
safety_toleranceNointeger20–4Moderation tolerance, 0 (strictest) to 4. Sexual content is capped at 3 and hate content at 2 regardless of what you request; any request carrying reference media is capped at 2.

Notes

Keyframes may be plain images or [seconds, image] pairs — but not a mix of the two in one request.

Using more than one keyframe

keyframes accepts four shapes. Pick whichever fits — all four are equivalent to the model, they differ only in how much control you take over timing.

1. A single image — the opening frame

The video starts here and the prompt drives the rest.

{
  "prompt": "gentle push in on the scene",
  "keyframes": "https://your-server.com/frame-1.jpg",
  "resolution": "hd",
  "duration": 5
}

2. Two images — start and end

With exactly two untimed images, the first opens the video and the second closes it.

{
  "prompt": "morph smoothly from the first scene to the second",
  "keyframes": [
    "https://your-server.com/frame-1.jpg",
    "https://your-server.com/frame-2.jpg"
  ],
  "resolution": "hd",
  "duration": 5
}

3. Several untimed images — spread evenly

The first opens the video, the last closes it, and the rest fall evenly in between. With three or more untimed images you must also send an explicit whole-number duration — there is no last-pair second for auto to derive the length from.

{
  "prompt": "drift across the scenes",
  "keyframes": [
    "https://your-server.com/frame-1.jpg",
    "https://your-server.com/frame-2.jpg",
    "https://your-server.com/frame-3.jpg",
    "https://your-server.com/frame-4.jpg"
  ],
  "resolution": "hd",
  "duration": 10
}

4. Timed [seconds, image] pairs — exact placement

Pin each image to a second on the timeline. With duration: "auto" the video runs to the last pair's second, rounded up.

{
  "prompt": "drift between the two scenes",
  "keyframes": [
    [
      0,
      "https://your-server.com/frame-1.jpg"
    ],
    [
      4,
      "https://your-server.com/frame-2.jpg"
    ]
  ],
  "resolution": "hd",
  "duration": 5
}

Limits

  • Ten keyframes maximum. An eleventh is rejected — that is the model's ceiling, not a gateway restriction.
  • Do not mix the two styles. A list must be all plain images or all [seconds, image] pairs, never both in one request.
  • Each image is a public https url or a data:image/...;base64 URI. We fetch urls server-side, so they must be reachable from the internet — a signed url is fine, a private one is not.

Example Request

{
  "prompt": "A cozy ramen shop on a rainy Tokyo night, steam rising from the broth. Rain patter and quiet kitchen sounds.",
  "keyframes": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
  "resolution": "hd",
  "duration": 5
}

Example Response

{
  "request_id": "flux-3-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — a missing or out-of-range parameter. The message names the field.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
429Too many requests.
500Internal server error.

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED (or ERROR), then download output.media_url. A render typically takes a few minutes.

curl 'https://gateway.pixazo.ai/v2/requests/status/flux-3-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "flux-3-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-video-image-to-video",
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-08-05T11:20:04.102Z",
  "completed_at": "2026-08-05T11:23:58.870Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
output.media_urlarrayURL of the generated mp4 (24fps, with audio unless disabled).
output.media_typestringMIME type of the video — video/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Pricing

Billed as a flat price per render, set by the resolution you request. Duration does not change the price — a 20-second clip costs the same as a 5-second one.

RequestCost per video
Keyframes to Video at hd$0.17
Keyframes to Video at fhd$0.29

Failed requests are not billed.

FLUX 3 Video API Pricing

ResolutionPrice (USD)
hd$0.17
fhd$0.29
Video to Video

FLUX 3 Video API Documentation

Continue an existing clip. The model reads the final frames of the video you supply and carries the motion onward, with synchronised audio. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video.

POST https://gateway.pixazo.ai/flux-3-video/v1/video-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Video to Video - FLUX 3 Video

Request Code

POST https://gateway.pixazo.ai/flux-3-video/v1/video-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "the camera pulls back to reveal the whole street",
  "start_video": "https://your-server.com/clip.mp4",
  "resolution": "hd",
  "duration": 5
}
import requests

url = "https://gateway.pixazo.ai/flux-3-video/v1/video-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "the camera pulls back to reveal the whole street",
  "start_video": "https://your-server.com/clip.mp4",
  "resolution": "hd",
  "duration": 5
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/flux-3-video/v1/video-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "the camera pulls back to reveal the whole street",
  "start_video": "https://your-server.com/clip.mp4",
  "resolution": "hd",
  "duration": 5
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/flux-3-video/v1/video-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "the camera pulls back to reveal the whole street", "start_video": "https://your-server.com/clip.mp4", "resolution": "hd", "duration": 5}'

Output

{
  "request_id": "flux-3-video-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-video-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request. Video renders take minutes rather than seconds, so a webhook is usually the better fit here.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/flux-3-video/v1/video-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "the camera pulls back to reveal the whole street", "start_video": "https://your-server.com/clip.mp4", "resolution": "hd", "duration": 5}'

Callback Payload (success)

{
  "request_id": "flux-3-video-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-video-video-to-video",
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-08-05T11:20:04.102Z",
  "completed_at": "2026-08-05T11:23:58.870Z"
}

Failure callback shape

{
  "request_id": "flux-3-video-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-3-video-video-to-video",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on each status change.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—1 character or moreFree-form description of the video. When generate_audio is on, the soundtrack is derived from this prompt too — describing the sound (“rain patter, quiet kitchen”) shapes what you get.
start_videoYesstring—https url or base64 mp4, ≤50MB, ≤15sThe video to continue. The new clip carries on from its final frames.
aspect_ratioNostringautoauto, 21:9, 2:1, 16:9, 4:3, 1:1, 3:4, 9:16Output aspect ratio. auto picks one from the prompt and any reference media.
durationNointeger or stringautoa whole number 5–20, or autoLength of the clip in seconds. auto fits the content. Duration does not change the price.
resolutionNostringhdhd, fhdfhd runs the result through the video upsampler and costs more — see Pricing.
generate_audioNobooleantruetrue, falseGenerate a synchronised soundtrack alongside the video.
safety_toleranceNointeger20–4Moderation tolerance, 0 (strictest) to 4. Sexual content is capped at 3 and hate content at 2 regardless of what you request; any request carrying reference media is capped at 2.

Notes

The source clip must be 15 seconds or less and 50MB or less. Continuation is priced higher than a fresh render — see Pricing.

Example Request

{
  "prompt": "the camera pulls back to reveal the whole street",
  "start_video": "https://your-server.com/clip.mp4",
  "resolution": "hd",
  "duration": 5
}

Example Response

{
  "request_id": "flux-3-video-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-3-video-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — a missing or out-of-range parameter. The message names the field.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
429Too many requests.
500Internal server error.

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED (or ERROR), then download output.media_url. A render typically takes a few minutes.

curl 'https://gateway.pixazo.ai/v2/requests/status/flux-3-video-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "flux-3-video-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-3-video-video-to-video",
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-08-05T11:20:04.102Z",
  "completed_at": "2026-08-05T11:23:58.870Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
output.media_urlarrayURL of the generated mp4 (24fps, with audio unless disabled).
output.media_typestringMIME type of the video — video/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Pricing

Billed as a flat price per render, set by the resolution you request. Duration does not change the price — a 20-second clip costs the same as a 5-second one.

RequestCost per video
Video to Video at hd$0.41
Video to Video at fhd$0.53

Failed requests are not billed.

FLUX 3 Video API Pricing

ResolutionPrice (USD)
hd$0.41
fhd$0.53
6. FLUX 2 Max

FLUX 2 Max API Documentation

https://gateway.pixazo.ai/flux-2-max/v1/flux-2-max-request

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

FLUX 2 Max generate request

Request Code

POST https://gateway.pixazo.ai/flux-2-max/v1/flux-2-max-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "prompt": "An intricate fantasy castle on a floating island at dusk, volumetric lighting, photoreal",
  "image_size": "landscape_4_3",
  "safety_tolerance": "2",
  "enable_safety_checker": true,
  "output_format": "jpeg",
  "sync_mode": false
}
import requests

url = "https://gateway.pixazo.ai/flux-2-max/v1/flux-2-max-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "An intricate fantasy castle on a floating island at dusk, volumetric lighting, photoreal",
    "image_size": "landscape_4_3",
    "safety_tolerance": "2",
    "enable_safety_checker": true,
    "output_format": "jpeg",
    "sync_mode": false
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/flux-2-max/v1/flux-2-max-request";
const headers = {
  "Content-Type": "application/json",
  "Cache-Control": "no-cache",
  "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
  "prompt": "An intricate fantasy castle on a floating island at dusk, volumetric lighting, photoreal",
  "image_size": "landscape_4_3",
  "safety_tolerance": "2",
  "enable_safety_checker": true,
  "output_format": "jpeg",
  "sync_mode": false
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/flux-2-max/v1/flux-2-max-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
        "prompt": "An intricate fantasy castle on a floating island at dusk, volumetric lighting, photoreal",
        "image_size": "landscape_4_3",
        "safety_tolerance": "2",
        "enable_safety_checker": true,
        "output_format": "jpeg",
        "sync_mode": false
    }'

Output

{
  "request_id": "flux-2-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-2-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your generate request to receive a POST callback instead of polling.

X-Webhook-URL: https://your-server.com/webhook/callback

Request Parameters - FLUX 2 Max generate request

Parameter Required Type Default Allowed values / range Description
promptYesstring——Text description for image generation. Must be detailed for optimal results.
image_sizeNostring or objectlandscape_4_3square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9; or {"width": integer, "height": integer}Preset aspect ratio or custom dimensions. Allowed presets: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9. Custom object format: {"width": integer, "height": integer}.
output_formatNostringjpegjpeg, pngOutput image format. Allowed: jpeg, png.
safety_toleranceNostring21, 2, 3, 4, 5NSFW filtering sensitivity level. Higher values are more permissive.
enable_safety_checkerNobooleantrue—Turns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it.
seedNointeger——Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time.
sync_modeNobooleanfalse—If on, the finished file is sent back directly instead of as a download link. Handy for quick tests; for normal use, leave it off to get a download link.

Example Request

{
  "prompt": "An intricate fantasy castle on a floating island at dusk, volumetric lighting, photoreal",
  "image_size": "landscape_4_3",
  "safety_tolerance": "2",
  "enable_safety_checker": true,
  "output_format": "jpeg",
  "sync_mode": false
}

Response

{
  "request_id": "flux-2-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-2-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_API_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-2-max' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "flux-2-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-2-max",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-2-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "flux-2-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-2-max",
  "error": null,
  "output": {
    "media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-2-max_019dxxxx/output.jpg"],
    "media_type": "image/jpeg"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstringWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

FLUX 2 Max API Pricing

UsagePrice (USD)
First megapixel$0.07
Each additional megapixel$0.03
Image to Image (Image Editing)

FLUX 2 Max API Documentation

https://gateway.pixazo.ai/flux-2-max-edit/v1/flux-2-max-edit-request

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

FLUX 2 Max Edit generate request

Request Code

POST https://gateway.pixazo.ai/flux-2-max-edit/v1/flux-2-max-edit-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "prompt": "Restyle the scene with warm golden-hour lighting and soft bokeh",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg"
  ],
  "image_size": "auto",
  "safety_tolerance": "2",
  "enable_safety_checker": true,
  "output_format": "jpeg",
  "sync_mode": false
}
import requests

url = "https://gateway.pixazo.ai/flux-2-max-edit/v1/flux-2-max-edit-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "Restyle the scene with warm golden-hour lighting and soft bokeh",
    "image_urls": [
        "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg"
    ],
    "image_size": "auto",
    "safety_tolerance": "2",
    "enable_safety_checker": true,
    "output_format": "jpeg",
    "sync_mode": false
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
const url = "https://gateway.pixazo.ai/flux-2-max-edit/v1/flux-2-max-edit-request";
const headers = {
  "Content-Type": "application/json",
  "Cache-Control": "no-cache",
  "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
  "prompt": "Restyle the scene with warm golden-hour lighting and soft bokeh",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg"
  ],
  "image_size": "auto",
  "safety_tolerance": "2",
  "enable_safety_checker": true,
  "output_format": "jpeg",
  "sync_mode": false
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/flux-2-max-edit/v1/flux-2-max-edit-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "prompt": "Restyle the scene with warm golden-hour lighting and soft bokeh",
    "image_urls": [
        "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg"
    ],
    "image_size": "auto",
    "safety_tolerance": "2",
    "enable_safety_checker": true,
    "output_format": "jpeg",
    "sync_mode": false
}'

Output

{
  "request_id": "flux-2-max-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-2-max-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your generate request to receive a POST callback instead of polling.

X-Webhook-URL: https://your-server.com/webhook/callback

Request Parameters - FLUX 2 Max Edit generate request

Parameter Required Type Default Allowed values / range Description
promptYesstring——Text instruction describing the desired edit. Must be detailed and specific for best results.
image_urlsYesstring[]——Array of publicly accessible URLs of input images to edit. All images will be edited according to the same prompt.
image_sizeNostring or object"auto""auto", "square_hd", "square", "portrait_4_3", "portrait_16_9", "landscape_4_3", "landscape_16_9", or { "width": integer, "height": integer }Preset aspect ratio or custom dimensions. Allowed presets: `auto`, `square_hd`, `square`, `portrait_4_3`, `portrait_16_9`, `landscape_4_3`, `landscape_16_9`. Custom object format: `{ "width": integer, "height": integer }`.
output_formatNostring"jpeg""jpeg", "png"Output image format. Allowed: `jpeg`, `png`.
safety_toleranceNostring"2""1", "2", "3", "4", "5"Sensitivity level for NSFW filtering. Higher values are more permissive. Allowed: `1`, `2`, `3`, `4`, `5`.
enable_safety_checkerNobooleantrue—Enable or disable the NSFW content filter. Set to `false` to bypass filtering.
seedNointeger——Optional random seed for reproducible results. Use the same seed with identical inputs to get identical outputs.
sync_modeNobooleanfalse—If `true`, returns the edited image(s) as base64-encoded data URIs inline in the response. If `false`, returns a `request_id` for async polling.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image—JPG, PNG, WEBPImage(s) to edit.

Example Request

{
  "prompt": "Restyle the scene with warm golden-hour lighting and soft bokeh",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-breathtaking-mountain-landscape-at-golden-hour-w-1782135397335-0.webp"
  ],
  "image_size": "auto",
  "safety_tolerance": "2",
  "enable_safety_checker": true,
  "output_format": "jpeg",
  "sync_mode": false
}

Response

{
  "request_id": "flux-2-max-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-2-max-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_API_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-2-max-edit' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "flux-2-max-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-2-max-edit",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-2-max-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "flux-2-max-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-2-max-edit",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-2-max-edit_019dxxxx/output.jpeg"
    ],
    "media_type": "image/jpeg"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstringWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

FLUX 2 Max API Pricing

ResolutionPrice (USD)
First processed megapixel$0.07
Each additional megapixel$0.03
Input images count toward processed megapixels$0.03
7. Flux Pro VTO

Flux Pro VTO API Documentation

https://gateway.pixazo.ai/flux-pro-v1-virtual-try-on/v1/flux-pro-v1-virtual-try-on-request

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

FLUX Pro V1 Virtual Try-On generate request

Request Code

POST https://gateway.pixazo.ai/flux-pro-v1-virtual-try-on/v1/flux-pro-v1-virtual-try-on-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "prompt": "The garment is worn naturally, tucked in slightly at the waist",
  "human_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Person.jpeg",
  "garment_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Garment.jpeg",
  "num_inference_steps": 4,
  "output_format": "jpeg",
  "sync_mode": false
}
import requests

url = "https://gateway.pixazo.ai/flux-pro-v1-virtual-try-on/v1/flux-pro-v1-virtual-try-on-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "The garment is worn naturally, tucked in slightly at the waist",
    "human_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Person.jpeg",
    "garment_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Garment.jpeg",
    "num_inference_steps": 4,
    "output_format": "jpeg",
    "sync_mode": false
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/flux-pro-v1-virtual-try-on/v1/flux-pro-v1-virtual-try-on-request";
const headers = {
  "Content-Type": "application/json",
  "Cache-Control": "no-cache",
  "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
  "prompt": "The garment is worn naturally, tucked in slightly at the waist",
  "human_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Person.jpeg",
  "garment_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Garment.jpeg",
  "num_inference_steps": 4,
  "output_format": "jpeg",
  "sync_mode": false
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/flux-pro-v1-virtual-try-on/v1/flux-pro-v1-virtual-try-on-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "prompt": "The garment is worn naturally, tucked in slightly at the waist",
    "human_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Person.jpeg",
    "garment_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Garment.jpeg",
    "num_inference_steps": 4,
    "output_format": "jpeg",
    "sync_mode": false
}'

Output

{
  "request_id": "flux-pro-v1-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-pro-v1-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your generate request to receive a POST callback instead of polling.

X-Webhook-URL: https://your-server.com/webhook/callback

Request Parameters - FLUX Pro V1 Virtual Try-On generate request

Parameter Required Type Default Allowed values / range Description
promptYesstring——Natural-language styling instructions describing how the garment should be worn (e.g., "tucked in slightly at the waist", "loose drape", "form-fitting").
human_image_urlYesstring——URL of the front-facing person image. Maximum 2 megapixels; recommended under 1 megapixel. Must be publicly accessible.
garment_image_urlYesstring——URL of the garment reference image. Maximum 1 megapixel; recommended around 0.5 megapixel. Must be publicly accessible.
num_inference_stepsNointeger41, 2, 3, 4Number of refinement steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster.
output_formatNostring"jpeg""jpeg", "png"Output image format.
seedNointeger——Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time.
sync_modeNobooleanfalsetrue, falseIf on, the finished file is sent back directly instead of as a download link. Handy for quick tests; for normal use, leave it off to get a download link.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
human_image_url1JPG, PNG, WEBPPerson photo (≤ 2 MP).
garment_image_url1JPG, PNG, WEBPGarment image (≤ 1 MP).

Example Request

{
  "prompt": "The garment is worn naturally, tucked in slightly at the waist",
  "human_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/upscaler_019ed0c8-bb34-7854-afbc-b2a164758a15b/output.png",
  "garment_image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/nano-banana_019f1842-c359-7535-a90c-a798a408fbfa3/output.jpg",
  "num_inference_steps": 4,
  "output_format": "jpeg",
  "sync_mode": false
}

Response

{
  "request_id": "flux-pro-v1-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-pro-v1-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_API_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-pro-v1-virtual-try-on' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "flux-pro-v1-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-pro-v1-virtual-try-on",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-pro-v1-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "flux-pro-v1-virtual-try-on_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-pro-v1-virtual-try-on",
  "error": null,
  "output": { "media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-pro-v1-virtual-try-on_019dxxxx/output.jpeg"], "media_type": "image/jpeg" },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstringWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Flux Pro VTO API Pricing

Your request will cost $0.0475 per generation.
8. Flux 2 Pro

Flux 2 Pro API Documentation

https://gateway.pixazo.ai/flux-2-pro-image-to-image-866/v1/flux-2-pro-image-to-image-request

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Generate Request - flux 2 pro Image to Image API

Request Code

POST https://gateway.pixazo.ai/flux-2-pro-image-to-image-866/v1/flux-2-pro-image-to-image-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "Place realistic flames emerging from the top of the coffee cup, dancing above the rim",
  "image_size": "auto",
  "safety_tolerance": "2",
  "enable_safety_checker": false,
  "output_format": "jpeg",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/nano-banana/nano-banana-a382a80b-f8df-4de1-a0c1-a5dcfd42dae4-1758783383399.jpg"
  ]
}
import requests

url = "https://gateway.pixazo.ai/flux-2-pro-image-to-image-866/v1/flux-2-pro-image-to-image-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "Place realistic flames emerging from the top of the coffee cup, dancing above the rim",
    "image_size": "auto",
    "safety_tolerance": "2",
    "enable_safety_checker": false,
    "output_format": "jpeg",
    "image_urls": [
        "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/nano-banana/nano-banana-a382a80b-f8df-4de1-a0c1-a5dcfd42dae4-1758783383399.jpg"
    ]
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/flux-2-pro-image-to-image-866/v1/flux-2-pro-image-to-image-request';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  prompt: 'Place realistic flames emerging from the top of the coffee cup, dancing above the rim',
  image_size: 'auto',
  safety_tolerance: '2',
  enable_safety_checker: false,
  output_format: 'jpeg',
  image_urls: [
    'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/nano-banana/nano-banana-a382a80b-f8df-4de1-a0c1-a5dcfd42dae4-1758783383399.jpg'
  ]
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/flux-2-pro-image-to-image-866/v1/flux-2-pro-image-to-image-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "prompt": "Place realistic flames emerging from the top of the coffee cup, dancing above the rim",
    "image_size": "auto",
    "safety_tolerance": "2",
    "enable_safety_checker": false,
    "output_format": "jpeg",
    "image_urls": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/nano-banana/nano-banana-a382a80b-f8df-4de1-a0c1-a5dcfd42dae4-1758783383399.jpg"
    ]
  }'

Output

{
  "request_id": "flux-2-pro-image-to-image-866_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-2-pro-image-to-image-866_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "flux-2-pro-image-to-image-866_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-2-pro-image-to-image-866",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-2-pro-image-to-image-866_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "flux-2-pro-image-to-image-866_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-2-pro-image-to-image-866",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Generate Request

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring——A descriptive text prompt guiding the image transformation (e.g., style, lighting, elements to add or remove)
image_urlsYesarray[string]——List of publicly accessible URLs of the input images to edit. All supplied images are passed to the model as editing references.
image_sizeNostring or objectautoauto, square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9; or a custom size objectThe size of the generated image. With auto, the size is determined by the model from the input images. A custom object such as {"width": 1024, "height": 768} is also accepted (width and height between 1 and 14142 pixels).
seedNointeger——The seed to use for the generation. Reusing the same seed with the same prompt and images reproduces the same result; omit for a random result.
safety_toleranceNostring21, 2, 3, 4, 5The safety tolerance level for the generated image. 1 is the most strict and 5 is the most permissive.
enable_safety_checkerNobooleantruetrue, falseTurns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it.
output_formatNostringjpegjpeg, pngFormat of the generated image output. Supported values: jpeg, png.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image—JPG, PNG, WEBPImage(s) to transform.

Example Request

{
  "prompt": "Place realistic sparks and glowing embers erupting between the two fighting robots, emphasizing the impact of their clash.",
  "image_size": "auto",
  "safety_tolerance": "2",
  "enable_safety_checker": false,
  "output_format": "jpeg",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/nano-banana/nano-banana-a382a80b-f8df-4de1-a0c1-a5dcfd42dae4-1758783383399.jpg"
  ]
}

Response

{
  "request_id": "flux-2-pro-image-to-image-866_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-2-pro-image-to-image-866_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-2-pro-image-to-image-866' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "flux-2-pro-image-to-image-866_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-2-pro-image-to-image-866",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-2-pro-image-to-image-866_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "flux-2-pro-image-to-image-866_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-2-pro-image-to-image-866",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-2-pro-image-to-image-866_019dxxxx-xxxx/output.ext"
    ],
    "media_type": "application/octet-stream"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Flux 2 Pro API Pricing

Your request will cost $0.03 per image.
Image to Image (LoRA Trainer)

Flux 2 Pro API Documentation

https://gateway.pixazo.ai/flux-2-pro-image-to-image-trainer-831/v1/flux-2-pro-image-to-image-trainer-request

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Generate Request - flux 2 pro Image to Image Trainer API

Request Code

POST https://gateway.pixazo.ai/flux-2-pro-image-to-image-trainer-831/v1/flux-2-pro-image-to-image-trainer-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "image_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-i2i-demo-dataset.zip",
  "steps": 1200,
  "learning_rate": 0.00007
}
import requests

url = "https://gateway.pixazo.ai/flux-2-pro-image-to-image-trainer-831/v1/flux-2-pro-image-to-image-trainer-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "image_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-i2i-demo-dataset.zip",
    "steps": 1200,
    "learning_rate": 0.00007
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
const url = "https://gateway.pixazo.ai/flux-2-pro-image-to-image-trainer-831/v1/flux-2-pro-image-to-image-trainer-request";

const headers = {
  "Content-Type": "application/json",
  "Cache-Control": "no-cache",
  "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
};

const data = {
  image_data_url: "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-i2i-demo-dataset.zip",
  steps: 1200,
  learning_rate: 0.00007
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
curl -X POST "https://gateway.pixazo.ai/flux-2-pro-image-to-image-trainer-831/v1/flux-2-pro-image-to-image-trainer-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "image_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-i2i-demo-dataset.zip",
    "steps": 1200,
    "learning_rate": 0.00007
  }'

Output

{
  "request_id": "flux-2-pro-image-to-image-trainer-831_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-2-pro-image-to-image-trainer-831_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "flux-2-pro-image-to-image-trainer-831_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-2-pro-image-to-image-trainer-831",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-2-pro-image-to-image-trainer-831_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "flux-2-pro-image-to-image-trainer-831_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-2-pro-image-to-image-trainer-831",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Generate Request

ParameterRequiredTypeDefaultAllowed values / rangeDescription
image_data_urlYesstring——URL to a zip archive of before/after training image pairs named ROOT_start.EXT and ROOT_end.EXT (e.g. photo_start.jpg / photo_end.jpg). Each pair may also include up to four reference images (ROOT_start2.EXT, ROOT_start3.EXT, ...) and an optional ROOT.txt file with the edit instruction; pairs without a text file use default_caption.
stepsNointeger1000100–10000Total number of training steps. Higher values yield more refined models but require longer processing time.
learning_rateNonumber0.00005—Learning rate applied to trainable parameters. Lower values train more slowly but more reliably; higher values train faster but risk unstable results.
default_captionNostring——Default caption (edit instruction) to use for image pairs that have no ROOT.txt file in the archive. If omitted and captions are missing, training fails.

Example Request

{
  "image_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-i2i-demo-dataset.zip",
  "steps": 1200,
  "learning_rate": 0.00007
}

Response

{
  "request_id": "flux-2-pro-image-to-image-trainer-831_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-2-pro-image-to-image-trainer-831_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-2-pro-image-to-image-trainer-831' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "flux-2-pro-image-to-image-trainer-831_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-2-pro-image-to-image-trainer-831",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-2-pro-image-to-image-trainer-831_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "flux-2-pro-image-to-image-trainer-831_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-2-pro-image-to-image-trainer-831",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-2-pro-image-to-image-trainer-831_019dxxxx-xxxx/output.ext"
    ],
    "media_type": "application/octet-stream"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Flux 2 Pro API Pricing

Your request will cost $8.00 per LoRA training job.
Text to Image

Flux 2 Pro API Documentation

https://gateway.pixazo.ai/flux-2-pro-text-to-image-799/v1/flux-2-pro-text-to-image-request

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Generate Request - flux 2 pro Text to Image API

Request Code

POST https://gateway.pixazo.ai/flux-2-pro-text-to-image-799/v1/flux-2-pro-text-to-image-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "An intense close-up of knight's visor reflecting battle, sword raised, flames in background, chiaroscuro helmet shadows, hyper-detailed armor, square medieval, cinematic lighting",
  "image_size": "landscape_4_3",
  "safety_tolerance": "2",
  "enable_safety_checker": true,
  "output_format": "jpeg"
}
import requests

url = "https://gateway.pixazo.ai/flux-2-pro-text-to-image-799/v1/flux-2-pro-text-to-image-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "An intense close-up of knight's visor reflecting battle, sword raised, flames in background, chiaroscuro helmet shadows, hyper-detailed armor, square medieval, cinematic lighting",
    "image_size": "landscape_4_3",
    "safety_tolerance": "2",
    "enable_safety_checker": True,
    "output_format": "jpeg"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/flux-2-pro-text-to-image-799/v1/flux-2-pro-text-to-image-request';

const data = {
  prompt: "An intense close-up of knight's visor reflecting battle, sword raised, flames in background, chiaroscuro helmet shadows, hyper-detailed armor, square medieval, cinematic lighting",
  image_size: "landscape_4_3",
  safety_tolerance: "2",
  enable_safety_checker: true,
  output_format: "jpeg"
};

fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Cache-Control': 'no-cache',
    'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
  },
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/flux-2-pro-text-to-image-799/v1/flux-2-pro-text-to-image-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "prompt": "An intense close-up of knight\'s visor reflecting battle, sword raised, flames in background, chiaroscuro helmet shadows, hyper-detailed armor, square medieval, cinematic lighting",
    "image_size": "landscape_4_3",
    "safety_tolerance": "2",
    "enable_safety_checker": true,
    "output_format": "jpeg"
  }'

Output

{
  "request_id": "flux-2-pro-text-to-image-799_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-2-pro-text-to-image-799_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "flux-2-pro-text-to-image-799_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-2-pro-text-to-image-799",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-2-pro-text-to-image-799_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "flux-2-pro-text-to-image-799_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-2-pro-text-to-image-799",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Generate Request

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring——A detailed text description of the desired image. Be specific about subject, style, lighting, composition, and mood.
image_sizeNostring or objectlandscape_4_3square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9; or a custom size objectThe size of the generated image. Use a preset value or pass a custom object such as {"width": 1024, "height": 768} (width and height between 1 and 14142 pixels).
seedNointeger——The seed to use for the generation. Reusing the same seed with the same prompt reproduces the same image; omit for a random result.
safety_toleranceNostring21, 2, 3, 4, 5The safety tolerance level for the generated image. 1 is the most strict and 5 is the most permissive.
enable_safety_checkerNobooleantruetrue, falseTurns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it.
output_formatNostringjpegjpeg, pngThe file format of the generated image. Supported values: jpeg, png.

Example Request

{
  "prompt": "An intense close-up of knight's visor reflecting battle, sword raised, flames in background, chiaroscuro helmet shadows, hyper-detailed armor, square medieval, cinematic lighting",
  "image_size": "landscape_4_3",
  "safety_tolerance": "2",
  "enable_safety_checker": true,
  "output_format": "jpeg"
}

Response

{
  "request_id": "flux-2-pro-text-to-image-799_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-2-pro-text-to-image-799_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-2-pro-text-to-image-799' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "flux-2-pro-text-to-image-799_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-2-pro-text-to-image-799",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-2-pro-text-to-image-799_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "flux-2-pro-text-to-image-799_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-2-pro-text-to-image-799",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-2-pro-text-to-image-799_019dxxxx-xxxx/output.ext"
    ],
    "media_type": "application/octet-stream"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Flux 2 Pro API Pricing

Your request will cost $0.03 per image.
Text to Image (LoRA Trainer)

Flux 2 Pro API Documentation

https://gateway.pixazo.ai/flux-2-pro-text-to-image-trainer-712/v1/flux-2-pro-text-to-image-trainer-request

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Generate Request - flux 2 pro Text to Image Trainer API

Request Code

POST https://gateway.pixazo.ai/flux-2-pro-text-to-image-trainer-712/v1/flux-2-pro-text-to-image-trainer-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "image_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-t2i-demo-dataset.zip",
  "steps": 1500,
  "learning_rate": 0.00003
}
import requests

url = "https://gateway.pixazo.ai/flux-2-pro-text-to-image-trainer-712/v1/flux-2-pro-text-to-image-trainer-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "image_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-t2i-demo-dataset.zip",
    "steps": 1500,
    "learning_rate": 0.00003
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/flux-2-pro-text-to-image-trainer-712/v1/flux-2-pro-text-to-image-trainer-request';

const data = {
  image_data_url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-t2i-demo-dataset.zip',
  steps: 1500,
  learning_rate: 0.00003
};

fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Cache-Control': 'no-cache',
    'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
  },
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/flux-2-pro-text-to-image-trainer-712/v1/flux-2-pro-text-to-image-trainer-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "image_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-t2i-demo-dataset.zip",
    "steps": 1500,
    "learning_rate": 0.00003
  }'

Output

{
  "request_id": "flux-2-pro-text-to-image-trainer-712_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-2-pro-text-to-image-trainer-712_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "flux-2-pro-text-to-image-trainer-712_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-2-pro-text-to-image-trainer-712",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-2-pro-text-to-image-trainer-712_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "flux-2-pro-text-to-image-trainer-712_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-2-pro-text-to-image-trainer-712",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Generate Request

ParameterRequiredTypeDefaultAllowed values / rangeDescription
image_data_urlYesstring——URL to a zip archive of training images in a consistent style. Use at least 10 images; more is better. Captions are effectively required: include a caption .txt per image (named after the image, e.g. photo.txt for photo.jpg), or set default_caption below for any image without one. Because Flux has no separate trigger-word field, put your unique trigger word (for example sks_person) inside these captions — that is the only place it can live, and the trained LoRA needs it to activate the subject.
stepsNointeger1000100–10000Total number of training steps. Higher values improve model quality but increase training time.
learning_rateNonumber0.00005—Learning rate applied to trainable parameters. Lower values train more slowly but more reliably; higher values train faster but risk unstable results.
default_captionNostring——Default caption applied to any training image that has no caption .txt in the archive. Captions are mandatory: if an image has neither a per-image .txt caption nor a default_caption, training fails. This caption must contain your trigger word (for example sks_person), since Flux has no trigger field.

Example Request

{
  "image_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-t2i-demo-dataset.zip",
  "steps": 1500,
  "learning_rate": 0.00003
}

Response

{
  "request_id": "flux-2-pro-text-to-image-trainer-712_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-2-pro-text-to-image-trainer-712_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-2-pro-text-to-image-trainer-712' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "flux-2-pro-text-to-image-trainer-712_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-2-pro-text-to-image-trainer-712",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-2-pro-text-to-image-trainer-712_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "flux-2-pro-text-to-image-trainer-712_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-2-pro-text-to-image-trainer-712",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-2-pro-text-to-image-trainer-712_019dxxxx-xxxx/output.ext"
    ],
    "media_type": "application/octet-stream"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Flux 2 Pro API Pricing

Your request will cost $8.00 per LoRA training job.
Text to Image (LoRA)

Flux 2 Pro API Documentation

https://gateway.pixazo.ai/flux-2-lora/v1

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Flux 2 Lora generate request

Request Code

POST https://gateway.pixazo.ai/flux-2-lora/v1/flux-2-lora-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "prompt": "sks_robot a red toy robot with a yellow antenna standing in a futuristic city",
  "loras": [
    {
      "path": "https://your-bucket.example.com/your-trained-lora.safetensors",
      "scale": 1
    }
  ],
  "image_size": "landscape_4_3",
  "num_images": 1,
  "output_format": "png",
  "acceleration": "regular"
}
import requests

url = "https://gateway.pixazo.ai/flux-2-lora/v1/flux-2-lora-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "sks_robot a red toy robot with a yellow antenna standing in a futuristic city",
    "loras": [
        {
            "path": "https://your-bucket.example.com/your-trained-lora.safetensors",
            "scale": 1
        }
    ],
    "image_size": "landscape_4_3",
    "num_images": 1,
    "output_format": "png",
    "acceleration": "regular"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/flux-2-lora/v1/flux-2-lora-request";
const headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
    "prompt": "sks_robot a red toy robot with a yellow antenna standing in a futuristic city",
    "loras": [
        {
            "path": "https://your-bucket.example.com/your-trained-lora.safetensors",
            "scale": 1
        }
    ],
    "image_size": "landscape_4_3",
    "num_images": 1,
    "output_format": "png",
    "acceleration": "regular"
};

fetch(url, {
    method: "POST",
    headers: headers,
    body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/flux-2-lora/v1/flux-2-lora-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "prompt": "sks_robot a red toy robot with a yellow antenna standing in a futuristic city",
    "loras": [
        {
            "path": "https://your-bucket.example.com/your-trained-lora.safetensors",
            "scale": 1
        }
    ],
    "image_size": "landscape_4_3",
    "num_images": 1,
    "output_format": "png",
    "acceleration": "regular"
}'

Output

{
  "request_id": "flux-2-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-2-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your generate request to receive a POST callback instead of polling.

X-Webhook-URL: https://your-server.com/webhook/callback

Billed $0.05 per image. Apply your trained FLUX.2 LoRA by passing its URL in loras[].path (max 3 LoRAs).

Request Parameters - Flux 2 Lora generate request

Parameter Required Type Default Allowed values / range Description
promptYesstring——Text description for image generation. Be specific to guide the model’s output.
lorasNoarray[]—Array of LoRA weight configurations. Each object must contain `path` and `scale`. Up to 3 LoRAs allowed. Tip: for a trained person or subject LoRA, set scale to about 1.5 — at 1.0 the likeness washes out and the result looks broken. The trigger word is not required at inference; the subject renders from the LoRA alone.
loras[].pathYes (if loras is provided)string——HTTPS URL to a `.safetensors` LoRA weight file. Must be publicly accessible.
loras[].scaleYes (if loras is provided)number1.00.0 to 2.0Strength of the LoRA effect. Range: 0.0 to 2.0. Values above 1.0 amplify the LoRA influence.
image_sizeNostringlandscape_4_3portrait_3_4, landscape_4_3, square_1_1, landscape_16_9, portrait_9_16Output image dimensions.
num_imagesNointeger11–4Number of images to generate.
output_formatNostringpngpng, jpeg, webpOutput image format.
accelerationNostringregularregular, fast, ultra_fastInference optimization mode. `ultra_fast` reduces quality for speed.
seedNointeger—0–4294967295Optional random seed for reproducible results.

Example Request

{
  "prompt": "sks_robot a red toy robot with a yellow antenna standing in a futuristic city",
  "loras": [
    {
      "path": "https://your-bucket.example.com/your-trained-lora.safetensors",
      "scale": 1
    }
  ],
  "image_size": "landscape_4_3",
  "num_images": 1,
  "output_format": "png",
  "acceleration": "regular"
}

Response

{
  "request_id": "flux-2-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-2-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_API_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-2-lora' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "flux-2-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-2-lora",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-2-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "flux-2-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-2-lora",
  "error": null,
  "output": {
    "media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-2-lora_019dxxxx/output.png"],
    "media_type": "image/png"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstringWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Flux 2 Pro API Pricing

Your request will cost $0.021 per image.
9. Flux Kontext

Flux Kontext API Documentation

https://gateway.pixazo.ai/flux-kontext-restore-image/v1/flux-kontext-restore-image/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image Restore Request - Flux Kontext Restore Image

Request Code

POST https://gateway.pixazo.ai/flux-kontext-restore-image/v1/flux-kontext-restore-image/generate HTTP/1.1
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "input_image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png"
}
import requests

url = "https://gateway.pixazo.ai/flux-kontext-restore-image/v1/flux-kontext-restore-image/generate"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "input_image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/flux-kontext-restore-image/v1/flux-kontext-restore-image/generate';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  input_image: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/flux-kontext-restore-image/v1/flux-kontext-restore-image/generate" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "input_image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png"
  }'

Output

{
  "request_id": "flux-kontext-restore-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-kontext-restore-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "flux-kontext-restore-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-kontext-restore-image",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-kontext-restore-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "flux-kontext-restore-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-kontext-restore-image",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Flux Kontext Restore Image

ParameterRequiredTypeDefaultAllowed values / rangeDescription
input_imageYesstring (URL)——The image to restore. Supported formats: jpeg, png, gif, webp.
seedNointegerrandom—Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time.
output_formatNostring"png"jpg , pngOutput image format. Allowed values: jpg, png.
safety_toleranceNointeger20 – 2Content safety threshold. Allowed values: 0–2. 0 is the strictest, 2 the most permissive (max allowed).

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image1JPG, PNG, GIF, WEBP · < 20 MBImage to restore.

Example Request

{
  "input_image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-1-5-api-923_019ecf03-5887-7781-659f-bc0d541e2b98a/output.png",
  "seed": 42,
  "output_format": "png",
  "safety_tolerance": 2
}

Response

{
  "request_id": "flux-kontext-restore-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-kontext-restore-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-kontext-restore-image' not found or is disabled"
}

Model Validation Errors (400)

// Examples
{ "error": "input_image is required and must be a string URL" }
{ "error": "input_image must be a valid URL" }
{ "error": "output_format must be one of: jpg, png" }
{ "error": "safety_tolerance must be an integer in [0, 2]" }
{ "error": "seed must be a non-negative integer" }
{ "error": "Invalid webhook URL" }

Error via Status/Webhook

{
  "request_id": "flux-kontext-restore-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-kontext-restore-image",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-kontext-restore-image_019d42ce-ae71-7999-24c9-5d76447ecafb4"

Response (Completed)

{
  "request_id": "flux-kontext-restore-image_019d42ce-ae71-7999-24c9-5d76447ecafb4",
  "status": "COMPLETED",
  "model_id": "flux-kontext-restore-image",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-kontext-restore-image_019d42ce-ae71-7999-24c9-5d76447ecafb4/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-01T14:30:28.735Z",
  "updated_at": "2026-05-01T14:31:18.000Z",
  "completed_at": "2026-05-01T14:31:18.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type (image/png or image/jpeg)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Flux Kontext API Pricing

Your request will cost $0.04 per image.
10. Flux 2 Klein

Flux 2 Klein API Documentation

https://gateway.pixazo.ai/flux-2-klein-4b/v1/generateImage

Text to Image - Flux 2 klein 4b

Request Code

POST https://gateway.pixazo.ai/flux-2-klein-4b/v1/generateImage
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A sunset with a dog playing on the beach, golden light reflecting on the water, photorealistic, highly detailed",
  "steps": 25,
  "width": 1024,
  "height": 1024
}
import requests

url = "https://gateway.pixazo.ai/flux-2-klein-4b/v1/generateImage"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "A sunset with a dog playing on the beach, golden light reflecting on the water, photorealistic, highly detailed",
    "steps": 25,
    "width": 1024,
    "height": 1024
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/flux-2-klein-4b/v1/generateImage';

const data = {
  prompt: 'A sunset with a dog playing on the beach, golden light reflecting on the water, photorealistic, highly detailed',
  steps: 25,
  width: 1024,
  height: 1024
};

fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Cache-Control': 'no-cache',
    'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
  },
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/flux-2-klein-4b/v1/generateImage" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
    "prompt": "A sunset with a dog playing on the beach, golden light reflecting on the water, photorealistic, highly detailed",
    "steps": 25,
    "width": 1024,
    "height": 1024
}'

Output

{
  "output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/flux-2-klein-4b/1768578707564-851083.png"
}

Request Parameters - Text to Image

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring——The text prompt describing the image to generate. Must be a non-empty string.
stepsNointeger25No effect (fixed 4-step inference)Accepted for compatibility but does not change the output: FLUX.2 [klein] is a distilled model that always runs a fixed 4-step inference process, so this value does not alter quality or speed.
widthNointeger1024256-1920The desired width of the generated image, specified in pixels. Default: 1024. Range: 256-1920.
heightNointeger1024256-1920The desired height of the generated image, specified in pixels. Default: 1024. Range: 256-1920.

Example Request

{
  "prompt": "A sunset with a dog playing on the beach, golden light reflecting on the water, photorealistic, highly detailed",
  "steps": 25,
  "width": 1024,
  "height": 1024
}

Response

{
  "output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/flux-2-klein-4b/1768578707564-851083.png"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes for Text to Image.

Code Meaning
200 Success
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
Too Many Requests
500 Internal Server Error

Flux 2 Klein API Pricing

ResolutionPrice (USD)
512x512$0.00035
1024×1024$0.00069
1448×1448$0.00138
2048×2048$0.00277
11. Flux 2 Dev

Flux 2 Dev API Documentation

https://gateway.pixazo.ai/flux-2-dev/v1/generateT2I

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

generateT2I - Flux 2 dev API

Request Code

POST https://gateway.pixazo.ai/flux-2-dev/v1/generateT2I
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "prompt": "a sunset at the alps"
}
import requests

url = "https://gateway.pixazo.ai/flux-2-dev/v1/generateT2I"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "a sunset at the alps"
}

# Generation takes ~60-90 seconds; set an appropriate timeout.
response = requests.post(url, json=data, headers=headers, timeout=180)
print(response.json())
const url = 'https://gateway.pixazo.ai/flux-2-dev/v1/generateT2I';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_API_KEY'
};
const data = {
  prompt: 'a sunset at the alps'
};

// Generation takes ~60-90 seconds; the request stays open until the image is ready.
fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/flux-2-dev/v1/generateT2I" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --max-time 180 \
  --data-raw '{
    "prompt": "a sunset at the alps"
  }'

Output

{
  "output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/flux-2-dev-cf/1762439647765-844809.png"
}

Synchronous Response

This endpoint is synchronous. The HTTP request remains open until image generation and R2 upload complete, then returns the final image URL in a single response. There is no polling step and no request_id to track. Typical end-to-end time is 60-90 seconds; configure your HTTP client timeout to at least 180 seconds.

Request Parameters - generateT2I

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring——Text description of the image to generate. Supports multi-language input and structured JSON prompting (pass a JSON object as a string describing scene, subjects, style, lighting, etc.) for more granular control
stepsNointeger25—Number of inference steps. Higher values may improve quality but increase generation time
widthNointeger1024256-1920Width of the generated image in pixels
heightNointeger1024256-1920Height of the generated image in pixels

Example Request

{
  "prompt": "a sunset at the alps"
}

Response

{
  "output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/flux-2-dev-cf/1762439647765-844809.png"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_API_KEY

Response Handling

Common status codes.

CodeMeaning
200Success — response body contains the generated image URL
Bad Request — invalid or missing prompt
401Unauthorized — invalid subscription key
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Response Fields

FieldTypeDescription
outputstringPublic URL of the generated PNG image, hosted on Pixazo's R2 CDN

Flux 2 Dev API Pricing

Your request will cost $0.012 per image.
12. Flux Pro 1.1

Flux Pro 1.1 API Documentation

https://gateway.pixazo.ai/pro1.1/v1/pro1.1ultra/generateRequest

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Pro1.1 Ultra generateRequest - Flux pro 1.1

Request Code

POST https://gateway.pixazo.ai/pro1.1/v1/pro1.1ultra/generateRequest
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A futuristic cityscape at sunset",
  "seed": 43,
  "output_format": "jpeg",
  "aspect_ratio": "16:9"
}
import requests

url = "https://gateway.pixazo.ai/pro1.1/v1/pro1.1ultra/generateRequest"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "A futuristic cityscape at sunset",
    "seed": 43,
    "output_format": "jpeg",
    "aspect_ratio": "16:9"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/pro1.1/v1/pro1.1ultra/generateRequest';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  prompt: 'A futuristic cityscape at sunset',
  seed: 43,
  output_format: 'jpeg',
  aspect_ratio: '16:9'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/pro1.1/v1/pro1.1ultra/generateRequest" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
  "prompt": "A futuristic cityscape at sunset",
  "seed": 43,
  "output_format": "jpeg",
  "aspect_ratio": "16:9"
}'

Output

{
  "request_id": "flux-pro-1-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-pro-1-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "flux-pro-1-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-pro-1-1",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-pro-1-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "flux-pro-1-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-pro-1-1",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Pro1.1 Ultra generateRequest

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring——The instruction or description for the image to be generated. FLUX1.1 [pro] ultra delivers professional-grade image quality with enhanced photo realism and up to 2K resolution
image_urlOptionalstring——URL of an image to use as a visual reference (image prompt). The model blends this image with your text prompt; control its influence with image_prompt_strength.
image_prompt_strengthOptionalnumber0.10 to 1How strongly the reference image (image_url) influences the result. 0 ignores the image; higher values follow it more closely.
seedOptionalinteger——Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time.
sync_modeOptionalbooleanfalsetrue, falseIf on, the finished file is sent back directly instead of as a download link. Handy for quick tests; for normal use, leave it off to get a download link.
num_imagesOptionalinteger11 to 4The number of images to generate per request.
enable_safety_checkerOptionalboolean—true, falseTurns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it.
output_formatOptionalstringjpegjpeg, pngThe format of the generated image.
safety_toleranceOptionalstring21, 2, 3, 4, 5, 6The safety tolerance level for generated images. 1 is the most strict and 6 is the most permissive.
enhance_promptOptionalbooleanfalsetrue, falseAutomatically rewrites and enriches your prompt with extra detail before generation to improve results.
aspect_ratioOptionalstring16:921:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:21The aspect ratio of the generated image. Also accepts a custom width:height ratio string.
rawOptionalbooleanfalsetrue, falseGenerate less processed, more natural-looking images

Example Request

{
  "prompt": "A futuristic cityscape at sunset",
  "seed": 43,
  "output_format": "jpeg",
  "aspect_ratio": "16:9"
}

Response

{
  "request_id": "flux-pro-1-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-pro-1-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-pro-1-1' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "flux-pro-1-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-pro-1-1",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-pro-1-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "flux-pro-1-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-pro-1-1",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-pro-1-1_019dxxxx-xxxx/output.ext"
    ],
    "media_type": "application/octet-stream"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Flux Pro 1.1 API Pricing

Your request will cost $0.06 per image.
13. Flux 1 Schnell

Flux 1 Schnell API Documentation

https://gateway.pixazo.ai/flux-1-schnell/v1/getData

Get Image - flux-1 Schnell API

Request Code

POST https://gateway.pixazo.ai/flux-1-schnell/v1/getData
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "Picture a sleek, futuristic car racing through a neon-lit cityscape, its engine humming efficiently as it blurs past digital billboards. The driver skillfully navigates the glowing streets, aiming for victory in this high-tech, adrenaline-fueled race of tomorrow.",
  "num_steps": 4,
  "seed": 15,
  "height": 512,
  "width": 512
}
import requests

url = "https://gateway.pixazo.ai/flux-1-schnell/v1/getData"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "Picture a sleek, futuristic car racing through a neon-lit cityscape, its engine humming efficiently as it blurs past digital billboards. The driver skillfully navigates the glowing streets, aiming for victory in this high-tech, adrenaline-fueled race of tomorrow.",
    "num_steps": 4,
    "seed": 15,
    "height": 512,
    "width": 512
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/flux-1-schnell/v1/getData';

const data = {
  prompt: "Picture a sleek, futuristic car racing through a neon-lit cityscape, its engine humming efficiently as it blurs past digital billboards. The driver skillfully navigates the glowing streets, aiming for victory in this high-tech, adrenaline-fueled race of tomorrow.",
  num_steps: 4,
  seed: 15,
  height: 512,
  width: 512
};

fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Cache-Control': 'no-cache',
    'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
  },
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/flux-1-schnell/v1/getData" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
    "prompt": "Picture a sleek, futuristic car racing through a neon-lit cityscape, its engine humming efficiently as it blurs past digital billboards. The driver skillfully navigates the glowing streets, aiming for victory in this high-tech, adrenaline-fueled race of tomorrow.",
    "num_steps": 4,
    "seed": 15,
    "height": 512,
    "width": 512
}'

Output

{
  "output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/flux-schnell-cf/prompt-1768311018384-879091.png"
}

Request Parameters - Get Image

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—1–2048 charactersA text description of the image you want to generate. The prompt is lightly sanitized to avoid content-moderation false positives.
num_stepsNointeger11–8Number of diffusion steps; higher values can improve quality but take longer. The provider supports a maximum of 8 steps.
seedNointegerrandom—Random seed for reproducible generation. Reuse the same seed with identical settings to reproduce the same result; omit it to get a different output each time.
heightNointeger1024—The desired height of the generated image, in pixels.
widthNointeger1024—The desired width of the generated image, in pixels.

Example Request

{
  "prompt": "Picture a sleek, futuristic car racing through a neon-lit cityscape, its engine humming efficiently as it blurs past digital billboards. The driver skillfully navigates the glowing streets, aiming for victory in this high-tech, adrenaline-fueled race of tomorrow.",
  "num_steps": 4,
  "seed": 15,
  "height": 512,
  "width": 512
}

Response

{
  "output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/flux-schnell-cf/prompt-1768311018384-879091.png"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes for Get Image.

Code Meaning
200 Success
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
Too Many Requests
500 Internal Server Error

Flux 1 Schnell API Pricing

Your request will cost $0.003 per image (up to 1 MP).
Covered by your monthly free credit
Text to Image (Batch)

Flux 1 Schnell API Documentation

https://gateway.pixazo.ai/flux-1-schnell/v1/getDataBatch

Get Image Batch - flux-1 Schnell API

Request Code

POST https://gateway.pixazo.ai/flux-1-schnell/v1/getDataBatch
Content-Type: application/json
X-Secret-Key: YOUR_SECRET_KEY
Cache-Control: no-cache

{
  "prompt": "Picture a handsome man dancing",
  "num_steps": 4,
  "seed": 15,
  "height": 512,
  "width": 512,
  "webhook_url": "https://your-domain.com/webhook"
}
import requests

url = "https://gateway.pixazo.ai/flux-1-schnell/v1/getDataBatch"
headers = {
    "Content-Type": "application/json",
    "X-Secret-Key": "YOUR_SECRET_KEY",
    "Cache-Control": "no-cache"
}
data = {
    "prompt": "Picture a handsome man dancing",
    "num_steps": 4,
    "seed": 15,
    "height": 512,
    "width": 512,
    "webhook_url": "https://your-domain.com/webhook"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/flux-1-schnell/v1/getDataBatch';
const headers = {
  'Content-Type': 'application/json',
  'X-Secret-Key': 'YOUR_SECRET_KEY',
  'Cache-Control': 'no-cache'
};

const data = {
  prompt: 'Picture a handsome man dancing',
  num_steps: 4,
  seed: 15,
  height: 512,
  width: 512,
  webhook_url: 'https://your-domain.com/webhook'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/flux-1-schnell/v1/getDataBatch" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "X-Secret-Key: YOUR_SECRET_KEY" \
  --data-raw '{
    "prompt": "Picture a handsome man dancing",
    "num_steps": 4,
    "seed": 15,
    "height": 512,
    "width": 512,
    "webhook_url": "https://your-domain.com/webhook"
  }'

Output

{
  "requestId": "18a36237-f8b2-4c8d-9a3b-d5e8a9f12c45",
  "status": "queued",
  "message": "Request queued. Result will be sent to the provided webhook URL.",
  "pollingEndpoint": "/checkStatus",
  "pollingInstructions": "POST to /checkStatus with {...}"
}

Request Parameters - Get Image Batch

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—1–2048 charactersA text description of the image you want to generate. The prompt is lightly sanitized to avoid content-moderation false positives.
num_stepsNointeger11–8Number of diffusion steps; higher values can improve quality but take longer. The provider supports a maximum of 8 steps.
seedNointegerrandom—Random seed for reproducible generation. Reuse the same seed with identical settings to reproduce the same result; omit it to get a different output each time.
widthNointeger1024—The desired width of the generated image, in pixels.
heightNointeger1024—The desired height of the generated image, in pixels.
webhook_urlNostring——URL to receive the result via HTTP POST when processing completes. If provided, the API returns immediately with status 202. If omitted, the API waits internally for up to ~100 seconds and returns the result, or a 504 timeout with instructions to poll /checkStatus.

Example Request

{
  "prompt": "Picture a handsome man dancing",
  "num_steps": 4,
  "seed": 15,
  "height": 512,
  "width": 512,
  "webhook_url": "https://your-domain.com/webhook"
}

Response

{
  "requestId": "18a36237-f8b2-4c8d-9a3b-d5e8a9f12c45",
  "status": "queued",
  "message": "Request queued. Result will be sent to the provided webhook URL.",
  "pollingEndpoint": "/checkStatus",
  "pollingInstructions": "POST to /checkStatus with {\"requestId\": \"18a36237-f8b2-4c8d-9a3b-d5e8a9f12c45\"}"
}

Request Headers

Header Value
Content-Typeapplication/json
X-Secret-KeyYOUR_SECRET_KEY
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes for Get Image Batch.

Code Meaning
200 Success
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
Too Many Requests
500 Internal Server Error

Checking Job Status

After submitting your request, use this endpoint to check status and retrieve results.

Endpoint

POST https://gateway.pixazo.ai/flux-1-schnell/v1/checkStatus

Request Body

{ "requestId": "18a36237-f8b2-4c8d-9a3b-d5e8a9f12c45" }

Code Examples

POST https://gateway.pixazo.ai/flux-1-schnell/v1/checkStatus
Content-Type: application/json
X-Secret-Key: YOUR_SECRET_KEY
Cache-Control: no-cache

{
  "requestId": "18a36237-f8b2-4c8d-9a3b-d5e8a9f12c45"
}
import requests

url = "https://gateway.pixazo.ai/flux-1-schnell/v1/checkStatus"
headers = {
    "Content-Type": "application/json",
    "X-Secret-Key": "YOUR_SECRET_KEY",
    "Cache-Control": "no-cache"
}
data = {
    "requestId": "18a36237-f8b2-4c8d-9a3b-d5e8a9f12c45"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/flux-1-schnell/v1/checkStatus';
const headers = {
  'Content-Type': 'application/json',
  'X-Secret-Key': 'YOUR_SECRET_KEY',
  'Cache-Control': 'no-cache'
};

const data = {
  requestId: '18a36237-f8b2-4c8d-9a3b-d5e8a9f12c45'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/flux-1-schnell/v1/checkStatus" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "X-Secret-Key: YOUR_SECRET_KEY" \
  --data-raw '{
    "requestId": "18a36237-f8b2-4c8d-9a3b-d5e8a9f12c45"
  }'

Response Examples

{ "status": "completed", "output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/flux-schnell-cf/prompt-1768311018384-879091.png", "completedAt": 1768311019767 }

Flux 1 Schnell API Pricing

Your request will cost $0.003 per image (up to 1 MP).
Covered by your monthly free credit
14. Flux Pro

Flux Pro API Documentation

https://gateway.pixazo.ai/flux-pro/v1/pro/textToImage

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text To Image - Flux Pro API

Request Code

POST https://gateway.pixazo.ai/flux-pro/v1/pro/textToImage
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A futuristic cityscape at sunset with flying cars",
  "image_size": "landscape_4_3"
}
import requests

url = "https://gateway.pixazo.ai/flux-pro/v1/pro/textToImage"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "A futuristic cityscape at sunset with flying cars",
    "image_size": "landscape_4_3"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/flux-pro/v1/pro/textToImage';

const data = {
  prompt: 'A futuristic cityscape at sunset with flying cars',
  image_size: 'landscape_4_3'
};

fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Cache-Control': 'no-cache',
    'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
  },
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/flux-pro/v1/pro/textToImage" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
  "prompt": "A futuristic cityscape at sunset with flying cars",
  "image_size": "landscape_4_3"
}'

Output

{
  "request_id": "flux-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "flux-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-pro",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "flux-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-pro",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Text To Image

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring——The instruction or description for the image to be generated
image_sizeOptionalstring | objectlandscape_4_3square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9The aspect-ratio preset for the generated image. Also accepts a custom size object with width and height in pixels (max 14142 each), e.g. {"width": 1280, "height": 720}
num_inference_stepsOptionalinteger281-50Number of refinement steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster.
guidance_scaleOptionalfloat3.51-20CFG scale: controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation.
seedOptionalinteger——Random seed that controls the generation. Reuse the same seed with the same prompt to reproduce the same image; omit for a random result.
num_imagesOptionalinteger11-4The number of images to generate
enable_safety_checkerOptionalboolean—true, falseTurns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it.
safety_toleranceOptionalstring21, 2, 3, 4, 5, 6The safety tolerance level for the generated image. 1 is the most strict, 6 the most permissive.
output_formatOptionalstringjpegjpeg, pngThe format of the generated image

Example Request

{
  "prompt": "A futuristic cityscape at sunset with flying cars",
  "image_size": "landscape_4_3"
}

Response

{
  "request_id": "flux-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-pro' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "flux-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-pro",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "flux-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-pro",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-pro_019dxxxx-xxxx/output.ext"
    ],
    "media_type": "application/octet-stream"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Flux Pro API Pricing

Your request will cost $0.04 per image.
15. Flux Dev

Flux Dev API Documentation

https://gateway.pixazo.ai/flux-dev/v1/dev/imageToImage

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image To Image - flux Dev API

Request Code

POST https://gateway.pixazo.ai/flux-dev/v1/dev/imageToImage
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png",
  "prompt": "Editorial rooftop shot, woman in peach tee and denim, modern urban backdrop, bold blue tones, polished aesthetic."
}
import requests

url = "https://gateway.pixazo.ai/flux-dev/v1/dev/imageToImage"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png",
    "prompt": "Editorial rooftop shot, woman in peach tee and denim, modern urban backdrop, bold blue tones, polished aesthetic."
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/flux-dev/v1/dev/imageToImage';

const data = {
  image_url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png',
  prompt: 'Editorial rooftop shot, woman in peach tee and denim, modern urban backdrop, bold blue tones, polished aesthetic.'
};

fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Cache-Control': 'no-cache',
    'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
  },
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/flux-dev/v1/dev/imageToImage" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" --data-raw '{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png",
  "prompt": "Editorial rooftop shot, woman in peach tee and denim, modern urban backdrop, bold blue tones, polished aesthetic."
}'

Output

{
  "request_id": "flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-dev",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-dev",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Image To Image

ParameterRequiredTypeDefaultAllowed values / rangeDescription
image_urlYesstring——The URL of the source image to transform
promptYesstring——The instruction or description for how to transform the image
strengthOptionalfloat0.950.01 to 1How much the result may differ from the input. Higher values allow bigger changes from the source; lower values keep the output closer to the original. Higher strength values work best for this model.
num_inference_stepsOptionalinteger4010 to 50Number of refinement steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster.
guidance_scaleOptionalfloat3.51 to 20Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation.
num_imagesOptionalinteger11 to 4The number of images to generate
enable_safety_checkerOptionalbooleantruetrue, falseTurns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it.
output_formatOptionalstringjpegjpeg, pngThe format of the generated image.
accelerationOptionalstringnonenone, regular, highThe speed of generation. Higher acceleration produces images faster.
seedOptionalinteger——Random seed for reproducible results. The same seed with the same prompt and model version produces the same image every time.
sync_modeOptionalbooleanfalsetrue, falseIf true, the image is returned inline as a data URI instead of a hosted URL, and the output is not stored in the request history.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image1JPG, PNG, WEBPImage to transform.

Example Request

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png",
  "prompt": "Editorial rooftop shot, woman in peach tee and denim, modern urban backdrop, bold blue tones, polished aesthetic."
}

Response

{
  "request_id": "flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-dev' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-dev",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-dev",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-dev_019dxxxx-xxxx/output.ext"
    ],
    "media_type": "application/octet-stream"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Flux Dev API Pricing

Your request will cost $0.025 per image.
Text to Image

Flux Dev API Documentation

https://gateway.pixazo.ai/flux-dev/v1/dev/textToImage

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text To Image - flux Dev API

Request Code

POST https://gateway.pixazo.ai/flux-dev/v1/dev/textToImage
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A futuristic city skyline at sunset with flying cars",
  "image_size": "landscape_4_3"
}
import requests

url = "https://gateway.pixazo.ai/flux-dev/v1/dev/textToImage"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "A futuristic city skyline at sunset with flying cars",
    "image_size": "landscape_4_3"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/flux-dev/v1/dev/textToImage';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  prompt: 'A futuristic city skyline at sunset with flying cars',
  image_size: 'landscape_4_3'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/flux-dev/v1/dev/textToImage" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
  "prompt": "A futuristic city skyline at sunset with flying cars",
  "image_size": "landscape_4_3"
}'

Output

{
  "request_id": "flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-dev",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-dev",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Text To Image

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring——The instruction or description for the image to be generated
image_sizeNostring | objectlandscape_4_3square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9, or a custom {"width", "height"} object (each side up to 14142 px)The size / aspect ratio of the generated image. Pass one of the preset values, or a custom object with width and height.
num_inference_stepsNointeger281 to 50Number of refinement steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster.
guidance_scaleNofloat3.51 to 20Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation.
num_imagesNointeger11 to 4The number of images to generate
enable_safety_checkerNobooleantruetrue, falseTurns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it.
output_formatNostringjpegjpeg, pngThe format of the generated image.
accelerationNostringnonenone, regular, highThe speed of generation. Higher acceleration produces images faster.
seedNointeger——Random seed for reproducible results. The same seed with the same prompt and model version produces the same image every time.
sync_modeNobooleanfalsetrue, falseIf true, the image is returned inline as a data URI instead of a hosted URL, and the output is not stored in the request history.

Example Request

{
  "prompt": "A futuristic city skyline at sunset with flying cars",
  "image_size": "landscape_4_3"
}

Response

{
  "request_id": "flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-dev' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-dev",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "flux-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-dev",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-dev_019dxxxx-xxxx/output.ext"
    ],
    "media_type": "application/octet-stream"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Flux Dev API Pricing

Your request will cost $0.025 per image.
Text to Image (LoRA Fast Trainer)

Flux Dev API Documentation

https://gateway.pixazo.ai/flux-lora-fast-training/v1/train

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Flux LoRA Fast Training generate request

Request Code

POST https://gateway.pixazo.ai/flux-lora-fast-training/v1/train
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "images_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-t2i-demo-dataset.zip",
  "trigger_word": "sks_subject",
  "steps": 1000
}
import requests

url = "https://gateway.pixazo.ai/flux-lora-fast-training/v1/train"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "images_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-t2i-demo-dataset.zip",
    "trigger_word": "sks_subject",
    "steps": 1000
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/flux-lora-fast-training/v1/train";
const headers = {
  "Content-Type": "application/json",
  "Cache-Control": "no-cache",
  "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
  "images_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-t2i-demo-dataset.zip",
  "trigger_word": "sks_subject",
  "steps": 1000
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/flux-lora-fast-training/v1/train" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "images_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-t2i-demo-dataset.zip",
    "trigger_word": "sks_subject",
    "steps": 1000
  }'

Output

{
  "request_id": "flux-lora-fast-training_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-lora-fast-training_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your generate request to receive a POST callback instead of polling.

X-Webhook-URL: https://your-server.com/webhook/callback

Request Parameters - Flux LoRA Fast Training generate request

Parameter Required Type Default Allowed values / range Description
images_data_urlYesstring—publicly accessible URL to a .zipURL to a zip archive of training images — at least 4, more is generally better. The archive may also contain .txt caption files, each sharing the filename of the image it describes.
trigger_wordNostring——Trigger word to use in the captions. If omitted, no trigger word is used. If no captions are supplied, the trigger word is used in place of captions.
stepsNointeger—100–5000Number of training steps. Omit to use the provider default. Billing is $2 up to 1000 steps and scales linearly above that, at $0.002 per additional step.
create_masksNobooleantruetrue, falseIf true, segmentation masks are used to weight the training loss. For people a face mask is used where possible.
is_styleNobooleanfalsetrue, falseIf true, trains a style LoRA. This deactivates segmentation and captioning and uses the trigger word instead — use the trigger word to name the style.
is_input_format_already_preprocessedNobooleanfalsetrue, falseSet to true if the archive is already in the preprocessed format. When false (default) raw images are expected, each with a matching .txt caption file of the same name.
data_archive_formatNostring——Format of the archive. Inferred from the URL when not specified.

Example Request

{
  "images_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-t2i-demo-dataset.zip",
  "trigger_word": "sks_subject",
  "steps": 1000
}

Response

{
  "request_id": "flux-lora-fast-training_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-lora-fast-training_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_API_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-lora-fast-training' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "flux-lora-fast-training_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-lora-fast-training",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-lora-fast-training_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "flux-lora-fast-training_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-lora-fast-training",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-lora-fast-training_019dxxxx/output.safetensors",
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-lora-fast-training_019dxxxx/config.json"
    ],
    "media_type": "application/octet-stream"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstringWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Flux Dev API Pricing

Your request will cost $2.00 per LoRA training job.
16. Flux Fill Dev

Flux Fill Dev API Documentation

https://gateway.pixazo.ai/flux-fill-dev/v1/flux-fill/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image Generation Request - Flux Fill Dev API

Request Code

POST https://gateway.pixazo.ai/flux-fill-dev/v1/flux-fill/generate
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "a futuristic spaceship with neon lights",
  "image": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png",
  "mask": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"
}
import requests

API_KEY = "your-api-key-here"
BASE_URL = "https://gateway.pixazo.ai/flux-fill-dev/v1"

response = requests.post(
    f"{BASE_URL}/flux-fill/generate",
    headers={
        "Content-Type": "application/json",
        "Ocp-Apim-Subscription-Key": API_KEY
    },
    json={
        "prompt": "a futuristic spaceship with neon lights",
        "image": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png",
        "mask": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"
    }
)

result = response.json()
print(result)
async function generateImage() {
  const response = await fetch(
    'https://gateway.pixazo.ai/flux-fill-dev/v1/flux-fill/generate',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'Ocp-Apim-Subscription-Key': process.env.API_KEY
      },
      body: JSON.stringify({
        prompt: 'a futuristic spaceship with neon lights',
        image: 'https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png',
        mask: 'https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png'
      })
    }
  );

  const result = await response.json();
  console.log(result);
}

generateImage();
curl -v -X POST "https://gateway.pixazo.ai/flux-fill-dev/v1/flux-fill/generate" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "prompt": "a futuristic spaceship with neon lights",
    "image": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png",
    "mask": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"
  }'

Output

{
  "request_id": "flux-fill-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-fill-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "flux-fill-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-fill-dev",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-fill-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "flux-fill-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-fill-dev",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Image Generation Request

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring——Text description of what to generate in the masked area
imageYesstring——URL of the source image to inpaint (must be publicly accessible). Can contain an alpha mask. Width/height are scaled to the closest multiple of 32, and images larger than 1440x1440 are scaled down to fit.
maskYesstring——URL of a black-and-white mask image: white areas are inpainted (regenerated), black areas are preserved. Required — a request without a mask is rejected with 400 'mask' is required before any charge.
seedNointeger——Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time.
guidanceNonumber300 – 100Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation.
num_outputsNointeger11 – 4Number of output images to generate.
num_inference_stepsNointeger281 – 50Number of refinement (denoising) steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. Recommended range: 28-50.
megapixelsNostring"1""1", "0.25", "match_input"Approximate resolution of the generated image, in megapixels. Use "match_input" to match the size of the input image (with an upper limit of 1440x1440 pixels).
output_formatNostringwebpwebp, jpg, pngFormat of the output images.
output_qualityNointeger800 – 100Compression quality of the saved file, from 0 (smallest file, lowest quality) to 100 (largest file, best quality). No effect on lossless formats like PNG.
lora_weightsNostring——Optional LoRA weights to load. Accepts a hosted model reference (owner/model or owner/model/version), a Hugging Face URL (huggingface.co/owner/model-name), a CivitAI URL (civitai.com/models/id), or a direct .safetensors URL. Example: 'fofr/flux-pixar-cars'.
lora_scaleNonumber1-1 – 3How strongly the selected style add-on (LoRA) is applied. Higher values make its effect more pronounced; lower values make it subtler. Sane results are usually between 0 and 1.
disable_safety_checkerNobooleanfalsetrue, falseDisable the safety checker (NSFW filter) for generated images.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image1JPG, PNG, WEBPImage + mask (area to fill).

Example Request

{
  "prompt": "a futuristic spaceship with neon lights",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-1781619282400-0.webp",
  "mask": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-0-lite-text-to-image_019ecace-485b-7447-c8d1-ce0344929afed/output.png",
  "seed": 42,
  "guidance": 35,
  "num_outputs": 2,
  "num_inference_steps": 35,
  "output_format": "png",
  "output_quality": 95
}

Response

{
  "request_id": "flux-fill-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/flux-fill-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance. Required: $0.01"
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'flux-fill-dev' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "flux-fill-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "flux-fill-dev",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/flux-fill-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "flux-fill-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "flux-fill-dev",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/flux-fill-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-04-14T10:00:00.000Z",
  "updated_at": "2026-04-14T10:00:30.000Z",
  "completed_at": "2026-04-14T10:00:30.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type (image/png)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Flux Fill Dev API Pricing

Your request will cost $0.04 per image.

⚡ Performance

Live usage measured on Pixazo's gateway, split by model version. Generation time is how long a generation takes end-to-end (lower is better). Success rate is the percent of generations that complete (higher is better).

Show data for the last
Generations
242,100last 30d
~8,070 per day
Success rate
98.2%
of completed generations
Generation time
4.3minavg
p95 11.4min
Requests
Oct 6max 21,200Nov 4
FLUX 3 VideoAvg 4,373/day
Flux 2 ProAvg 1,717/day
FLUX 3 KleinAvg 1,343/day
FLUX 3 MaxAvg 23/day
OtherAvg 613/day
Generation Time
Oct 6max 10.1minNov 4
FLUX 3 VideoAvg 7.3min
Flux 2 ProAvg 43.7s
FLUX 3 KleinAvg 86.6s
FLUX 3 MaxAvg 111.5s
OtherAvg 66.0s
Error Rate
Oct 6max 100.0%Nov 4
FLUX 3 VideoAvg 2.6%
Flux 2 ProAvg 0.2%
FLUX 3 KleinAvg 0.5%
FLUX 3 MaxAvg 14.3%
OtherAvg 2.7%

〰 Uptime

Percent of generations that succeeded over the selected period, per model version.

Avg. Success Rate (30d)
98.22%
across all generations of this model family
Uptime
Oct 6max 100%Nov 4
FLUX 3 VideoAvg 97.36%
Flux 2 ProAvg 99.80%
FLUX 3 KleinAvg 99.50%
FLUX 3 MaxAvg 85.71%
OtherAvg 97.25%