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.

Models Version
Get 10% Cashback on Your First Payment (up to $500)
Add funds and get 10% cashback on your first payment (up to $500).
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-imageAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | 1 to 10,000 characters |
| What to draw. | ||||
aspect_ratio | No | string | 1:1 | 1: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_prompt | No | string | — | up to 10,000 characters |
| What to leave out of the image. | ||||
cfg | No | number | 1 | 1 to 10 |
| How closely the image follows the prompt. Higher values follow it more strictly. | ||||
seed | No | integer | random | 0 to 4,294,967,294 |
| Send the same seed with the same inputs to repeat a result. | ||||
output_format | No | string | webp | webp, 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.
| Parameter | Why | Use instead |
|---|---|---|
image_url, prompt_strength | This 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_outputs | One image per request. | One request per image |
width, height, image_size, size, resolution | The size follows the aspect ratio. | aspect_ratio |
guidance_scale | Named differently here. | cfg |
steps, num_inference_steps | The number of steps is fixed by the model. | — |
mask, mask_url | There is no inpainting mode on this API. | — |
model, version | This 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.
| Parameter | When the request fails |
|---|---|
prompt | The 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the image (one entry). |
| output.media_type | string | The image's MIME type, for example image/webp. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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
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-imageAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | 1 to 10,000 characters |
| What the new image should show. | ||||
image_url | Yesrequired | string | — | public http(s) URL of a JPEG, PNG or WebP image |
| The image to start from. The result takes its shape. | ||||
prompt_strength | No | number | 0.85 | 0 to 1 |
| How much to change the image: lower values stay closer to it, 1 replaces it. | ||||
negative_prompt | No | string | — | up to 10,000 characters |
| What to leave out of the image. | ||||
cfg | No | number | 1 | 1 to 10 |
| How closely the image follows the prompt. Higher values follow it more strictly. | ||||
seed | No | integer | random | 0 to 4,294,967,294 |
| Send the same seed with the same inputs to repeat a result. | ||||
output_format | No | string | webp | webp, 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.
| Parameter | Why | Use instead |
|---|---|---|
aspect_ratio | The result takes the shape of the input image. | Crop the input image to the shape you want |
image, image_urls | The image goes in one field. | image_url |
n, count, batch_size, num_images, number_of_images, num_outputs | One image per request. | One request per image |
width, height, image_size, size, resolution | The size follows the aspect ratio. | The input image's shape |
guidance_scale | Named differently here. | cfg |
steps, num_inference_steps | The number of steps is fixed by the model. | — |
mask, mask_url | There is no inpainting mode on this API. | — |
model, version | This 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.
| Parameter | When the request fails |
|---|---|
image_url | The image cannot be downloaded or is not a usable image. |
prompt | The 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the image (one entry). |
| output.media_type | string | The image's MIME type, for example image/webp. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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
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-imageAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | 1 to 10,000 characters |
| What to draw. | ||||
aspect_ratio | No | string | 1:1 | 1: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_prompt | No | string | — | up to 10,000 characters |
| What to leave out of the image. | ||||
cfg | No | number | 5 | 1 to 10 |
| How closely the image follows the prompt. Higher values follow it more strictly. | ||||
seed | No | integer | random | 0 to 4,294,967,294 |
| Send the same seed with the same inputs to repeat a result. | ||||
output_format | No | string | webp | webp, 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.
| Parameter | Why | Use instead |
|---|---|---|
image_url, prompt_strength | This 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_outputs | One image per request. | One request per image |
width, height, image_size, size, resolution | The size follows the aspect ratio. | aspect_ratio |
guidance_scale | Named differently here. | cfg |
steps, num_inference_steps | The number of steps is fixed by the model. | — |
mask, mask_url | There is no inpainting mode on this API. | — |
model, version | This 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.
| Parameter | When the request fails |
|---|---|
prompt | The 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the image (one entry). |
| output.media_type | string | The image's MIME type, for example image/webp. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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
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-imageAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | 1 to 10,000 characters |
| What the new image should show. | ||||
image_url | Yesrequired | string | — | public http(s) URL of a JPEG, PNG or WebP image |
| The image to start from. The result takes its shape. | ||||
prompt_strength | No | number | 0.85 | 0 to 1 |
| How much to change the image: lower values stay closer to it, 1 replaces it. | ||||
negative_prompt | No | string | — | up to 10,000 characters |
| What to leave out of the image. | ||||
cfg | No | number | 5 | 1 to 10 |
| How closely the image follows the prompt. Higher values follow it more strictly. | ||||
seed | No | integer | random | 0 to 4,294,967,294 |
| Send the same seed with the same inputs to repeat a result. | ||||
output_format | No | string | webp | webp, 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.
| Parameter | Why | Use instead |
|---|---|---|
aspect_ratio | The result takes the shape of the input image. | Crop the input image to the shape you want |
image, image_urls | The image goes in one field. | image_url |
n, count, batch_size, num_images, number_of_images, num_outputs | One image per request. | One request per image |
width, height, image_size, size, resolution | The size follows the aspect ratio. | The input image's shape |
guidance_scale | Named differently here. | cfg |
steps, num_inference_steps | The number of steps is fixed by the model. | — |
mask, mask_url | There is no inpainting mode on this API. | — |
model, version | This 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.
| Parameter | When the request fails |
|---|---|
image_url | The image cannot be downloaded or is not a usable image. |
prompt | The 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the image (one entry). |
| output.media_type | string | The image's MIME type, for example image/webp. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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
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-imageAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | 1 to 10,000 characters |
| What to draw. | ||||
aspect_ratio | No | string | 1:1 | 1: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_prompt | No | string | — | up to 10,000 characters |
| What to leave out of the image. | ||||
cfg | No | number | 5 | 1 to 10 |
| How closely the image follows the prompt. Higher values follow it more strictly. | ||||
seed | No | integer | random | 0 to 4,294,967,294 |
| Send the same seed with the same inputs to repeat a result. | ||||
output_format | No | string | webp | webp, 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.
| Parameter | Why | Use instead |
|---|---|---|
image_url, prompt_strength | This 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_outputs | One image per request. | One request per image |
width, height, image_size, size, resolution | The size follows the aspect ratio. | aspect_ratio |
guidance_scale | Named differently here. | cfg |
steps, num_inference_steps | The number of steps is fixed by the model. | — |
mask, mask_url | There is no inpainting mode on this API. | — |
model, version | This 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.
| Parameter | When the request fails |
|---|---|
prompt | The 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the image (one entry). |
| output.media_type | string | The image's MIME type, for example image/webp. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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
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-imageAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | 1 to 10,000 characters |
| What the new image should show. | ||||
image_url | Yesrequired | string | — | public http(s) URL of a JPEG, PNG or WebP image |
| The image to start from. The result takes its shape. | ||||
prompt_strength | No | number | 0.85 | 0 to 1 |
| How much to change the image: lower values stay closer to it, 1 replaces it. | ||||
negative_prompt | No | string | — | up to 10,000 characters |
| What to leave out of the image. | ||||
cfg | No | number | 5 | 1 to 10 |
| How closely the image follows the prompt. Higher values follow it more strictly. | ||||
seed | No | integer | random | 0 to 4,294,967,294 |
| Send the same seed with the same inputs to repeat a result. | ||||
output_format | No | string | webp | webp, 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.
| Parameter | Why | Use instead |
|---|---|---|
aspect_ratio | The result takes the shape of the input image. | Crop the input image to the shape you want |
image, image_urls | The image goes in one field. | image_url |
n, count, batch_size, num_images, number_of_images, num_outputs | One image per request. | One request per image |
width, height, image_size, size, resolution | The size follows the aspect ratio. | The input image's shape |
guidance_scale | Named differently here. | cfg |
steps, num_inference_steps | The number of steps is fixed by the model. | — |
mask, mask_url | There is no inpainting mode on this API. | — |
model, version | This 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.
| Parameter | When the request fails |
|---|---|
image_url | The image cannot be downloaded or is not a usable image. |
prompt | The 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the image (one entry). |
| output.media_type | string | The image's MIME type, for example image/webp. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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
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/inpaintAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | 1 to 10,000 characters |
| What to paint into the white area of the mask. | ||||
image_url | Yesrequired | string | — | public http(s) URL of a JPEG, PNG or WebP image |
The picture to edit. It is resized to width x height. | ||||
mask_url | Yesrequired | string | — | 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_prompt | No | string | — | up to 10,000 characters |
| What to leave out of the repainted area. | ||||
width | No | integer | 512 | 64, 128, 192 … 1024 (multiples of 64) |
| Width of the result in pixels. | ||||
height | No | integer | 512 | 64, 128, 192 … 1024 (multiples of 64) |
| Height of the result in pixels. | ||||
num_inference_steps | No | integer | 50 | 1 to 100 |
| Denoising steps. More steps can add detail and take longer. | ||||
guidance_scale | No | number | 7.5 | 1 to 20 |
| How closely the result follows the prompt. Higher values follow it more strictly. | ||||
scheduler | No | string | DPMSolverMultistep | DDIM, K_EULER, DPMSolverMultistep, K_EULER_ANCESTRAL, PNDM, KLMS |
| The sampling method. | ||||
seed | No | integer | random | 0 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.
| Parameter | Why | Use instead |
|---|---|---|
n, count, batch_size, num_images, number_of_images, num_outputs | One image per request. | One request per image |
duration, seconds, num_frames, frames_per_second | The charge follows the time the model runs. | — |
image, mask, image_urls | Named differently here. | image_url, mask_url |
aspect_ratio, image_size, size, resolution | The size is set in pixels. | width, height |
cfg, steps | Named differently here. | guidance_scale, num_inference_steps |
strength, prompt_strength | The masked area is repainted in full. | — |
output_format, format | The result is always a PNG. | — |
disable_safety_checker | The safety checker is always on. | — |
model, version | This 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.
| Parameter | When the request fails |
|---|---|
image_url, mask_url | An image cannot be downloaded or is not a usable image. |
prompt | The 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the image (one entry). |
| output.media_type | string | The image's MIME type, image/png. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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
⚡ 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).
〰 Uptime
Percent of generations that succeeded over the selected period, per model version.