Krea 3 API, Krea 2 Turbo API, Krea 2 API: Pricing, Documentation

by Krea.AI

Krea API is a developer-focused interface for accessing Krea’s flagship foundation image model, enabling applications to generate and transform high-quality visuals with fine-grained creative control. Designed to support a wide range of artistic and commercial workflows, the API allows developers to create images from text prompts, leverage reference images and moodboards, apply advanced style transfer, and adjust creativity parameters to influence the visual direction of outputs. As part of Krea’s broader AI platform, Krea 2 API integrates into a scalable, asynchronous workflow and is built to help teams produce distinctive, brand-aligned imagery while maintaining flexibility across diverse creative use cases.

Get API Key
Krea 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 →

Krea 3 API Documentation

Generate an image from text with Krea 3: describe it in prompt and, optionally, set the output size in image_size. 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/krea-3/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 - Krea 3

Request Code

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

{
  "prompt": "A red fox curled up asleep in fresh snow at dawn, soft pink light on the pine trees behind it",
  "image_size": {
    "width": 1024,
    "height": 1024
  }
}
import requests

url = "https://gateway.pixazo.ai/krea-3/v1/text-to-image"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A red fox curled up asleep in fresh snow at dawn, soft pink light on the pine trees behind it",
  "image_size": {
    "width": 1024,
    "height": 1024
  }
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/krea-3/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 curled up asleep in fresh snow at dawn, soft pink light on the pine trees behind it",
  "image_size": {
    "width": 1024,
    "height": 1024
  }
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/krea-3/v1/text-to-image' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A red fox curled up asleep in fresh snow at dawn, soft pink light on the pine trees behind it", "image_size": {"width": 1024, "height": 1024}}'

Output

{
  "request_id": "krea-3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/krea-3_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/krea-3/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 curled up asleep in fresh snow at dawn, soft pink light on the pine trees behind it", "image_size": {"width": 1024, "height": 1024}}'

Callback Payload (success)

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

Failure callback shape

{
  "request_id": "krea-3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "krea-3",
  "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 text, up to 5000 charactersA description of the image to generate.
image_sizeNostring or object"auto""auto", or an object {"width": W, "height": H} with each edge from 256 to 3200 pixels and at most 4,220,160 pixels in totalThe output size. Each edge is rounded up to a multiple of 16. auto lets the model choose the shape of the image at about 4 megapixels. The size sets the amount billed (see How Billing Is Measured).
reasoning_levelNostring"low"low, mediumHow much planning goes into the prompt before the image is made. medium is slower.
negative_promptNostringEmptyText, up to 1024 charactersWhat to keep out of the image.
seedNointeger—Whole numberThe same seed and the same request give a similar image again; a new seed gives a new variation.
output_formatNostring"png"png, jpegThe file format of the image.
enable_safety_checkerNobooleantruetrueThe safety check of the output. It is always on: send true or leave it out.

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 combine images, use the Krea 3 edit API: POST https://gateway.pixazo.ai/krea-3-edit/v1/edit. image_urls, image_url and image are rejected here.
  • Set the output size in image_size as an object with width and height, or leave it out (or send "auto") to let the model choose. Named sizes such as square_hd are not accepted.
  • enable_safety_checker is always on: send true or leave it out.
  • Use the JSON types shown: prompt, negative_prompt, reasoning_level and output_format are strings, seed is a whole number, enable_safety_checker is true, and image_size is "auto" or an object with whole-number width and height.
  • Omit a field instead of sending null.
  • 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.
  • stream is not supported: the result is delivered when the job completes.

Output Size

  • Send image_size as an object with width and height: each edge from 256 to 3200 pixels, at most 4,220,160 pixels in total. Each edge is rounded up to a multiple of 16.
  • Leave image_size out, or send "auto", and the model chooses the shape of the image at about 4 megapixels.
  • The size sets the amount billed: see How Billing Is Measured below.

Example: a wide image

{
  "prompt": "A quiet harbor town at sunrise, fishing boats and soft mist over the water",
  "image_size": {
    "width": 1536,
    "height": 640
  }
}

Example: let the model choose the size

{
  "prompt": "A ceramic teapot on a wooden table, morning light",
  "image_size": "auto"
}

Example Request

{
  "prompt": "A red fox curled up asleep in fresh snow at dawn, soft pink light on the pine trees behind it",
  "image_size": {
    "width": 1024,
    "height": 1024
  }
}

Example Response

{
  "request_id": "krea-3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/krea-3_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 string, or longer than 5000 characterssynchronous 400
negative_prompt not a string, or longer than 1024 characterssynchronous 400
enable_safety_checker must be true or left out: the safety check cannot be turned off on this APIsynchronous 400
reasoning_level not one of the allowed values (written exactly as listed)synchronous 400
output_format not one of the allowed values (written exactly as listed)synchronous 400
enable_safety_checker not one of the allowed values (written exactly as listed)synchronous 400
image_size not an allowed valuesynchronous 400
seed not a whole number — for example the string "1"synchronous 400
sync_mode set to anything other than false (results are always returned as a URL in output.media_url)synchronous 400
image_urls, image_url, image (to edit an image, use the Krea 3 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 size the model does not accept, for example an edge under 256 or over 3200 pixelsstatus: "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 prompt (synchronous 400)

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

A named size (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'image_size' must be one of [auto] or object (got \"square_hd\")",
  "violations": [
    "'image_size' must be one of [auto] or object (got \"square_hd\")"
  ]
}

A reasoning level this API does not offer (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'reasoning_level' must be one of: \"low\", \"medium\" (got \"high\")",
  "violations": [
    "'reasoning_level' must be one of: \"low\", \"medium\" (got \"high\")"
  ]
}

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 Krea 3 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 Krea 3 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."
  ]
}

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/krea-3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "krea-3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "krea-3",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.png"
    ],
    "media_type": "image/png"
  },
  "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 — krea-3 for this endpoint.
