Pixazo API→Models→Image to Image API→Stable Diffusion
Pixazo API→Models→Image to Image API→Stable Diffusion

Stable Diffusion 3.5 API (Large, Medium & Large Turbo), Stable Diffusion 2 Inpainting API: Pricing, Documentation

by Stability AI

Stable Diffusion by Stability AI is the foundational open AI image generation model, now expanded to include video capabilities. Through Pixazo's API, developers can access multiple Stable Diffusion versions including 3.0, 3.5, and specialized models for inpainting and video generation. The API provides the flexibility and control that made Stable Diffusion the standard for AI image generation in production applications.

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

Stable Diffusion 3.5 Large Turbo API Documentation

Stability AI's fast distilled version of Stable Diffusion 3.5 Large: high-quality images in a few steps. Make an image from a text prompt. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/stable-diffusion-3-5-large-turbo/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 - Stable Diffusion 3.5 Large Turbo

Request Code

POST https://gateway.pixazo.ai/stable-diffusion-3-5-large-turbo/v1/text-to-image
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A lighthouse on a rocky coast at dusk, warm light in the windows, waves breaking, cinematic"
}
import requests

url = "https://gateway.pixazo.ai/stable-diffusion-3-5-large-turbo/v1/text-to-image"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A lighthouse on a rocky coast at dusk, warm light in the windows, waves breaking, cinematic"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/stable-diffusion-3-5-large-turbo/v1/text-to-image", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "A lighthouse on a rocky coast at dusk, warm light in the windows, waves breaking, cinematic"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/stable-diffusion-3-5-large-turbo/v1/text-to-image' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A lighthouse on a rocky coast at dusk, warm light in the windows, waves breaking, cinematic"}'

Output

{
  "request_id": "stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-large-turbo_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).

Callback Payload (success)

{
  "request_id": "stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "stable-diffusion-3-5-large-turbo",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
    ],
    "media_type": "image/webp"
  },
  "created_at": "2026-11-24T07:34:52.048Z",
  "updated_at": "2026-11-24 07:36:22",
  "completed_at": "2026-11-24 07:36:21"
}

Failure callback shape

{
  "request_id": "stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "stable-diffusion-3-5-large-turbo",
  "error": "Generation failed: Failed to generate image: {\"errors\":[{\"code\":\"inference_error\",\"message\":\"Error creating response!\"}],\"id\":\"8da256d8607ae911a789dd4d8a91d37b\",\"name\":\"bad_request\"}",
  "output": null,
  "created_at": "2026-11-24T07:34:53.764Z",
  "updated_at": "2026-11-24 07:36:08",
  "completed_at": "2026-11-24 07:36:08"
}

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 / range
promptYesrequiredstring—1 to 10,000 characters
What to draw.
aspect_ratioNostring1:11:1, 16:9, 21:9, 2:3, 3:2, 4:5, 5:4, 9:16, 9:21
Shape of the image (about one megapixel).
negative_promptNostring—up to 10,000 characters
What to leave out of the image.
cfgNonumber11 to 10
How closely the image follows the prompt. Higher values follow it more strictly.
seedNointegerrandom0 to 4,294,967,294
Send the same seed with the same inputs to repeat a result.
output_formatNostringwebpwebp, jpg, png
File format of the image.

How usage is measured

Billed per generated image: one flat rate whatever the prompt, aspect ratio, format or settings. The rate is in the pricing panel on this page. Nothing is charged for a request that fails.

Parameters not supported

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
image_url, prompt_strengthThis endpoint works from text.POST https://gateway.pixazo.ai/stable-diffusion-3-5-large-turbo/v1/image-to-image
n, count, batch_size, num_images, number_of_images, num_outputsOne image per request.One request per image
width, height, image_size, size, resolutionThe size follows the aspect ratio.aspect_ratio
guidance_scaleNamed differently here.cfg
steps, num_inference_stepsThe number of steps is fixed by the model.—
mask, mask_urlThere is no inpainting mode on this API.—
model, versionThis endpoint always runs Stable Diffusion 3.5 Large Turbo.POST https://gateway.pixazo.ai/stable-diffusion-3-5-medium/v1/text-to-image for Stable Diffusion 3.5 Medium

Accepted, then the request fails

These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR" and an error that names the problem. Nothing is charged.

ParameterWhen the request fails
promptThe provider refuses the prompt (for example its content safety filter).

Output file

Each request returns ONE image in output.media_url, in the format you chose with output_format (webp by default). output.media_type names the format. For example, 16:9 gave a 1344x768 image at launch. The file is a link to our storage; download it and keep your own copy.

Timing

An image usually takes 20 to 35 seconds from submit to result. Polling the status endpoint every 5 seconds is enough, or use a Webhook.

Example Request

{
  "prompt": "A lighthouse on a rocky coast at dusk, warm light in the windows, waves breaking, cinematic"
}

