Stable Diffusion 3.5 API, Stable Diffusion 3.0, 1.5, 1.0 Turbo, 1.0 (Free) API: Pricing, Documentation
by Stability AI
Stable Diffusion 3.5 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
WELCOME BONUS
Get $5 Free Credit on First Payment
No strings attached — add funds and get $5 bonus instantly
Stable Diffusion v3.5 API Documentation
https://gateway.pixazo.ai/sd3-5/v1/r-sd-3-5-large
Get Image - Stable Diffusion 3.5 large API
Request Code
POST https://gateway.pixazo.ai/sd3-5/v1/r-sd-3-5-large
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: your-subscription-key
{
"prompt": "~*~aesthetic~*~ #boho #fashion, full-body 30-something woman laying on microfloral grass, candid pose, overlay reads Stable Diffusion 3.5, cheerful cursive typography font",
"aspect_ratio": "1:1",
"cfg": 4.5,
"steps": 40,
"output_format": "webp",
"output_quality": 90,
"prompt_strength": 0.85
}
import requests
url = "https://gateway.pixazo.ai/sd3-5/v1/r-sd-3-5-large"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "your-subscription-key"
}
data = {
"prompt": "~*~aesthetic~*~ #boho #fashion, full-body 30-something woman laying on microfloral grass, candid pose, overlay reads Stable Diffusion 3.5, cheerful cursive typography font",
"aspect_ratio": "1:1",
"cfg": 4.5,
"steps": 40,
"output_format": "webp",
"output_quality": 90,
"prompt_strength": 0.85
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/sd3-5/v1/r-sd-3-5-large';
const data = {
prompt: "~*~aesthetic~*~ #boho #fashion, full-body 30-something woman laying on microfloral grass, candid pose, overlay reads Stable Diffusion 3.5, cheerful cursive typography font",
aspect_ratio: "1:1",
cfg: 4.5,
steps: 40,
output_format: "webp",
output_quality: 90,
prompt_strength: 0.85
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'your-subscription-key'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/sd3-5/v1/r-sd-3-5-large" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: your-subscription-key" \
--data-raw '{
"prompt": "~*~aesthetic~*~ #boho #fashion, full-body 30-something woman laying on microfloral grass, candid pose, overlay reads Stable Diffusion 3.5, cheerful cursive typography font",
"aspect_ratio": "1:1",
"cfg": 4.5,
"steps": 40,
"output_format": "webp",
"output_quality": 90,
"prompt_strength": 0.85
}'
Output
{
"id": "j8qc0mvk8drmy0cxe4wvcy8ajw",
"status": "succeeded",
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/sd-3-5-large/prompt-1775721091831-439186.webp"
}
Request Parameters - Get Image
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | The text prompt describing the desired image |
| aspect_ratio | Yes | string | — | — | Aspect ratio of the output image (e.g., "1:1", "16:9") |
| cfg | Yes | number | — | — | Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. |
| steps | Yes | number | — | — | Number of refinement steps used during generation (20-100). More steps improve quality but take longer. |
| output_format | Yes | string | — | — | Output format: "webp", "jpg", "png", "jpeg" |
| output_quality | Yes | number | — | — | Compression quality of the saved file, from 0 (smallest file, lowest quality) to 100 (largest file, best quality). No effect on lossless formats like PNG. |
| prompt_strength | Yes | number | — | — | How much the result may differ from the input. Higher values allow bigger changes from the source; lower values keep the output closer to the original. |
Example Request
{
"prompt": "~*~aesthetic~*~ #boho #fashion, full-body 30-something woman laying on microfloral grass, candid pose, overlay reads Stable Diffusion 3.5, cheerful cursive typography font",
"aspect_ratio": "1:1",
"cfg": 4.5,
"steps": 40,
"output_format": "webp",
"output_quality": 90,
"prompt_strength": 0.85
}
Response
{
"id": "j8qc0mvk8drmy0cxe4wvcy8ajw",
"status": "succeeded",
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/sd-3-5-large/prompt-1775721091831-439186.webp"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | your-subscription-key |
Response Handling
Common status codes for Get Image.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Stable Diffusion v3.5 API Pricing
Your request will cost $0.20 per image.
Free during preview — fair-use rate limit of 60 requests/minute applies. See terms.
2. Stable Diffusion v3
Stable Diffusion v3 API Documentation
https://gateway.pixazo.ai/sd3/v1/getData
Get Data - Stable Diffusion 3 API
Request Code
POST https://gateway.pixazo.ai/sd3/v1/getData
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Picture a sleek, futuristic car racing through a neon-lit cityscape, its engine humming efficiently as it blurs past digital billboards. The driver skillfully navigates the glowing streets, aiming for victory in this high-tech, adrenaline-fueled race of tomorrow.",
"negativePrompt": "dark, blurry",
"steps": 28,
"cfg": 4.0,
"aspect_ratio": "3:2",
"output_format": "jpg",
"output_quality": 90,
"prompt_strength": 0.85
}
import requests
url = "https://gateway.pixazo.ai/sd3/v1/getData"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Picture a sleek, futuristic car racing through a neon-lit cityscape, its engine humming efficiently as it blurs past digital billboards. The driver skillfully navigates the glowing streets, aiming for victory in this high-tech, adrenaline-fueled race of tomorrow.",
"negativePrompt": "dark, blurry",
"steps": 28,
"cfg": 4.0,
"aspect_ratio": "3:2",
"output_format": "jpg",
"output_quality": 90,
"prompt_strength": 0.85
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/sd3/v1/getData';
const data = {
prompt: "Picture a sleek, futuristic car racing through a neon-lit cityscape, its engine humming efficiently as it blurs past digital billboards. The driver skillfully navigates the glowing streets, aiming for victory in this high-tech, adrenaline-fueled race of tomorrow.",
negativePrompt: "dark, blurry",
steps: 28,
cfg: 4.0,
aspect_ratio: "3:2",
output_format: "jpg",
output_quality: 90,
prompt_strength: 0.85
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/sd3/v1/getData" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
-d '{
"prompt": "Picture a sleek, futuristic car racing through a neon-lit cityscape, its engine humming efficiently as it blurs past digital billboards. The driver skillfully navigates the glowing streets, aiming for victory in this high-tech, adrenaline-fueled race of tomorrow.",
"negativePrompt": "dark, blurry",
"steps": 28,
"cfg": 4.0,
"aspect_ratio": "3:2",
"output_format": "jpg",
"output_quality": 90,
"prompt_strength": 0.85
}'
Output
{
"output": "https://example.com/image.jpg"
}
Request Parameters - Get Data
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | The text query that instructs the AI model on what kind of content to generate. In this case, "womens street skateboarding final in Paris Olympics 2024." |
| negativePrompt | No | string | — | — | Negative prompts do not really work in SD3. Using a negative prompt will change your output in unpredictable ways. |
| steps | No | integer | 28 | 1–28 | The number of steps for the transformation process. Default: 28, (minimum: 1, maximum: 28) |
| cfg | No | decimal | 3.5 | 0–20 | Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. |
| aspect_ratio | No | string | 1:1 | — | The aspect ratio of your output image. This value is ignored if you are using an input image. Default: "1:1" |
| output_format | No | string | webp | — | Format of the output images. Default: "webp" |
| output_quality | No | integer | 90 | 0–100 | Compression quality of the saved file, from 0 (smallest file, lowest quality) to 100 (largest file, best quality). No effect on lossless formats like PNG. |
| prompt_strength | No | decimal | 0.85 | 0–1 | How much the result may differ from the input. Higher values allow bigger changes from the source; lower values keep the output closer to the original. |
Example Request
{
"prompt": "Picture a sleek, futuristic car racing through a neon-lit cityscape, its engine humming efficiently as it blurs past digital billboards. The driver skillfully navigates the glowing streets, aiming for victory in this high-tech, adrenaline-fueled race of tomorrow.",
"negativePrompt": "dark, blurry",
"steps": 28,
"cfg": 4.0,
"aspect_ratio": "3:2",
"output_format": "jpg",
"output_quality": 90,
"prompt_strength": 0.85
}
Response
{
"output": "https://example.com/image.jpg"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes for Get Data.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Stable Diffusion v3 API Pricing
Your request will cost $0.20 per image.
3. Stable Diffusion XL v1.0
Stable Diffusion XL v1.0 API Documentation
https://gateway.pixazo.ai/getImage/v1/getSDXLImage
Get Image - Stable Diffusion XL Base 1.0 API
Request Code
POST https://gateway.pixazo.ai/getImage/v1/getSDXLImage
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
"negative_prompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance_scale": 5,
"seed": 40
}
import requests
url = "https://gateway.pixazo.ai/getImage/v1/getSDXLImage"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
"negative_prompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance_scale": 5,
"seed": 40
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/getImage/v1/getSDXLImage';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
prompt: 'High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.',
negative_prompt: 'Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.',
height: 1024,
width: 1024,
num_steps: 20,
guidance_scale: 5,
seed: 40
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/getImage/v1/getSDXLImage" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
"negative_prompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance_scale": 5,
"seed": 40
}'
Output
{
"imageUrl": ""
}
Request Parameters - Get Image
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | String | — | — | The main instruction for the image generation |
| negative_prompt | No | String | — | — | A prompt to specify what should be avoided in the image |
| height | No | Integer | 1024 | 512 – 1536 | The height of the output image, in pixels. |
| width | No | Integer | 1024 | 512 – 1536 | The width of the output image, in pixels. Recommended sizes: 1024×1024, 1280×720, 1344×768. |
| num_steps | No | Integer | 20 | 1 – 20 | Number of denoising steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. Maximum: 20 — values above 20 are rejected with an error. |
| guidance_scale | No | Integer | 5 | 1 – 15 | Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. Typical range 5–8. |
| seed | No | Integer | Random | Any integer | Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time. |
Example Request
{
"prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
"negative_prompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance_scale": 5,
"seed": 40
}
Response
{
"imageUrl": ""
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes for Get Image.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Stable Diffusion XL v1.0 API Pricing
Your request is Free
Free during preview — fair-use rate limit of 60 requests/minute applies. See terms.
4. Stable Diffusion XL Lightning
Stable Diffusion XL Lightning API Documentation
https://gateway.pixazo.ai/sdxl_lightning/getImage/v1/getSDXLImage
Get Image - Stable Diffusion XL Lightning API
Request Code
POST https://gateway.pixazo.ai/sdxl_lightning/getImage/v1/getSDXLImage
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
"negativePrompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance": 5,
"seed": 42
}
import requests
url = "https://gateway.pixazo.ai/sdxl_lightning/getImage/v1/getSDXLImage"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
"negativePrompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance": 5,
"seed": 42
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
fetch('https://gateway.pixazo.ai/sdxl_lightning/getImage/v1/getSDXLImage', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
},
body: JSON.stringify({
prompt: "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
negativePrompt: "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
height: 1024,
width: 1024,
num_steps: 20,
guidance: 5,
seed: 42
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/sdxl_lightning/getImage/v1/getSDXLImage" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
"negativePrompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance": 5,
"seed": 42
}'
Output
{
"imageUrl": ""
}
Request Parameters - Get Image
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | String | — | — | The main instruction for the image generation |
| negativePrompt | No | String | — | — | A prompt to specify what should be avoided in the image |
| height | No | Integer | — | — | The height of the output image (e.g., 1024) |
| width | No | Integer | — | — | The width of the output image (e.g., 1024) |
| num_steps | No | Integer | — | — | Number of denoising steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. |
| guidance | No | Integer | — | — | Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. |
| seed | No | Integer | — | — | Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time. |
Example Request
{
"prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
"negativePrompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance": 5,
"seed": 42
}
Response
{
"imageUrl": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/sdxl_lightning/prompt-355182775-1724841428119-422172.png"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes for Get Image.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Stable Diffusion XL Lightning API Pricing
Your request is Free
Free during preview — fair-use rate limit of 60 requests/minute applies. See terms.
Text to Image (Stream)
Stable Diffusion XL Lightning API Documentation
https://gateway.pixazo.ai/sdxl_lightning/getImage/v1/getSDXLImageStream
Get Image Stream - Stable Diffusion XL Lightning API
Request Code
POST https://gateway.pixazo.ai/sdxl_lightning/getImage/v1/getSDXLImageStream
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
"negativePrompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance": 5,
"seed": 42
}
import requests
url = "https://gateway.pixazo.ai/sdxl_lightning/getImage/v1/getSDXLImageStream"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
"negativePrompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance": 5,
"seed": 42
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/sdxl_lightning/getImage/v1/getSDXLImageStream";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
};
const data = {
"prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
"negativePrompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance": 5,
"seed": 42
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
curl -v -X POST "https://gateway.pixazo.ai/sdxl_lightning/getImage/v1/getSDXLImageStream" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
"negativePrompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance": 5,
"seed": 42
}'
Output
{
"imageUrl": "https://example.com/image.jpg"
}
Request Parameters - Get Image Stream
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | String | — | — | The main instruction for the image generation |
| negativePrompt | No | String | — | — | A prompt to specify what should be avoided in the image |
| height | No | Integer | — | — | The height of the output image (e.g., 1024) |
| width | No | Integer | — | — | The width of the output image (e.g., 1024) |
| num_steps | No | Integer | — | — | Number of denoising steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. |
| guidance | No | Integer | — | — | Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. |
| seed | No | Integer | — | — | Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time. |
Example Request
{
"prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
"negativePrompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance": 5,
"seed": 42
}
Response
{
"imageUrl": "https://example.com/image.jpg"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes for Get Image Stream.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Stable Diffusion XL Lightning API Pricing
Your request is Free
Free during preview — fair-use rate limit of 60 requests/minute applies. See terms.
5. Stable Diffusion Inpainting
Stable Diffusion Inpainting API Documentation
https://gateway.pixazo.ai/inpainting/v1/getImage
Get Image - Stable Diffusion-v1-5 Inpainting API
Request Code
POST https://gateway.pixazo.ai/inpainting/v1/getImage
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Change to a lion",
"imageUrl": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png",
"maskUrl": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png",
"negative_prompt": "watermark",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance": 5,
"seed": 42
}
import requests
url = "https://gateway.pixazo.ai/inpainting/v1/getImage"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Change to a lion",
"imageUrl": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png",
"maskUrl": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png",
"negative_prompt": "watermark",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance": 5,
"seed": 42
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/inpainting/v1/getImage';
const data = {
prompt: 'Change to a lion',
imageUrl: 'https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png',
maskUrl: 'https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png',
negative_prompt: 'watermark',
height: 1024,
width: 1024,
num_steps: 20,
guidance: 5,
seed: 42
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/inpainting/v1/getImage" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "Change to a lion",
"imageUrl": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png",
"maskUrl": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png",
"negative_prompt": "watermark",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance": 5,
"seed": 42
}'
Output
{
"imageUrl": ""
}
Request Parameters - Get Image
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | String | — | — | The main instruction for the image transformation |
| imageUrl | No | URL | — | — | The URL of the initial image to be transformed |
| maskUrl | No | URL | — | — | The URL of the mask image |
| negativePrompt | No | String | — | — | A prompt to specify what should be avoided in the image |
| height | No | Integer | — | — | The height of the output image (e.g., 1024) |
| width | No | Integer | — | — | The width of the output image (e.g., 1024) |
| num_steps | No | Integer | — | — | Number of denoising steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. |
| guidance | No | Integer | — | — | Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. |
| seed | No | Integer | — | — | Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG, WEBP | Image + mask (area to inpaint). |
Example Request
{
"prompt": "Change to a lion",
"imageUrl": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png",
"maskUrl": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png",
"negative_prompt": "watermark",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance": 5,
"seed": 42
}
Response
{
"imageUrl": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/sdxl_lightning/prompt-355182775-1724841428119-422172.png"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes for Get Image.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Stable Diffusion Inpainting API Pricing
Your request is Free
Free during preview — fair-use rate limit of 60 requests/minute applies. See terms.
Text to Image (Stream)
Stable Diffusion Inpainting API Documentation
https://gateway.pixazo.ai/inpainting/v1/getImageStream
Get Image Stream - Stable Diffusion-v1-5 Inpainting API
Request Code
POST https://gateway.pixazo.ai/inpainting/v1/getImageStream
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Change to a lion"
}
import requests
url = "https://gateway.pixazo.ai/inpainting/v1/getImageStream"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Change to a lion"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/inpainting/v1/getImageStream';
const data = {
prompt: 'Change to a lion'
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/inpainting/v1/getImageStream" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "Change to a lion"
}'
Output
{
"imageUrl": ""
}
Request Parameters - Get Image Stream
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | String | — | — | The main instruction for the image transformation |
| imageUrl | No | URL | — | — | The URL of the initial image to be transformed |
| maskUrl | No | URL | — | — | The URL of the mask image |
| negativePrompt | No | String | — | — | A prompt to specify what should be avoided in the image |
| height | No | Integer | — | — | The height of the output image (e.g., 1024) |
| width | No | Integer | — | — | The width of the output image (e.g., 1024) |
| num_steps | No | Integer | — | — | Number of denoising steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. |
| guidance | No | Integer | — | — | Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. |
| seed | No | Integer | — | — | Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG, WEBP | Image + mask (area to inpaint). |
Example Request
{
"prompt": "Change to a lion",
"imageUrl": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png",
"maskUrl": "https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png",
"negativePrompt": "watermark",
"height": 1024,
"width": 1024,
"num_steps": 20,
"guidance": 5,
"seed": 42
}
Response
{
"imageUrl": "https://example.com/generated-image-12345.png"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes for Get Image Stream.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Stable Diffusion Inpainting API Pricing
Your request is Free
Free during preview — fair-use rate limit of 60 requests/minute applies. See terms.