output.media_urlarray of stringsURL of the image (one PNG file per request).
output.media_typestringimage/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/krea-3/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 megapixel of the output image (1 megapixel = 1,048,576 pixels), with each edge rounded up to a multiple of 16 and to at least 256 pixels. A request without a size, or with "auto", is billed at the largest size, 4,220,160 pixels. The prompt and the other settings 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.

Krea 3 API Pricing

Your request will cost $0.025 per megapixel.
Image to Image (Image Editing)

Krea 3 API Documentation

Edit or combine images with Krea 3: send one to eight images in image_urls and say what to change in prompt. 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/krea-3-edit/v1/edit

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Image (Image Editing) - Krea 3 Edit

Request Code

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

{
  "prompt": "Turn <image-1> into a soft watercolor painting",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "image_size": {
    "width": 1024,
    "height": 1024
  }
}
import requests

url = "https://gateway.pixazo.ai/krea-3-edit/v1/edit"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "Turn <image-1> into a soft watercolor painting",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "image_size": {
    "width": 1024,
    "height": 1024
  }
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/krea-3-edit/v1/edit", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "Turn <image-1> into a soft watercolor painting",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "image_size": {
    "width": 1024,
    "height": 1024
  }
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/krea-3-edit/v1/edit' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "Turn <image-1> into a soft watercolor painting", "image_urls": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"], "image_size": {"width": 1024, "height": 1024}}'

Output

{
  "request_id": "krea-3-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/krea-3-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/krea-3-edit/v1/edit' \
  -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": "Turn <image-1> into a soft watercolor painting", "image_urls": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"], "image_size": {"width": 1024, "height": 1024}}'

Callback Payload (success)

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

Failure callback shape

{
  "request_id": "krea-3-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "krea-3-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 text, up to 5000 charactersWhat to change, or how to combine the images. Refer to an image by its position: <image-1> is the first image in image_urls.
image_urlsYesarray—1–8 publicly reachable https URLs (recommended) or base64 data URIs of imagesThe images to edit or combine, in order.
image_sizeNostring or object"auto""auto", or an object {"width": W, "height": H} with each edge from 256 to 3200 pixels and at most 4,220,160 pixels in totalThe output size. Each edge is rounded up to a multiple of 16. auto lets the model choose the shape of the image at about 4 megapixels. The size sets the amount billed (see How Billing Is Measured).
reasoning_levelNostring"low"low, medium, highHow much planning goes into the edit before it is made. medium and high are slower; high adds 5 megapixels to the amount billed.
negative_promptNostringEmptyText, up to 1024 charactersWhat to keep out of the image.
seedNointeger—Whole numberThe same seed and the same request give a similar image again; a new seed gives a new variation.
output_formatNostring"png"png, jpegThe file format of the image.
enable_safety_checkerNobooleantruetrueThe safety check of the output. It is always on: send true or leave it out.

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 eight images in image_urls, as publicly reachable https URLs (recommended) or base64 data URIs. Their order sets the tags <image-1> to <image-8> you can use in prompt.
  • image_url and image are rejected: send the images as a list in image_urls.
  • Set the output size in image_size as an object with width and height, or leave it out (or send "auto") to let the model choose. Named sizes such as square_hd are not accepted.
  • enable_safety_checker is always on: send true or leave it out.
  • Use the JSON types shown: image_urls is a list of strings, prompt, negative_prompt, reasoning_level and output_format are strings, seed is a whole number, enable_safety_checker is true, and image_size is "auto" or an object with whole-number width and height.
  • Omit a field instead of sending null.
  • 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.
  • stream is not supported: the result is delivered when the job completes.

Images and Size

  • Send one to eight images in image_urls. Their order sets the tags <image-1> to <image-8> you can use in prompt.
  • Set the output size in image_size as for text to image, or leave it out to let the model choose at about 4 megapixels.
  • Each image you send is billed too, at no more than the size of the output: see How Billing Is Measured below.

Example: combine two images

{
  "prompt": "Place the subject of <image-1> in the setting of <image-2>",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "image_size": {
    "width": 1024,
    "height": 1024
  }
}

Example: a careful edit with high reasoning

{
  "prompt": "Replace the background of <image-1> with a quiet beach at sunset",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "reasoning_level": "high",
  "image_size": {
    "width": 1024,
    "height": 1024
  }
}

Example Request

{
  "prompt": "Turn <image-1> into a soft watercolor painting",
  "image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "image_size": {
    "width": 1024,
    "height": 1024
  }
}

Example Response

{
  "request_id": "krea-3-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/krea-3-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 string, or longer than 5000 characterssynchronous 400
Missing or empty image_urls, image_urls not a list, or more than 8 itemssynchronous 400
negative_prompt not a string, or longer than 1024 characterssynchronous 400
enable_safety_checker must be true or left out: the safety check cannot be turned off on this APIsynchronous 400
reasoning_level not one of the allowed values (written exactly as listed)synchronous 400
output_format not one of the allowed values (written exactly as listed)synchronous 400
enable_safety_checker not one of the allowed values (written exactly as listed)synchronous 400
image_size not an allowed valuesynchronous 400
seed not a whole number — for example the string "1"synchronous 400
sync_mode set to anything other than false (results are always returned as a URL in output.media_url)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 size the model does not accept, for example an edge under 256 or over 3200 pixelsstatus: "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 8 images (synchronous 400)

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

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 8 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 8 public URLs or base64 data URIs."
  ]
}