Example Response

{
  "request_id": "stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-large-turbo_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 — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Error Responses

A 400 names every rejected parameter in violations:

{
  "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 until status is COMPLETED or ERROR, then download the image from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real Stable Diffusion 3.5 Large Turbo Text to Image request at launch; the request id is masked.

{
  "request_id": "stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "stable-diffusion-3-5-large-turbo",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
    ],
    "media_type": "image/webp"
  },
  "created_at": "2026-11-24T07:34:52.048Z",
  "updated_at": "2026-11-24 07:36:22",
  "completed_at": "2026-11-24 07:36:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the image (one entry).
output.media_typestringThe image's MIME type, for example image/webp.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Stable Diffusion 3.5 Large Turbo API Pricing

Your request will cost $0.042 per image.
Image to Image

Stable Diffusion 3.5 Large Turbo API Documentation

Stability AI's fast distilled version of Stable Diffusion 3.5 Large: high-quality images in a few steps. Make a new image from a starting image and a text prompt. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/stable-diffusion-3-5-large-turbo/v1/image-to-image

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Image - Stable Diffusion 3.5 Large Turbo

Request Code

POST https://gateway.pixazo.ai/stable-diffusion-3-5-large-turbo/v1/image-to-image
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "The same corridor of film strips, rebuilt as a glowing glass tunnel under the sea, fish swimming past",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "prompt_strength": 0.75
}
import requests

url = "https://gateway.pixazo.ai/stable-diffusion-3-5-large-turbo/v1/image-to-image"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "The same corridor of film strips, rebuilt as a glowing glass tunnel under the sea, fish swimming past",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "prompt_strength": 0.75
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/stable-diffusion-3-5-large-turbo/v1/image-to-image", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "The same corridor of film strips, rebuilt as a glowing glass tunnel under the sea, fish swimming past",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "prompt_strength": 0.75
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/stable-diffusion-3-5-large-turbo/v1/image-to-image' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "The same corridor of film strips, rebuilt as a glowing glass tunnel under the sea, fish swimming past", "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg", "prompt_strength": 0.75}'

Output

{
  "request_id": "stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-large-turbo_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).

Callback Payload (success)

{
  "request_id": "stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "stable-diffusion-3-5-large-turbo",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
    ],
    "media_type": "image/webp"
  },
  "created_at": "2026-11-24T07:34:53.167Z",
  "updated_at": "2026-11-24 07:36:08",
  "completed_at": "2026-11-24 07:36:07"
}

Failure callback shape

{
  "request_id": "stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "stable-diffusion-3-5-large-turbo",
  "error": "Generation failed: Failed to generate image: {\"errors\":[{\"code\":\"inference_error\",\"message\":\"Error creating response!\"}],\"id\":\"8da256d8607ae911a789dd4d8a91d37b\",\"name\":\"bad_request\"}",
  "output": null,
  "created_at": "2026-11-24T07:34:53.764Z",
  "updated_at": "2026-11-24 07:36:08",
  "completed_at": "2026-11-24 07:36:08"
}

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 / range
promptYesrequiredstring—1 to 10,000 characters
What the new image should show.
image_urlYesrequiredstring—public http(s) URL of a JPEG, PNG or WebP image
The image to start from. The result takes its shape.
prompt_strengthNonumber0.850 to 1
How much to change the image: lower values stay closer to it, 1 replaces it.
negative_promptNostring—up to 10,000 characters
What to leave out of the image.
cfgNonumber11 to 10
How closely the image follows the prompt. Higher values follow it more strictly.
seedNointegerrandom0 to 4,294,967,294
Send the same seed with the same inputs to repeat a result.
output_formatNostringwebpwebp, jpg, png
File format of the image.

How usage is measured

Billed per generated image: one flat rate whatever the prompt, aspect ratio, format or settings. The rate is in the pricing panel on this page. Nothing is charged for a request that fails.

Parameters not supported

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
aspect_ratioThe result takes the shape of the input image.Crop the input image to the shape you want
image, image_urlsThe image goes in one field.image_url
n, count, batch_size, num_images, number_of_images, num_outputsOne image per request.One request per image
width, height, image_size, size, resolutionThe size follows the aspect ratio.The input image's shape
guidance_scaleNamed differently here.cfg
steps, num_inference_stepsThe number of steps is fixed by the model.—
mask, mask_urlThere is no inpainting mode on this API.—
model, versionThis endpoint always runs Stable Diffusion 3.5 Large Turbo.POST https://gateway.pixazo.ai/stable-diffusion-3-5-medium/v1/image-to-image for Stable Diffusion 3.5 Medium

Accepted, then the request fails

These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR" and an error that names the problem. Nothing is charged.

ParameterWhen the request fails
image_urlThe image cannot be downloaded or is not a usable image.
promptThe provider refuses the prompt (for example its content safety filter).

