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 | — | — | Text prompt describing the image you want to generate. |
| negative_prompt | No | string | — | — | What you do not want to see in the image. |
| image | No | string (URL) | — | Publicly accessible image URL | Input image for image-to-image mode. When supplied, the output matches this image's aspect ratio. |
| aspect_ratio | No | string | 1:1 | 1:1, 16:9, 21:9, 2:3, 3:2, 4:5, 5:4, 9:16, 9:21 | Aspect ratio of the output image. Ignored when an input image is supplied. |
| cfg | No | number | 5 | 1 - 10 | Guidance scale — how closely the output follows your prompt. Higher values stick more strictly to the prompt; lower values allow more creative variation. |
| steps | No | integer | 35 | 1 - 50 | Number of sampler steps to run during generation. More steps can improve quality but take longer. |
| prompt_strength | No | number | 0.85 | 0 - 1 | Prompt (denoising) strength for image-to-image. 1.0 fully replaces the information in the input image; lower values keep the output closer to it. Used only when an input image is supplied. |
| seed | No | integer | Random | — | Set a seed for reproducible results. Random by default. |
| output_format | No | string | webp | webp, jpg, png | Format of the output image. |
| 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 such as PNG. |
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 | — | — | Text description of the image to generate. Be specific about subject, style, lighting and composition for the best results. |
| negativePrompt | No | string | — | — | Text describing what you do not want to see in the image (sent upstream as Replicate’s negative_prompt). Note: negative prompts do not really work in SD3 — using one will change your output in unpredictable ways. |
| steps | No | integer | 28 | 1–28 | Number of steps to run the sampler for. Higher values can add detail but take longer to generate. |
| cfg | No | decimal | 3.5 | 0–20 | Guidance scale — tells the model how closely the output should follow your prompt. Higher values stick more strictly to the prompt; lower values allow more creative variation. |
| aspect_ratio | No | string | 1:1 | 1:1, 16:9, 21:9, 3:2, 2:3, 4:5, 5:4, 9:16, 9:21 | The aspect ratio of your output image. This value is ignored if you are using an input image. |
| output_format | No | string | webp | webp, jpg, png | Format of the output image. |
| output_quality | No | integer | 90 | 0–100 | Quality of the output image, from 0 (lowest quality, smallest file) to 100 (best quality). |
| prompt_strength | No | decimal | 0.85 | 0–1 | Prompt strength (denoising strength) used in image-to-image mode. Higher values allow bigger changes from the source image; 1.0 corresponds to full destruction of information in the input image. |
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 | — | Minimum 1 character | Text description of the image you want to generate. Be specific about subject, style, lighting and composition for the best results. |
| negative_prompt | No | String | — | — | Text describing elements to avoid in the generated image (for example: blurry, extra limbs, text, watermark). |
| height | No | Integer | 1024 | 256 – 2048 | Height of the generated image, in pixels. Values outside 256–2048 are rejected. The model is trained at 1024×1024 — sizes far from that can reduce quality. |
| width | No | Integer | 1024 | 256 – 2048 | Width of the generated image, in pixels. Values outside 256–2048 are rejected. Recommended sizes: 1024×1024, 1152×896, 1344×768. |
| num_steps | No | Integer | 20 | 1 – 20 | Number of diffusion steps the model runs while generating. Higher values can improve detail and quality but take longer. Maximum: 20 — values above 20 are rejected with an error. |
| guidance_scale | No | Number | 7.5 | Any positive number (typical 5 – 10) | Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. Maps to the model's guidance setting, whose default is 7.5. |
| 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 image; omit it for a different result 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 | — | Min. 1 character | A text description of the image you want to generate. |
| negativePrompt | No | String | — | — | Text describing elements to avoid in the generated image. |
| height | No | Integer | 1024 | 256 – 2048 | The height of the generated image, in pixels. |
| width | No | Integer | 1024 | 256 – 2048 | The width of the generated image, in pixels. Recommended size: 1024×1024. |
| num_steps | No | Integer | 20 | 1 – 20 | Number of diffusion steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. Maximum: 20 — SDXL Lightning is a distilled few-step model, so values above 20 are rejected. |
| guidance | No | Number | 7.5 | Any positive 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. Accepts decimals (e.g. 7.5); typical range 1–15. |
| 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.",
"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 | — | Min. 1 character | A text description of the image you want to generate. |
| negativePrompt | No | String | — | — | Text describing elements to avoid in the generated image. |
| height | No | Integer | 1024 | 256 – 2048 | The height of the generated image, in pixels. |
| width | No | Integer | 1024 | 256 – 2048 | The width of the generated image, in pixels. Recommended size: 1024×1024. |
| num_steps | No | Integer | 20 | 1 – 20 | Number of diffusion steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. Maximum: 20 — SDXL Lightning is a distilled few-step model, so values above 20 are rejected. |
| guidance | No | Number | 7.5 | Any positive 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. Accepts decimals (e.g. 7.5); typical range 1–15. |
| 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.",
"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 | — | Non-empty text (min. 1 character) | Text description of what should appear in the masked area (or of the whole image when no mask is supplied). |
| imageUrl | No | URL | — | Publicly reachable JPG, PNG or WEBP URL | URL of the source image to inpaint. Required for inpainting — omit it (together with maskUrl) to run a plain text-to-image generation. |
| maskUrl | No | URL | — | Publicly reachable JPG, PNG or WEBP URL | URL of the mask image marking the region to repaint. White (light) pixels are regenerated from the prompt; black pixels are kept unchanged. Should match the dimensions of imageUrl. |
| negative_prompt | No | String | — | — | Text describing elements to avoid in the generated image (for example: watermark, blurry, text). |
| height | No | Integer | — | 256–2048 | Height of the generated image, in pixels. |
| width | No | Integer | — | 256–2048 | Width of the generated image, in pixels. |
| num_steps | No | Integer | 20 | 1–20 | Number of diffusion steps the model runs while generating. Higher values refine detail and quality but increase processing time; the model caps this at 20. |
| guidance | No | Number | 7.5 | — | 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 values are 5–10. |
| seed | No | Integer | — | 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. |
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 | — | Non-empty text (min. 1 character) | Text description of what should appear in the masked area (or of the whole image when no mask is supplied). |
| imageUrl | No | URL | — | Publicly reachable JPG, PNG or WEBP URL | URL of the source image to inpaint. Required for inpainting — omit it (together with maskUrl) to run a plain text-to-image generation. |
| maskUrl | No | URL | — | Publicly reachable JPG, PNG or WEBP URL | URL of the mask image marking the region to repaint. White (light) pixels are regenerated from the prompt; black pixels are kept unchanged. Should match the dimensions of imageUrl. |
| negative_prompt | No | String | — | — | Text describing elements to avoid in the generated image (for example: watermark, blurry, text). |
| height | No | Integer | — | 256–2048 | Height of the generated image, in pixels. |
| width | No | Integer | — | 256–2048 | Width of the generated image, in pixels. |
| num_steps | No | Integer | 20 | 1–20 | Number of diffusion steps the model runs while generating. Higher values refine detail and quality but increase processing time; the model caps this at 20. |
| guidance | No | Number | 7.5 | — | 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 values are 5–10. |
| seed | No | Integer | — | 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. |
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.