A named size (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'image_size' must be one of [auto] or object (got \"square_hd\")",
  "violations": [
    "'image_size' must be one of [auto] or object (got \"square_hd\")"
  ]
}

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/krea-3-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "krea-3-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "krea-3-edit",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.png"
    ],
    "media_type": "image/png"
  },
  "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 — krea-3-edit for this endpoint.
output.media_urlarray of stringsURL of the image (one PNG file per request).
output.media_typestringimage/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/krea-3-edit/v1/edit.
  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 megapixel (1 megapixel = 1,048,576 pixels): the output image, plus each image you send, an image counted at no more than the size of the output. The output size is set as for text to image, each edge rounded up to a multiple of 16 and to at least 256 pixels; without a size, or with "auto", it is billed at the largest size, 4,220,160 pixels. reasoning_level high adds 5 megapixels. 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.

Krea 3 API Pricing

Your request will cost $0.025 per megapixel.
2. Krea 2 Turbo

Krea 2 Turbo API Documentation

https://gateway.pixazo.ai/krea-2-turbo/v1/krea-2-turbo-request

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Krea 2 Turbo generate request

Request Code

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

{
  "prompt": "A surreal floating island with waterfalls cascading into the clouds, soft golden light",
  "image_size": "square_hd",
  "num_images": 1,
  "acceleration": "none",
  "output_format": "png",
  "enable_safety_checker": true,
  "sync_mode": false
}
import requests

url = "https://gateway.pixazo.ai/krea-2-turbo/v1/krea-2-turbo-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "A surreal floating island with waterfalls cascading into the clouds, soft golden light",
    "image_size": "square_hd",
    "num_images": 1,
    "acceleration": "none",
    "output_format": "png",
    "enable_safety_checker": true,
    "sync_mode": false
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/krea-2-turbo/v1/krea-2-turbo-request";
const headers = {
  "Content-Type": "application/json",
  "Cache-Control": "no-cache",
  "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
  "prompt": "A surreal floating island with waterfalls cascading into the clouds, soft golden light",
  "image_size": "square_hd",
  "num_images": 1,
  "acceleration": "none",
  "output_format": "png",
  "enable_safety_checker": true,
  "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/krea-2-turbo/v1/krea-2-turbo-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "prompt": "A surreal floating island with waterfalls cascading into the clouds, soft golden light",
    "image_size": "square_hd",
    "num_images": 1,
    "acceleration": "none",
    "output_format": "png",
    "enable_safety_checker": true,
    "sync_mode": false
  }'

Output