Output file

Each request returns ONE image in output.media_url, in the format you chose with output_format (webp by default). output.media_type names the format. The file is a link to our storage; download it and keep your own copy.

Timing

An image usually takes 20 to 35 seconds from submit to result. Polling the status endpoint every 5 seconds is enough, or use a Webhook.

Example Request

{
  "prompt": "The same corridor of film strips, rebuilt as a glowing glass tunnel under the sea, fish swimming past",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "prompt_strength": 0.75
}

Example Response

{
  "request_id": "stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-large-turbo_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 — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Error Responses

A 400 names every rejected parameter in violations:

{
  "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 until status is COMPLETED or ERROR, then download the image from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real Stable Diffusion 3.5 Large Turbo Image to Image request at launch; the request id is masked.

{
  "request_id": "stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "stable-diffusion-3-5-large-turbo",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-diffusion-3-5-large-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
    ],
    "media_type": "image/webp"
  },
  "created_at": "2026-11-24T07:34:53.167Z",
  "updated_at": "2026-11-24 07:36:08",
  "completed_at": "2026-11-24 07:36:07"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the image (one entry).
output.media_typestringThe image's MIME type, for example image/webp.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Stable Diffusion 3.5 Large Turbo API Pricing

Your request will cost $0.042 per image.
2. Stable Diffusion 3.5 Medium

Stable Diffusion 3.5 Medium API Documentation

Stability AI's 2.5-billion-parameter Stable Diffusion 3.5 model: good prompt following at a lower cost. Make an image from a text prompt. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/stable-diffusion-3-5-medium/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 - Stable Diffusion 3.5 Medium

Request Code

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

{
  "prompt": "A lighthouse on a rocky coast at dusk, warm light in the windows, waves breaking, cinematic"
}
import requests

url = "https://gateway.pixazo.ai/stable-diffusion-3-5-medium/v1/text-to-image"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A lighthouse on a rocky coast at dusk, warm light in the windows, waves breaking, cinematic"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/stable-diffusion-3-5-medium/v1/text-to-image", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "A lighthouse on a rocky coast at dusk, warm light in the windows, waves breaking, cinematic"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/stable-diffusion-3-5-medium/v1/text-to-image' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A lighthouse on a rocky coast at dusk, warm light in the windows, waves breaking, cinematic"}'

Output

{
  "request_id": "stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-medium_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).

Callback Payload (success)

{
  "request_id": "stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "stable-diffusion-3-5-medium",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
    ],
    "media_type": "image/webp"
  },
  "created_at": "2026-11-24T07:34:55.580Z",
  "updated_at": "2026-11-24 07:36:12",
  "completed_at": "2026-11-24 07:36:12"
}

Failure callback shape

{
  "request_id": "stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "stable-diffusion-3-5-medium",
  "error": "Generation failed: Failed to generate image: {\"errors\":[{\"code\":\"inference_error\",\"message\":\"Error creating response!\"}],\"id\":\"44ecee05788299b3ca77d670879f6be2\",\"name\":\"bad_request\"}",
  "output": null,
  "created_at": "2026-11-24T07:34:57.095Z",
  "updated_at": "2026-11-24 07:36:14",
  "completed_at": "2026-11-24 07:36:14"
}

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 / range
promptYesrequiredstring—1 to 10,000 characters
What to draw.
aspect_ratioNostring1:11:1, 16:9, 21:9, 2:3, 3:2, 4:5, 5:4, 9:16, 9:21
Shape of the image (about one megapixel).
negative_promptNostring—up to 10,000 characters
What to leave out of the image.
cfgNonumber51 to 10
How closely the image follows the prompt. Higher values follow it more strictly.
seedNointegerrandom0 to 4,294,967,294
Send the same seed with the same inputs to repeat a result.
output_formatNostringwebpwebp, jpg, png
File format of the image.

How usage is measured

Billed per generated image: one flat rate whatever the prompt, aspect ratio, format or settings. The rate is in the pricing panel on this page. Nothing is charged for a request that fails.

Parameters not supported

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
image_url, prompt_strengthThis endpoint works from text.POST https://gateway.pixazo.ai/stable-diffusion-3-5-medium/v1/image-to-image
n, count, batch_size, num_images, number_of_images, num_outputsOne image per request.One request per image
width, height, image_size, size, resolutionThe size follows the aspect ratio.aspect_ratio
guidance_scaleNamed differently here.cfg
steps, num_inference_stepsThe number of steps is fixed by the model.—
mask, mask_urlThere is no inpainting mode on this API.—
model, versionThis endpoint always runs Stable Diffusion 3.5 Medium.POST https://gateway.pixazo.ai/stable-diffusion-3-5-large-turbo/v1/text-to-image for Stable Diffusion 3.5 Large Turbo

Accepted, then the request fails

