Pixazo APIModelsImage to Image APIStable Diffusion
Pixazo APIModelsImage to Image APIStable Diffusion

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.

Get API Key
Stable Diffusion API

Models Version

WELCOME BONUS

Get $5 Free Credit on First Payment

No strings attached — add funds and get $5 bonus instantly

Claim Your $5 →

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

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstringText prompt describing the image you want to generate.
negative_promptNostringWhat you do not want to see in the image.
imageNostring (URL)Publicly accessible image URLInput image for image-to-image mode. When supplied, the output matches this image's aspect ratio.
aspect_ratioNostring1:11:1, 16:9, 21:9, 2:3, 3:2, 4:5, 5:4, 9:16, 9:21Aspect ratio of the output image. Ignored when an input image is supplied.
cfgNonumber51 - 10Guidance scale — how closely the output follows your prompt. Higher values stick more strictly to the prompt; lower values allow more creative variation.
stepsNointeger351 - 50Number of sampler steps to run during generation. More steps can improve quality but take longer.
prompt_strengthNonumber0.850 - 1Prompt (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.
seedNointegerRandomSet a seed for reproducible results. Random by default.
output_formatNostringwebpwebp, jpg, pngFormat of the output image.
output_qualityNointeger900 - 100Compression 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-Keyyour-subscription-key

Response Handling

Common status codes for Get Image.

Code Meaning
200 Success
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
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

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstringText description of the image to generate. Be specific about subject, style, lighting and composition for the best results.
negativePromptNostringText 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.
stepsNointeger281–28Number of steps to run the sampler for. Higher values can add detail but take longer to generate.
cfgNodecimal3.50–20Guidance 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_ratioNostring1:11:1, 16:9, 21:9, 3:2, 2:3, 4:5, 5:4, 9:16, 9:21The aspect ratio of your output image. This value is ignored if you are using an input image.
output_formatNostringwebpwebp, jpg, pngFormat of the output image.
output_qualityNointeger900–100Quality of the output image, from 0 (lowest quality, smallest file) to 100 (best quality).
prompt_strengthNodecimal0.850–1Prompt 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes for Get Data.

Code Meaning
200 Success
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
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

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesStringMinimum 1 characterText description of the image you want to generate. Be specific about subject, style, lighting and composition for the best results.
negative_promptNoStringText describing elements to avoid in the generated image (for example: blurry, extra limbs, text, watermark).
heightNoInteger1024256 – 2048Height 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.
widthNoInteger1024256 – 2048Width of the generated image, in pixels. Values outside 256–2048 are rejected. Recommended sizes: 1024×1024, 1152×896, 1344×768.
num_stepsNoInteger201 – 20Number 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_scaleNoNumber7.5Any 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.
seedNoIntegerRandomAny integerRandom 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes for Get Image.

Code Meaning
200 Success
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
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

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesStringMin. 1 characterA text description of the image you want to generate.
negativePromptNoStringText describing elements to avoid in the generated image.
heightNoInteger1024256 – 2048The height of the generated image, in pixels.
widthNoInteger1024256 – 2048The width of the generated image, in pixels. Recommended size: 1024×1024.
num_stepsNoInteger201 – 20Number 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.
guidanceNoNumber7.5Any positive numberControls 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.
seedNoIntegerRandomAny integerRandom 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes for Get Image.

Code Meaning
200 Success
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
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

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesStringMin. 1 characterA text description of the image you want to generate.
negativePromptNoStringText describing elements to avoid in the generated image.
heightNoInteger1024256 – 2048The height of the generated image, in pixels.
widthNoInteger1024256 – 2048The width of the generated image, in pixels. Recommended size: 1024×1024.
num_stepsNoInteger201 – 20Number 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.
guidanceNoNumber7.5Any positive numberControls 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.
seedNoIntegerRandomAny integerRandom 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes for Get Image Stream.

Code Meaning
200 Success
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
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

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesStringNon-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).
imageUrlNoURLPublicly reachable JPG, PNG or WEBP URLURL of the source image to inpaint. Required for inpainting — omit it (together with maskUrl) to run a plain text-to-image generation.
maskUrlNoURLPublicly reachable JPG, PNG or WEBP URLURL 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_promptNoStringText describing elements to avoid in the generated image (for example: watermark, blurry, text).
heightNoInteger256–2048Height of the generated image, in pixels.
widthNoInteger256–2048Width of the generated image, in pixels.
num_stepsNoInteger201–20Number of diffusion steps the model runs while generating. Higher values refine detail and quality but increase processing time; the model caps this at 20.
guidanceNoNumber7.5Controls 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.
seedNoIntegerAny integerRandom 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

TypeMaxFormat / SizeDescription
image1JPG, PNG, WEBPImage + 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes for Get Image.

Code Meaning
200 Success
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
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

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesStringNon-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).
imageUrlNoURLPublicly reachable JPG, PNG or WEBP URLURL of the source image to inpaint. Required for inpainting — omit it (together with maskUrl) to run a plain text-to-image generation.
maskUrlNoURLPublicly reachable JPG, PNG or WEBP URLURL 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_promptNoStringText describing elements to avoid in the generated image (for example: watermark, blurry, text).
heightNoInteger256–2048Height of the generated image, in pixels.
widthNoInteger256–2048Width of the generated image, in pixels.
num_stepsNoInteger201–20Number of diffusion steps the model runs while generating. Higher values refine detail and quality but increase processing time; the model caps this at 20.
guidanceNoNumber7.5Controls 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.
seedNoIntegerAny integerRandom 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

TypeMaxFormat / SizeDescription
image1JPG, PNG, WEBPImage + 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes for Get Image Stream.

Code Meaning
200 Success
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
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.