{
  "request_id": "krea-2-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/krea-2-turbo_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 - Krea 2 Turbo generate request

Parameter Required Type Default Allowed values / range Description
promptYesstring—non-empty; ≤ 5000 charsText prompt for image generation (1–5000 characters)
image_sizeNostring or object"square_hd""square_hd", "square", "portrait_4_3", "portrait_16_9", "landscape_4_3", "landscape_16_9", or {width: int, height: int} (max 14142 each)Preset aspect ratios: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9. Alternatively, provide a custom object with width and height integers (max 14142 each).
num_imagesNointeger11–4Number of images to generate (1–4). Each image uses seed + i as its random seed.
accelerationNostring"none""none", "regular"Inference acceleration mode. Allowed: none, regular.
enable_prompt_expansionNobooleanfalsetrue, falseIf true, the prompt is expanded with an LLM into a more detailed image-generation prompt for higher-quality results. If expansion fails, the original prompt is used unchanged.
output_formatNostring"png""jpeg", "png"Output image format. Allowed: jpeg, png.
enable_safety_checkerNobooleantruetrue, falseEnable NSFW content filtering. Set to false to disable.
seedNointeger——Optional random seed for reproducible results. If omitted, a random seed is used.
sync_modeNobooleanfalsetrue, falseIf true, returns the generated image(s) as data URI(s) inline in the response. If false, returns a request_id for async polling.

Example Request

{
  "prompt": "A surreal floating island with waterfalls cascading into the clouds, soft golden light",
  "image_size": "square_hd",
  "num_images": 1,
  "acceleration": "none",
  "output_format": "png",
  "enable_safety_checker": true,
  "sync_mode": false
}

Response

{
  "request_id": "krea-2-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/krea-2-turbo_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 'krea-2-turbo' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "krea-2-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "krea-2-turbo",
  "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/krea-2-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "krea-2-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "krea-2-turbo",
  "error": null,
  "output": {
    "media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/krea-2-turbo_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.

Krea 2 Turbo API Pricing

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

Krea 2 Turbo API Documentation

https://gateway.pixazo.ai/krea-2-turbo-lora/v1/krea-2-turbo-lora-request

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Krea 2 Turbo LoRA generate request

Request Code

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

{
  "prompt": "A portrait of sks_subject in the style of a vintage oil painting, dramatic lighting",
  "loras": [
    {
      "path": "https://your-bucket.example.com/your-trained-lora.safetensors",
      "scale": 1
    }
  ],
  "image_size": "square_hd",
  "num_images": 1,
  "acceleration": "none",
  "output_format": "png",
  "enable_safety_checker": true,
  "sync_mode": false
}
import requests

url = "https://gateway.pixazo.ai/krea-2-turbo-lora/v1/krea-2-turbo-lora-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "A portrait of sks_subject in the style of a vintage oil painting, dramatic lighting",
    "loras": [
        {
            "path": "https://your-bucket.example.com/your-trained-lora.safetensors",
            "scale": 1
        }
    ],
    "image_size": "square_hd",
    "num_images": 1,
    "acceleration": "none",
    "output_format": "png",
    "enable_safety_checker": true,
    "sync_mode": false
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/krea-2-turbo-lora/v1/krea-2-turbo-lora-request";

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

const data = {
  "prompt": "A portrait of sks_subject in the style of a vintage oil painting, dramatic lighting",
  "loras": [
    {
      "path": "https://your-bucket.example.com/your-trained-lora.safetensors",
      "scale": 1
    }
  ],
  "image_size": "square_hd",
  "num_images": 1,
  "acceleration": "none",
  "output_format": "png",
  "enable_safety_checker": true,
  "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/krea-2-turbo-lora/v1/krea-2-turbo-lora-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "prompt": "A portrait of sks_subject in the style of a vintage oil painting, dramatic lighting",
    "loras": [
      {
        "path": "https://your-bucket.example.com/your-trained-lora.safetensors",
        "scale": 1
      }
    ],
    "image_size": "square_hd",
    "num_images": 1,
    "acceleration": "none",
    "output_format": "png",
    "enable_safety_checker": true,
    "sync_mode": false
  }'

Output

{
  "request_id": "krea-2-turbo-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/krea-2-turbo-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

Request Parameters - Krea 2 Turbo LoRA generate request

Parameter Required Type Default Allowed values / range Description
promptYesstring—non-empty; ≤ 5000 charsText description for image generation (1–5000 characters).
lorasNoarray[]up to 3 itemsUp to 3 LoRA weights to apply. Each element {path (string, required), scale (float, default 1, 0-4)}. path accepts a URL, HuggingFace repo id (owner/repo), or local path. Tip: for a trained subject, use scale about 0.9 — higher values overfit and the model starts ignoring the prompt/scene.
image_sizeNostring or object"square_hd""square_hd", "square", "portrait_4_3", "portrait_16_9", "landscape_4_3", "landscape_16_9", or {width: integer, height: integer} (max 14142 each)Image dimensions preset or custom. Presets: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9. Custom object: {width: integer, height: integer} with max 14142 for either dimension.
num_imagesNointeger11–4Number of images to generate (1–4). Each image uses seed + i for variation.
accelerationNostring"none""none", "regular"Inference acceleration mode.
enable_prompt_expansionNobooleanfalsetrue, falseIf true, the prompt is expanded with an LLM into a more detailed image-generation prompt for higher-quality results. If expansion fails, the original prompt is used unchanged.
output_formatNostring"png""jpeg", "png"Output image format.
enable_safety_checkerNobooleantruetrue, falseEnable NSFW content filtering.
seedNointeger——Optional random seed for reproducible results.
sync_modeNobooleanfalsetrue, falseIf true, returns the image as a base64-encoded data URI inline in the response. Otherwise, returns a polling ID.

Example Request

{
  "prompt": "A portrait of sks_subject in the style of a vintage oil painting, dramatic lighting",
  "loras": [
    {
      "path": "https://your-bucket.example.com/your-trained-lora.safetensors",
      "scale": 1
    }
  ],
  "image_size": "square_hd",
  "num_images": 1,
  "acceleration": "none",
  "output_format": "png",
  "enable_safety_checker": true,
  "sync_mode": false
}

Response

{
  "request_id": "krea-2-turbo-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/krea-2-turbo-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 'krea-2-turbo-lora' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "krea-2-turbo-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "krea-2-turbo-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/krea-2-turbo-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "krea-2-turbo-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "krea-2-turbo-lora",
  "error": null,
  "output": {
    "media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/krea-2-turbo-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.

Krea 2 Turbo API Pricing

Your request will cost $0.015 per image.
3. Krea 2 Large

Krea 2 Large API Documentation

Generate a high-quality image from a text prompt with Krea 2 Large. This is an asynchronous (queue) API: submit a request, then poll for the result.

POST https://gateway.pixazo.ai/krea-2-large/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 - Krea 2 Large

Request Code

POST /krea-2-large/v1/text-to-image HTTP/1.1
Host: gateway.pixazo.ai
Ocp-Apim-Subscription-Key: YOUR_API_KEY
Content-Type: application/json

{
  "prompt": "a cinematic glass cabin beside a frozen lake at sunrise",
  "aspect_ratio": "16:9",
  "resolution": "1K"
}
import requests

resp = requests.post(
    "https://gateway.pixazo.ai/krea-2-large/v1/text-to-image",
    headers={
        "Ocp-Apim-Subscription-Key": "YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "a cinematic glass cabin beside a frozen lake at sunrise",
        "aspect_ratio": "16:9",
        "resolution": "1K",
    },
)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/krea-2-large/v1/text-to-image", {
  method: "POST",
  headers: {
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    prompt: "a cinematic glass cabin beside a frozen lake at sunrise",
    aspect_ratio: "16:9",
    resolution: "1K",
  }),
});
const data = await res.json();
console.log(data);
curl -X POST "https://gateway.pixazo.ai/krea-2-large/v1/text-to-image" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a cinematic glass cabin beside a frozen lake at sunrise",
    "aspect_ratio": "16:9",
    "resolution": "1K"
  }'

Output

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

Webhook (Optional)

Instead of polling, you can receive an HTTP callback when the request reaches a terminal state. Pass the webhook URL via the X-Webhook-URL header on the submit request.

Webhook Headers

HeaderTypeRequiredDescription
X-Webhook-URLstringNoHTTPS URL that receives a POST callback when the request finishes. Enables webhook delivery.
X-Webhook-ModestringNoterminal (default) fires once on COMPLETED/ERROR; sync also fires a progress webhook on every poll cycle.

Example: enable webhook

curl -X POST "https://gateway.pixazo.ai/krea-2-large/v1/text-to-image" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Webhook-URL: https://your-server.com/webhooks/krea" \
  -d '{"prompt":"a serene mountain lake","aspect_ratio":"16:9","resolution":"1K"}'

Callback Payload (Success)

{
  "request_id": "krea-2-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "krea-2-large",
  "output": {
    "media_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/krea-2-large/019dxxxx-result.png",
    "media_type": "image/png"
  },
  "completed_at": "2026-06-23T10:00:18.000Z"
}

Callback Payload (Failure)

{
  "request_id": "krea-2-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "krea-2-large",
  "error": "GENERATION_FAILED: ",
  "output": null
}

Delivery semantics

  • terminal mode (default): one webhook fires when the request reaches COMPLETED or ERROR.
  • sync mode: a progress webhook fires on every poll cycle (carrying the current status) plus the terminal webhook.
  • Deliveries are idempotent on request_id — de-duplicate on your side.
  • Respond 200 within a few seconds; non-2xx may be retried.
  • The webhook URL must be HTTPS.

Request Parameters - Text to Image

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—Any descriptive textText prompt describing the image to generate.
aspect_ratioYesstring—"1:1", "4:3", "3:2", "16:9", "2.35:1", "4:5", "2:3", "9:16"Aspect ratio of the generated image.
resolutionYesstring—"1K"Resolution scale.
creativityNostring"low""raw", "low", "medium", "high"Prompt expansion mode. raw disables expansion; low/medium/high control strength.
complexityNointeger0-100 – 100K2 Complexity slider. 0 disables the slider LoRA.
intensityNointeger0-100 – 100K2 Intensity slider. 0 disables the slider LoRA.
movementNointeger0-100 – 100K2 Movement slider. 0 disables the slider LoRA.
seedNonumber— (random)any integer, or nullRandom seed for reproducible generations. Omit or pass null for a random seed.
image_style_referencesNoarray—up to 10 itemsReference images to drive the visual style (not editing — style conditioning only).
image_style_references[].urlConditionalstring (uri)—max 1024 charsURL of the reference image. Required for each item.
image_style_references[].strengthNonumber0.50 – 1Style influence (0 = none, 1 = maximum).
moodboardsNoarray—exactly 1 itemMoodboard reference (currently limited to one).
moodboards[].idConditionalstring (uuid)—UUIDMoodboard identifier. Required for each item.
moodboards[].strengthNonumber0.230 – 1Moodboard influence (0 = none, 1 = maximum).
stylesNoarray—LoRAs / style presetsStyles (typically LoRAs) to apply to the generation.
styles[].idConditionalstring——Style (LoRA) identifier. Required for each item.
styles[].strengthConditionalnumber—-2 – 2Style strength. Required for each item.
image_urlNostring (uri)—max 1024 charsOptional source image for image-to-image generation. When provided, generation starts from this image instead of pure noise (control how much it changes with strength). Accepts an external URL, base64 data URI, or uploaded asset URL.
strengthNonumber0.990 – 1Denoising strength applied when image_url is provided. 0 keeps the input image, 1 fully replaces it. Has no effect without image_url.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image10JPG, PNG, WEBPStyle reference image(s), up to 10.

Note: Krea 2 Large is text-to-image only. The image inputs above (image_style_references, moodboards) are style/conditioning references — there is no image-to-image or editing mode.

Example Request

{
  "prompt": "a cinematic glass cabin beside a frozen lake at sunrise",
  "aspect_ratio": "16:9",
  "resolution": "1K",
  "creativity": "medium",
  "complexity": 0,
  "intensity": 0,
  "movement": 0,
  "seed": 12345,
  "image_style_references": [
    { "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "strength": 0.5 }
  ]
}

Response

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

Request Headers

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key
Content-TypestringYesapplication/json
X-Webhook-URLstringNoHTTPS URL to receive a terminal callback
X-Webhook-ModestringNoterminal (default) or sync

Response Handling

Status CodeMeaning
202Accepted — request queued; use polling_url to retrieve the result.
400Bad request — invalid or missing parameters.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance — top up your wallet.
403Forbidden — key not authorized for this API.
429Too many requests — rate limit exceeded.
500Internal server error.

Error Responses

Submit-time errors are returned synchronously; generation errors are reported on the status response (and webhook) with status: "ERROR".

// 402 Insufficient balance
{ "error": "Insufficient balance. Required amount: $0.06" }

// 400 Validation error
{ "success": false, "error": { "message": "aspect_ratio is required and must be one of: 1:1, 4:3, 3:2, 16:9, 2.35:1, 4:5, 2:3, 9:16", "code": "VALIDATION_ERROR" } }

// Generation failure (via status / webhook)
{ "request_id": "krea-2-large_019dxxxx-...", "status": "ERROR", "model_id": "krea-2-large", "error": "GENERATION_FAILED: ", "output": null }

Retrieving Results

Poll the universal status endpoint with the request_id from the submit response until status is terminal (COMPLETED / FAILED / ERROR).

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}

cURL Example

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

Response (Completed)

{
  "request_id": "krea-2-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "krea-2-large",
  "error": null,
  "output": {
    "media_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/krea-2-large/019dxxxx-result.png",
    "media_type": "image/png"
  },
  "created_at": "2026-06-23T10:00:00.000Z",
  "completed_at": "2026-06-23T10:00:18.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique id for the request; use it to poll status.
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR.
model_idstringAlways krea-2-large.
errorstring | nullFailure reason when status is ERROR/FAILED; otherwise null.
output.media_urlstringURL of the generated image (PNG).
output.media_typestringimage/png
created_atstringISO 8601 submit timestamp.
completed_atstringISO 8601 completion timestamp.
polling_urlstringFull status URL for this request.

Status Values

StatusMeaning
QUEUEDRequest accepted and waiting to be processed.
PROCESSINGGeneration in progress.
COMPLETEDDone — output.media_url is available.
FAILED / ERRORGeneration failed — see error. Failed requests are not charged.

Status Flow

QUEUED → PROCESSING → COMPLETED (or FAILED / ERROR)

Typical Workflow

  1. POST to /krea-2-large/v1/text-to-image → receive request_id + polling_url.
  2. Poll GET /v2/requests/status/{request_id} every few seconds (or use a webhook).
  3. When status is COMPLETED, download output.media_url.

Krea 2 Large API Pricing

Your request will cost $0.06 per image.
Krea 2 Large Fast

Krea 2 Large API Documentation

Generate a high-quality image from a text prompt with Krea 2 Large Fast. This is an asynchronous (queue) API: submit a request, then poll for the result.

POST https://gateway.pixazo.ai/krea-2-large-fast/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 - Krea 2 Large Fast

Request Code

POST /krea-2-large-fast/v1/text-to-image HTTP/1.1
Host: gateway.pixazo.ai
Ocp-Apim-Subscription-Key: YOUR_API_KEY
Content-Type: application/json

{
  "prompt": "a cinematic glass cabin beside a frozen lake at sunrise",
  "aspect_ratio": "16:9",
  "resolution": "1K"
}
import requests

resp = requests.post(
    "https://gateway.pixazo.ai/krea-2-large-fast/v1/text-to-image",
    headers={
        "Ocp-Apim-Subscription-Key": "YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "a cinematic glass cabin beside a frozen lake at sunrise",
        "aspect_ratio": "16:9",
        "resolution": "1K",
    },
)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/krea-2-large-fast/v1/text-to-image", {
  method: "POST",
  headers: {
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    prompt: "a cinematic glass cabin beside a frozen lake at sunrise",
    aspect_ratio: "16:9",
    resolution: "1K",
  }),
});
const data = await res.json();
console.log(data);
curl -X POST "https://gateway.pixazo.ai/krea-2-large-fast/v1/text-to-image" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a cinematic glass cabin beside a frozen lake at sunrise",
    "aspect_ratio": "16:9",
    "resolution": "1K"
  }'