These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR" and an error that names the problem. Nothing is charged.

ParameterWhen the request fails
promptThe provider refuses the prompt (for example its content safety filter).

Output file

Each request returns ONE image in output.media_url, in the format you chose with output_format (webp by default). output.media_type names the format. For example, 16:9 gave a 1344x768 image at launch. The file is a link to our storage; download it and keep your own copy.

Timing

An image usually takes 20 to 35 seconds from submit to result. Polling the status endpoint every 5 seconds is enough, or use a Webhook.

Example Request

{
  "prompt": "A lighthouse on a rocky coast at dusk, warm light in the windows, waves breaking, cinematic"
}

Example Response

{
  "request_id": "stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-medium_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 — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Error Responses

A 400 names every rejected parameter in violations:

{
  "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 until status is COMPLETED or ERROR, then download the image from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real Stable Diffusion 3.5 Medium Text to Image request at launch; the request id is masked.

{
  "request_id": "stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "stable-diffusion-3-5-medium",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
    ],
    "media_type": "image/webp"
  },
  "created_at": "2026-11-24T07:34:55.580Z",
  "updated_at": "2026-11-24 07:36:12",
  "completed_at": "2026-11-24 07:36:12"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the image (one entry).
output.media_typestringThe image's MIME type, for example image/webp.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Stable Diffusion 3.5 Medium API Pricing

Your request will cost $0.0367 per image.
Image to Image

Stable Diffusion 3.5 Medium API Documentation

Stability AI's 2.5-billion-parameter Stable Diffusion 3.5 model: good prompt following at a lower cost. Make a new image from a starting image and a text prompt. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/stable-diffusion-3-5-medium/v1/image-to-image

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Image - Stable Diffusion 3.5 Medium

Request Code

POST https://gateway.pixazo.ai/stable-diffusion-3-5-medium/v1/image-to-image
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "The same corridor of film strips, rebuilt as a glowing glass tunnel under the sea, fish swimming past",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "prompt_strength": 0.75
}
import requests

url = "https://gateway.pixazo.ai/stable-diffusion-3-5-medium/v1/image-to-image"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "The same corridor of film strips, rebuilt as a glowing glass tunnel under the sea, fish swimming past",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "prompt_strength": 0.75
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/stable-diffusion-3-5-medium/v1/image-to-image", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "The same corridor of film strips, rebuilt as a glowing glass tunnel under the sea, fish swimming past",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "prompt_strength": 0.75
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/stable-diffusion-3-5-medium/v1/image-to-image' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "The same corridor of film strips, rebuilt as a glowing glass tunnel under the sea, fish swimming past", "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg", "prompt_strength": 0.75}'

Output

{
  "request_id": "stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-medium_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).

Callback Payload (success)

{
  "request_id": "stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "stable-diffusion-3-5-medium",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
    ],
    "media_type": "image/webp"
  },
  "created_at": "2026-11-24T07:34:56.564Z",
  "updated_at": "2026-11-24 07:36:32",
  "completed_at": "2026-11-24 07:36:32"
}

Failure callback shape

{
  "request_id": "stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "stable-diffusion-3-5-medium",
  "error": "Generation failed: Failed to generate image: {\"errors\":[{\"code\":\"inference_error\",\"message\":\"Error creating response!\"}],\"id\":\"44ecee05788299b3ca77d670879f6be2\",\"name\":\"bad_request\"}",
  "output": null,
  "created_at": "2026-11-24T07:34:57.095Z",
  "updated_at": "2026-11-24 07:36:14",
  "completed_at": "2026-11-24 07:36:14"
}

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 / range
promptYesrequiredstring—1 to 10,000 characters
What the new image should show.
image_urlYesrequiredstring—public http(s) URL of a JPEG, PNG or WebP image
The image to start from. The result takes its shape.
prompt_strengthNonumber0.850 to 1
How much to change the image: lower values stay closer to it, 1 replaces it.
negative_promptNostring—up to 10,000 characters
What to leave out of the image.
cfgNonumber51 to 10
How closely the image follows the prompt. Higher values follow it more strictly.
seedNointegerrandom0 to 4,294,967,294
Send the same seed with the same inputs to repeat a result.
output_formatNostringwebpwebp, jpg, png
File format of the image.

How usage is measured

Billed per generated image: one flat rate whatever the prompt, aspect ratio, format or settings. The rate is in the pricing panel on this page. Nothing is charged for a request that fails.

Parameters not supported

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
aspect_ratioThe result takes the shape of the input image.Crop the input image to the shape you want
image, image_urlsThe image goes in one field.image_url
n, count, batch_size, num_images, number_of_images, num_outputsOne image per request.One request per image
width, height, image_size, size, resolutionThe size follows the aspect ratio.The input image's shape
guidance_scaleNamed differently here.cfg
steps, num_inference_stepsThe number of steps is fixed by the model.—
mask, mask_urlThere is no inpainting mode on this API.—
model, versionThis endpoint always runs Stable Diffusion 3.5 Medium.POST https://gateway.pixazo.ai/stable-diffusion-3-5-large-turbo/v1/image-to-image for Stable Diffusion 3.5 Large Turbo

Accepted, then the request fails

These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR" and an error that names the problem. Nothing is charged.

ParameterWhen the request fails
image_urlThe image cannot be downloaded or is not a usable image.
promptThe provider refuses the prompt (for example its content safety filter).

Output file

Each request returns ONE image in output.media_url, in the format you chose with output_format (webp by default). output.media_type names the format. The file is a link to our storage; download it and keep your own copy.

Timing

An image usually takes 20 to 35 seconds from submit to result. Polling the status endpoint every 5 seconds is enough, or use a Webhook.

Example Request

{
  "prompt": "The same corridor of film strips, rebuilt as a glowing glass tunnel under the sea, fish swimming past",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "prompt_strength": 0.75
}

Example Response

{
  "request_id": "stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-medium_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 — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Error Responses

A 400 names every rejected parameter in violations:

{
  "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 until status is COMPLETED or ERROR, then download the image from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real Stable Diffusion 3.5 Medium Image to Image request at launch; the request id is masked.

{
  "request_id": "stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "stable-diffusion-3-5-medium",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-diffusion-3-5-medium_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
    ],
    "media_type": "image/webp"
  },
  "created_at": "2026-11-24T07:34:56.564Z",
  "updated_at": "2026-11-24 07:36:32",
  "completed_at": "2026-11-24 07:36:32"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the image (one entry).
output.media_typestringThe image's MIME type, for example image/webp.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Stable Diffusion 3.5 Medium API Pricing

Your request will cost $0.0367 per image.
3. Stable Diffusion 3.5 Large

Stable Diffusion 3.5 Large API Documentation

Stability AI's largest Stable Diffusion 3.5 model (8 billion parameters): the most detailed images and closest prompt following in the 3.5 family. Make an image from a text prompt. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/stable-diffusion-3-5-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 - Stable Diffusion 3.5 Large

Request Code

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

{
  "prompt": "A lighthouse on a rocky coast at dusk, warm light in the windows, waves breaking, cinematic"
}
import requests

url = "https://gateway.pixazo.ai/stable-diffusion-3-5-large/v1/text-to-image"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A lighthouse on a rocky coast at dusk, warm light in the windows, waves breaking, cinematic"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/stable-diffusion-3-5-large/v1/text-to-image", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "A lighthouse on a rocky coast at dusk, warm light in the windows, waves breaking, cinematic"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/stable-diffusion-3-5-large/v1/text-to-image' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A lighthouse on a rocky coast at dusk, warm light in the windows, waves breaking, cinematic"}'

Output

{
  "request_id": "stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-large_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).

Callback Payload (success)

{
  "request_id": "stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "stable-diffusion-3-5-large",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
    ],
    "media_type": "image/webp"
  },
  "created_at": "2026-11-24T08:32:04.755Z",
  "updated_at": "2026-11-24 08:32:27",
  "completed_at": "2026-11-24 08:32:26"
}

Failure callback shape

{
  "request_id": "stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "stable-diffusion-3-5-large",
  "error": "Generation failed: Failed to generate image: {\"errors\":[{\"code\":\"inference_error\",\"message\":\"Error creating response!\"}],\"id\":\"cc8aca8d8fbde39d93f8d99b7d1cf0e2\",\"name\":\"bad_request\"}",
  "output": null,
  "created_at": "2026-11-24T08:32:06.706Z",
  "updated_at": "2026-11-24 08:33:12",
  "completed_at": "2026-11-24 08:33:12"
}

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 / range
promptYesrequiredstring—1 to 10,000 characters
What to draw.
aspect_ratioNostring1:11:1, 16:9, 21:9, 2:3, 3:2, 4:5, 5:4, 9:16, 9:21
Shape of the image (about one megapixel).
negative_promptNostring—up to 10,000 characters
What to leave out of the image.
cfgNonumber51 to 10
How closely the image follows the prompt. Higher values follow it more strictly.
seedNointegerrandom0 to 4,294,967,294
Send the same seed with the same inputs to repeat a result.
output_formatNostringwebpwebp, jpg, png
File format of the image.

How usage is measured

Billed per generated image: one flat rate whatever the prompt, aspect ratio, format or settings. The rate is in the pricing panel on this page. Nothing is charged for a request that fails.