Output

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

Webhook (Optional)

Instead of polling, you can receive an HTTP callback when the request reaches a terminal state. Pass the webhook URL via the X-Webhook-URL header on the submit request.

Webhook Headers

HeaderTypeRequiredDescription
X-Webhook-URLstringNoHTTPS URL that receives a POST callback when the request finishes. Enables webhook delivery.
X-Webhook-ModestringNoterminal (default) fires once on COMPLETED/ERROR; sync also fires a progress webhook on every poll cycle.

Example: enable webhook

curl -X POST "https://gateway.pixazo.ai/krea-2-large-fast/v1/text-to-image" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Webhook-URL: https://your-server.com/webhooks/krea" \
  -d '{"prompt":"a serene mountain lake","aspect_ratio":"16:9","resolution":"1K"}'

Callback Payload (Success)

{
  "request_id": "krea-2-large-fast_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "krea-2-large-fast",
  "output": {
    "media_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/krea-2-large-fast/019dxxxx-result.png",
    "media_type": "image/png"
  },
  "completed_at": "2026-06-23T10:00:18.000Z"
}

Callback Payload (Failure)

{
  "request_id": "krea-2-large-fast_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "krea-2-large-fast",
  "error": "GENERATION_FAILED: ",
  "output": null
}

Delivery semantics

  • terminal mode (default): one webhook fires when the request reaches COMPLETED or ERROR.
  • sync mode: a progress webhook fires on every poll cycle (carrying the current status) plus the terminal webhook.
  • Deliveries are idempotent on request_id — de-duplicate on your side.
  • Respond 200 within a few seconds; non-2xx may be retried.
  • The webhook URL must be HTTPS.