Parameters not supported

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
image_url, prompt_strengthThis endpoint works from text.POST https://gateway.pixazo.ai/stable-diffusion-3-5-large/v1/image-to-image
n, count, batch_size, num_images, number_of_images, num_outputsOne image per request.One request per image
width, height, image_size, size, resolutionThe size follows the aspect ratio.aspect_ratio
guidance_scaleNamed differently here.cfg
steps, num_inference_stepsThe number of steps is fixed by the model.—
mask, mask_urlThere is no inpainting mode on this API.—
model, versionThis endpoint always runs Stable Diffusion 3.5 Large.POST https://gateway.pixazo.ai/stable-diffusion-3-5-large-turbo/v1/text-to-image for Stable Diffusion 3.5 Large Turbo

Accepted, then the request fails

These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR" and an error that names the problem. Nothing is charged.

ParameterWhen the request fails
promptThe provider refuses the prompt (for example its content safety filter).

Output file

Each request returns ONE image in output.media_url, in the format you chose with output_format (webp by default). output.media_type names the format. For example, 16:9 gave a 1344x768 image at launch. The file is a link to our storage; download it and keep your own copy.

Timing

An image usually takes 25 to 35 seconds from submit to result. Polling the status endpoint every 5 seconds is enough, or use a Webhook.

Example Request

{
  "prompt": "A lighthouse on a rocky coast at dusk, warm light in the windows, waves breaking, cinematic"
}

Example Response

{
  "request_id": "stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-large_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 — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Error Responses

A 400 names every rejected parameter in violations:

{
  "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 until status is COMPLETED or ERROR, then download the image from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real Stable Diffusion 3.5 Large Text to Image request at launch; the request id is masked.

{
  "request_id": "stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "stable-diffusion-3-5-large",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
    ],
    "media_type": "image/webp"
  },
  "created_at": "2026-11-24T08:32:04.755Z",
  "updated_at": "2026-11-24 08:32:27",
  "completed_at": "2026-11-24 08:32:26"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the image (one entry).
output.media_typestringThe image's MIME type, for example image/webp.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Stable Diffusion 3.5 Large API Pricing

Your request will cost $0.0683 per image.
Image to Image

Stable Diffusion 3.5 Large API Documentation

Stability AI's largest Stable Diffusion 3.5 model (8 billion parameters): the most detailed images and closest prompt following in the 3.5 family. Make a new image from a starting image and a text prompt. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/stable-diffusion-3-5-large/v1/image-to-image

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Image - Stable Diffusion 3.5 Large

Request Code

POST https://gateway.pixazo.ai/stable-diffusion-3-5-large/v1/image-to-image
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "The same corridor of film strips, rebuilt as a glowing glass tunnel under the sea, fish swimming past",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "prompt_strength": 0.75
}
import requests

url = "https://gateway.pixazo.ai/stable-diffusion-3-5-large/v1/image-to-image"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "The same corridor of film strips, rebuilt as a glowing glass tunnel under the sea, fish swimming past",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "prompt_strength": 0.75
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/stable-diffusion-3-5-large/v1/image-to-image", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "The same corridor of film strips, rebuilt as a glowing glass tunnel under the sea, fish swimming past",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "prompt_strength": 0.75
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/stable-diffusion-3-5-large/v1/image-to-image' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "The same corridor of film strips, rebuilt as a glowing glass tunnel under the sea, fish swimming past", "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg", "prompt_strength": 0.75}'

Output

{
  "request_id": "stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-large_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).

Callback Payload (success)

{
  "request_id": "stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "stable-diffusion-3-5-large",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
    ],
    "media_type": "image/webp"
  },
  "created_at": "2026-11-24T08:32:06.198Z",
  "updated_at": "2026-11-24 08:32:36",
  "completed_at": "2026-11-24 08:32:35"
}

Failure callback shape

{
  "request_id": "stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "stable-diffusion-3-5-large",
  "error": "Generation failed: Failed to generate image: {\"errors\":[{\"code\":\"inference_error\",\"message\":\"Error creating response!\"}],\"id\":\"cc8aca8d8fbde39d93f8d99b7d1cf0e2\",\"name\":\"bad_request\"}",
  "output": null,
  "created_at": "2026-11-24T08:32:06.706Z",
  "updated_at": "2026-11-24 08:33:12",
  "completed_at": "2026-11-24 08:33:12"
}

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 / range
promptYesrequiredstring—1 to 10,000 characters
What the new image should show.
image_urlYesrequiredstring—public http(s) URL of a JPEG, PNG or WebP image
The image to start from. The result takes its shape.
prompt_strengthNonumber0.850 to 1
How much to change the image: lower values stay closer to it, 1 replaces it.
negative_promptNostring—up to 10,000 characters
What to leave out of the image.
cfgNonumber51 to 10
How closely the image follows the prompt. Higher values follow it more strictly.
seedNointegerrandom0 to 4,294,967,294
Send the same seed with the same inputs to repeat a result.
output_formatNostringwebpwebp, jpg, png
File format of the image.

How usage is measured