Request Parameters - Text to Image

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—Any descriptive textText prompt describing the image to generate.
aspect_ratioYesstring—"1:1", "4:3", "3:2", "16:9", "2.35:1", "4:5", "2:3", "9:16"Aspect ratio of the generated image.
resolutionYesstring—"1K"Resolution scale.
creativityNostring"low""raw", "low", "medium", "high"Prompt expansion mode. raw disables expansion; low/medium/high control strength.
complexityNointeger0-100 – 100K2 Complexity slider. 0 disables the slider LoRA.
intensityNointeger0-100 – 100K2 Intensity slider. 0 disables the slider LoRA.
movementNointeger0-100 – 100K2 Movement slider. 0 disables the slider LoRA.
seedNonumber— (random)any integer, or nullRandom seed for reproducible generations. Omit or pass null for a random seed.
image_style_referencesNoarray—up to 10 itemsReference images to drive the visual style (not editing — style conditioning only).
image_style_references[].urlConditionalstring (uri)—max 1024 charsURL of the reference image. Required for each item.
image_style_references[].strengthNonumber0.50 – 1Style influence (0 = none, 1 = maximum).
moodboardsNoarray—exactly 1 itemMoodboard reference (currently limited to one).
moodboards[].idConditionalstring (uuid)—UUIDMoodboard identifier. Required for each item.
moodboards[].strengthNonumber0.230 – 1Moodboard influence (0 = none, 1 = maximum).
stylesNoarray—LoRAs / style presetsStyles (typically LoRAs) to apply to the generation.
styles[].idConditionalstring——Style (LoRA) identifier. Required for each item.
styles[].strengthConditionalnumber—-2 – 2Style strength. Required for each item.
image_urlNostring (uri)—max 1024 charsOptional source image for image-to-image generation. When provided, generation starts from this image instead of pure noise (control how much it changes with strength). Accepts an external URL, base64 data URI, or uploaded asset URL.
strengthNonumber0.990 – 1Denoising strength applied when image_url is provided. 0 keeps the input image, 1 fully replaces it. Has no effect without image_url.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image10JPG, PNG, WEBPStyle reference image(s), up to 10.