Billed per generated image: one flat rate whatever the prompt, aspect ratio, format or settings. The rate is in the pricing panel on this page. Nothing is charged for a request that fails.

Parameters not supported

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
aspect_ratioThe result takes the shape of the input image.Crop the input image to the shape you want
image, image_urlsThe image goes in one field.image_url
n, count, batch_size, num_images, number_of_images, num_outputsOne image per request.One request per image
width, height, image_size, size, resolutionThe size follows the aspect ratio.The input image's shape
guidance_scaleNamed differently here.cfg
steps, num_inference_stepsThe number of steps is fixed by the model.—
mask, mask_urlThere is no inpainting mode on this API.—
model, versionThis endpoint always runs Stable Diffusion 3.5 Large.POST https://gateway.pixazo.ai/stable-diffusion-3-5-large-turbo/v1/image-to-image for Stable Diffusion 3.5 Large Turbo

Accepted, then the request fails

These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR" and an error that names the problem. Nothing is charged.

ParameterWhen the request fails
image_urlThe image cannot be downloaded or is not a usable image.
promptThe provider refuses the prompt (for example its content safety filter).

Output file

Each request returns ONE image in output.media_url, in the format you chose with output_format (webp by default). output.media_type names the format. The file is a link to our storage; download it and keep your own copy.

Timing

An image usually takes 25 to 35 seconds from submit to result. Polling the status endpoint every 5 seconds is enough, or use a Webhook.

Example Request

{
  "prompt": "The same corridor of film strips, rebuilt as a glowing glass tunnel under the sea, fish swimming past",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "prompt_strength": 0.75
}

Example Response

{
  "request_id": "stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-large_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 — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Error Responses

A 400 names every rejected parameter in violations:

{
  "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 until status is COMPLETED or ERROR, then download the image from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real Stable Diffusion 3.5 Large Image to Image request at launch; the request id is masked.

{
  "request_id": "stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "stable-diffusion-3-5-large",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-diffusion-3-5-large_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
    ],
    "media_type": "image/webp"
  },
  "created_at": "2026-11-24T08:32:06.198Z",
  "updated_at": "2026-11-24 08:32:36",
  "completed_at": "2026-11-24 08:32:35"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the image (one entry).
output.media_typestringThe image's MIME type, for example image/webp.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Stable Diffusion 3.5 Large API Pricing

Your request will cost $0.0683 per image.
4. Stable Diffusion 2 Inpainting

Stable Diffusion 2 Inpainting API Documentation

Stability AI's Stable Diffusion 2 inpainting model: repaint part of a picture from a text prompt. Send the picture and a black-and-white mask; the white area is repainted to match the prompt and the rest is kept. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/stable-diffusion-2-inpainting/v1/inpaint

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Inpaint - Stable Diffusion 2 Inpainting

Request Code

POST https://gateway.pixazo.ai/stable-diffusion-2-inpainting/v1/inpaint
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "a large glowing red neon heart floating in the middle of the corridor",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "mask_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end-mask.png",
  "width": 768,
  "height": 576
}
import requests

url = "https://gateway.pixazo.ai/stable-diffusion-2-inpainting/v1/inpaint"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "a large glowing red neon heart floating in the middle of the corridor",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "mask_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end-mask.png",
  "width": 768,
  "height": 576
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/stable-diffusion-2-inpainting/v1/inpaint", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "a large glowing red neon heart floating in the middle of the corridor",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "mask_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end-mask.png",
  "width": 768,
  "height": 576
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/stable-diffusion-2-inpainting/v1/inpaint' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "a large glowing red neon heart floating in the middle of the corridor", "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg", "mask_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end-mask.png", "width": 768, "height": 576}'

Output

{
  "request_id": "stable-diffusion-2-inpainting_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-2-inpainting_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).

Callback Payload (success)

{
  "request_id": "stable-diffusion-2-inpainting_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "stable-diffusion-2-inpainting",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-diffusion-2-inpainting_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-11-24T08:34:52.546Z",
  "updated_at": "2026-11-24 08:35:14",
  "completed_at": "2026-11-24 08:35:14"
}

Failure callback shape

{
  "request_id": "stable-diffusion-2-inpainting_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "stable-diffusion-2-inpainting",
  "error": "Generation failed: cannot identify image file '<path>'",
  "output": null,
  "created_at": "2026-11-24T08:32:09.368Z",
  "updated_at": "2026-11-24 08:32:48",
  "completed_at": "2026-11-24 08:32:48"
}

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 / range
promptYesrequiredstring—1 to 10,000 characters
What to paint into the white area of the mask.
image_urlYesrequiredstring—public http(s) URL of a JPEG, PNG or WebP image
The picture to edit. It is resized to width x height.
mask_urlYesrequiredstring—public http(s) URL of a black-and-white image
White pixels are repainted, black pixels are kept. Use the same shape as the picture.
negative_promptNostring—up to 10,000 characters
What to leave out of the repainted area.
widthNointeger51264, 128, 192 … 1024 (multiples of 64)
Width of the result in pixels.
heightNointeger51264, 128, 192 … 1024 (multiples of 64)
Height of the result in pixels.
num_inference_stepsNointeger501 to 100
Denoising steps. More steps can add detail and take longer.
guidance_scaleNonumber7.51 to 20
How closely the result follows the prompt. Higher values follow it more strictly.
schedulerNostringDPMSolverMultistepDDIM, K_EULER, DPMSolverMultistep, K_EULER_ANCESTRAL, PNDM, KLMS
The sampling method.
seedNointegerrandom0 to 4,294,967,295
Send the same seed with the same inputs to repeat a result.

How usage is measured

Billed per second of run time: the seconds the model takes to make the image, rounded up to the whole second (at least one). A larger width x height or more num_inference_steps take longer. The rate is in the pricing panel on this page. While the image is being made, a 30-second amount is reserved from your balance; the final charge replaces it. Nothing is charged for a request that fails.

Parameters not supported

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
n, count, batch_size, num_images, number_of_images, num_outputsOne image per request.One request per image
duration, seconds, num_frames, frames_per_secondThe charge follows the time the model runs.—
image, mask, image_urlsNamed differently here.image_url, mask_url
aspect_ratio, image_size, size, resolutionThe size is set in pixels.width, height
cfg, stepsNamed differently here.guidance_scale, num_inference_steps
strength, prompt_strengthThe masked area is repainted in full.—
output_format, formatThe result is always a PNG.—
disable_safety_checkerThe safety checker is always on.—
model, versionThis endpoint always runs Stable Diffusion 2 Inpainting.—

Accepted, then the request fails

These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR" and an error that names the problem. Nothing is charged.

ParameterWhen the request fails
image_url, mask_urlAn image cannot be downloaded or is not a usable image.
promptThe provider refuses the prompt (for example its content safety filter).

Output file

Each request returns ONE PNG image in output.media_url, width x height pixels (512 x 512 by default). output.media_type is image/png. The file is a link to our storage; download it and keep your own copy.

Timing

An image usually takes about 25 seconds from submit to result, and up to about 75 seconds when the model has been idle. Polling the status endpoint every 5 seconds is enough, or use a Webhook.

Example Request

{
  "prompt": "a large glowing red neon heart floating in the middle of the corridor",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
  "mask_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end-mask.png",
  "width": 768,
  "height": 576
}

Example Response

{
  "request_id": "stable-diffusion-2-inpainting_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-2-inpainting_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 — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Error Responses

A 400 names every rejected parameter in violations:

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

Retrieving Results

Poll the status endpoint with the request_id until status is COMPLETED or ERROR, then download the image from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/stable-diffusion-2-inpainting_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real Stable Diffusion 2 Inpainting request at launch; the request id is masked.

{
  "request_id": "stable-diffusion-2-inpainting_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "stable-diffusion-2-inpainting",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-diffusion-2-inpainting_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-11-24T08:34:52.546Z",
  "updated_at": "2026-11-24 08:35:14",
  "completed_at": "2026-11-24 08:35:14"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the image (one entry).
output.media_typestringThe image's MIME type, image/png.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Stable Diffusion 2 Inpainting API Pricing

Your request will cost $0.0015 per second.
Covered by your monthly free credit

⚡ 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
2,700last 30d
~90 per day
Success rate
85.2%
of completed generations
Generation time
44.6savg
p95 37.6s
Requests
Nov 7max 700Dec 6
Stable Diffusion 3.5 MediumAvg 30/day
Stable Diffusion 3.5 LargeAvg 23/day
Stable Diffusion 3.5 Large TurboAvg 20/day
Stable Diffusion 2 InpaintingAvg 17/day
Generation Time
Nov 7max 62.4sDec 6
Stable Diffusion 3.5 MediumAvg 46.7s
Stable Diffusion 3.5 LargeAvg 29.3s
Stable Diffusion 3.5 Large TurboAvg 60.1s
Stable Diffusion 2 InpaintingAvg 44.3s
Error Rate
Nov 7max 20.0%Dec 6
Stable Diffusion 3.5 MediumAvg 11.1%
Stable Diffusion 3.5 LargeAvg 14.3%
Stable Diffusion 3.5 Large TurboAvg 16.7%
Stable Diffusion 2 InpaintingAvg 20.0%

〰 Uptime

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

Avg. Success Rate (30d)
85.19%
across all generations of this model family
Uptime
Nov 7max 100%Dec 6
Stable Diffusion 3.5 MediumAvg 88.89%
Stable Diffusion 3.5 LargeAvg 85.71%
Stable Diffusion 3.5 Large TurboAvg 83.33%
Stable Diffusion 2 InpaintingAvg 80.00%