Note: Krea 2 Large Fast is text-to-image only. The image inputs above (image_style_references, moodboards) are style/conditioning references — there is no image-to-image or editing mode.

Example Request

{
  "prompt": "a cinematic glass cabin beside a frozen lake at sunrise",
  "aspect_ratio": "16:9",
  "resolution": "1K",
  "creativity": "medium",
  "complexity": 0,
  "intensity": 0,
  "movement": 0,
  "seed": 12345,
  "image_style_references": [
    { "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "strength": 0.5 }
  ]
}

Response

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

Request Headers

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key
Content-TypestringYesapplication/json
X-Webhook-URLstringNoHTTPS URL to receive a terminal callback
X-Webhook-ModestringNoterminal (default) or sync

Response Handling

Status CodeMeaning
202Accepted — request queued; use polling_url to retrieve the result.
400Bad request — invalid or missing parameters.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance — top up your wallet.
403Forbidden — key not authorized for this API.
429Too many requests — rate limit exceeded.
500Internal server error.

Error Responses

Submit-time errors are returned synchronously; generation errors are reported on the status response (and webhook) with status: "ERROR".

// 402 Insufficient balance
{ "error": "Insufficient balance. Required amount: $0.03" }

// 400 Validation error
{ "success": false, "error": { "message": "aspect_ratio is required and must be one of: 1:1, 4:3, 3:2, 16:9, 2.35:1, 4:5, 2:3, 9:16", "code": "VALIDATION_ERROR" } }

// Generation failure (via status / webhook)
{ "request_id": "krea-2-large-fast_019dxxxx-...", "status": "ERROR", "model_id": "krea-2-large-fast", "error": "GENERATION_FAILED: ", "output": null }

Retrieving Results

Poll the universal status endpoint with the request_id from the submit response until status is terminal (COMPLETED / FAILED / ERROR).

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}

cURL Example

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

Response (Completed)

{
  "request_id": "krea-2-large-fast_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "krea-2-large-fast",
  "error": null,
  "output": {
    "media_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/krea-2-large-fast/019dxxxx-result.png",
    "media_type": "image/png"
  },
  "created_at": "2026-06-23T10:00:00.000Z",
  "completed_at": "2026-06-23T10:00:18.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique id for the request; use it to poll status.
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR.
model_idstringAlways krea-2-large-fast.
errorstring | nullFailure reason when status is ERROR/FAILED; otherwise null.
output.media_urlstringURL of the generated image (PNG).
output.media_typestringimage/png
created_atstringISO 8601 submit timestamp.
completed_atstringISO 8601 completion timestamp.
polling_urlstringFull status URL for this request.

Status Values

StatusMeaning
QUEUEDRequest accepted and waiting to be processed.
PROCESSINGGeneration in progress.
COMPLETEDDone — output.media_url is available.
FAILED / ERRORGeneration failed — see error. Failed requests are not charged.

Status Flow

QUEUED → PROCESSING → COMPLETED (or FAILED / ERROR)

Typical Workflow

  1. POST to /krea-2-large-fast/v1/text-to-image → receive request_id + polling_url.
  2. Poll GET /v2/requests/status/{request_id} every few seconds (or use a webhook).
  3. When status is COMPLETED, download output.media_url.

Krea 2 Large API Pricing

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

Krea 2 Large API Documentation

https://gateway.pixazo.ai/krea-2-trainer/v1/krea-2-trainer-request

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Krea 2 Trainer generate request

Request Code

POST https://gateway.pixazo.ai/krea-2-trainer/v1/krea-2-trainer-request
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_phrase": "sks_subject",
  "steps": 1000,
  "learning_rate": 0.0005
}
import requests

url = "https://gateway.pixazo.ai/krea-2-trainer/v1/krea-2-trainer-request"
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_phrase": "sks_subject",
    "steps": 1000,
    "learning_rate": 0.0005
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/krea-2-trainer/v1/krea-2-trainer-request";
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_phrase": "sks_subject",
  "steps": 1000,
  "learning_rate": 0.0005
};

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/krea-2-trainer/v1/krea-2-trainer-request" \
  -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_phrase": "sks_subject",
    "steps": 1000,
    "learning_rate": 0.0005
  }'

Output

{
  "request_id": "krea-2-trainer_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/krea-2-trainer_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 - Krea 2 Trainer generate request

Parameter Required Type Default Allowed values / range Description
images_data_urlYesstring—publicly accessible URL to a .zip archiveURL to a .zip archive of training images (PNG, JPG, JPEG, WebP). An image named ROOT.EXT (e.g. 001.jpg) may pair with a same-stem caption file ROOT.txt; images without a caption file fall back to trigger_phrase. Every image must have a caption file or a non-empty trigger_phrase, otherwise the request is rejected (422).
trigger_phraseNostring""—Instance phrase used as the caption for any image without a paired .txt caption file (DreamBooth-style); also seeds the default validation prompts. Required when some images have no caption file and auto_captioning is Off.
auto_captioningNostring"Off""Off", "Object/Character", "Style", "Custom"Automatic captioning mode. Off keeps the default behavior (each image needs a .txt caption or trigger_phrase). Object/Character, Style, and Custom auto-generate captions; trigger_phrase is included in the captioning prompt. Captioning cost is passed through.
stepsNointeger10050 – 10000Number of LoRA training steps.
learning_rateNonumber0.00050.000001 – 0.01Learning rate for the LoRA B factor. Krea recommends 0.0003–0.0007 (constant schedule).
resolutionNointeger768768, 1024Training resolution; images are cover-resized and center-cropped to a square. 768 trains ~1.7x faster with near-identical style quality; 1024 maximizes fine detail.
debug_datasetNobooleanfalsetrue, falseWhen enabled, returns a downloadable archive of the exact dataset used for training after caption backfill or auto-captioning.

Example Request

{
  "images_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-t2i-demo-dataset.zip",
  "trigger_phrase": "sks_subject",
  "steps": 1000,
  "learning_rate": 0.0005
}

Response

{
  "request_id": "krea-2-trainer_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/krea-2-trainer_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 'krea-2-trainer' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "krea-2-trainer_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "krea-2-trainer",
  "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/krea-2-trainer_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "krea-2-trainer_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "krea-2-trainer",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/krea-2-trainer_019dxxxx/output.safetensors",
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/krea-2-trainer_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.

Krea 2 Large API Pricing

Your request will cost $0.0028 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
9,500last 30d
~317 per day
Success rate
100.0%
of completed generations
Generation time
26.0savg
p95 38.4s
Requests
Oct 8max 3,500Nov 6
Krea 2 TurboAvg 293/day
Krea 3Avg 23/day
Generation Time
Oct 8max 77.1sNov 6
Krea 2 TurboAvg 23.5s
Krea 3Avg 41.9s
Error Rate
Oct 8max 5.0%Nov 6
Krea 2 TurboAvg 0.0%
Krea 3Avg 0.0%

〰 Uptime

Percent of generations that succeeded over the selected period, per model version.

Avg. Success Rate (30d)
100.00%
across all generations of this model family
Uptime
Oct 8max 100%Nov 6
Krea 2 TurboAvg 100.00%
Krea 3Avg 100.00%