SDXL 1.0 API, SDXL Turbo, 1.0 Lightning (Free) API: Pricing, Documentation

by Stability AI

SDXL 1.0 API, developers can access SDXL variants including Lightning and Turbo for different speed and quality tradeoffs. The API supports the widely-adopted SDXL ecosystem, ensuring compatibility with existing workflows and fine-tuned models.

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

SDXL Turbo API Documentation

https://gateway.pixazo.ai/sdxlTurbo/v2/getData

SDXL Turbo Get Image - Stable Diffusion XL Turbo V2 API

Request Code

POST https://gateway.pixazo.ai/sdxlTurbo/v2/getData
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "Create a detailed illustration of a sparrow perched on a branch. The bird should be depicted with its distinctive brown and gray feathers, a small beak, and bright, curious eyes. Surround the sparrow with a vibrant background of spring leaves and soft sunlight filtering through the trees, capturing the essence of a tranquil morning in nature.",
  "height": 768,
  "width": 768,
  "num_inference_steps": 50,
  "guidance_scale": 7.5,
  "seed": 42
}
import requests

url = "https://gateway.pixazo.ai/sdxlTurbo/v2/getData"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "Create a detailed illustration of a sparrow perched on a branch. The bird should be depicted with its distinctive brown and gray feathers, a small beak, and bright, curious eyes. Surround the sparrow with a vibrant background of spring leaves and soft sunlight filtering through the trees, capturing the essence of a tranquil morning in nature.",
    "height": 768,
    "width": 768,
    "num_inference_steps": 50,
    "guidance_scale": 7.5,
    "seed": 42
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/sdxlTurbo/v2/getData";
const headers = {
  "Content-Type": "application/json",
  "Cache-Control": "no-cache",
  "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
};
const data = {
  "prompt": "Create a detailed illustration of a sparrow perched on a branch. The bird should be depicted with its distinctive brown and gray feathers, a small beak, and bright, curious eyes. Surround the sparrow with a vibrant background of spring leaves and soft sunlight filtering through the trees, capturing the essence of a tranquil morning in nature.",
  "height": 768,
  "width": 768,
  "num_inference_steps": 50,
  "guidance_scale": 7.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/sdxlTurbo/v2/getData" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "prompt": "Create a detailed illustration of a sparrow perched on a branch. The bird should be depicted with its distinctive brown and gray feathers, a small beak, and bright, curious eyes. Surround the sparrow with a vibrant background of spring leaves and soft sunlight filtering through the trees, capturing the essence of a tranquil morning in nature.",
    "height": 768,
    "width": 768,
    "num_inference_steps": 50,
    "guidance_scale": 7.5,
    "seed": 42
  }'

Output

{
  "output": "https://d3re0c8wemxg38.cloudfront.net/output_mme/8891449d-7bbd-4150-9a56-86ff51378640.jpeg",
  "status": "complete",
  "message": "In progress"
}

Request Parameters - SDXL Turbo Get Image

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesStringThe main instruction for the image generation — a text description of the image you want.
heightNoInteger512512 – 1024The height of the output image, in pixels. SDXL Turbo natively generates 512×512 and gives its best results at that size; 768 or 1024 also work but quality may degrade.
widthNoInteger512512 – 1024The width of the output image, in pixels. SDXL Turbo natively generates 512×512 and gives its best results at that size; 768 or 1024 also work but quality may degrade.
num_inference_stepsNoInteger11 – 4Number of refinement (denoising) steps. SDXL Turbo is a distilled model: a single step is enough for a high-quality image, and 2–4 steps refine it slightly. Higher values only add latency without improving quality.
guidance_scaleNoFloat00Controls how closely the output follows your prompt (classifier-free guidance). SDXL Turbo was trained without guidance, so this must be 0 — non-zero values degrade the image. Use the prompt itself to steer the result.
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": "Create a detailed illustration of a sparrow perched on a branch. The bird should be depicted with its distinctive brown and gray feathers, a small beak, and bright, curious eyes. Surround the sparrow with a vibrant background of spring leaves and soft sunlight filtering through the trees, capturing the essence of a tranquil morning in nature.",
  "height": 768,
  "width": 768,
  "num_inference_steps": 50,
  "guidance_scale": 7.5,
  "seed": 42
}

Response

{
  "output": "https://d3re0c8wemxg38.cloudfront.net/output_mme/8891449d-7bbd-4150-9a56-86ff51378640.jpeg",
  "status": "complete",
  "message": "In progress"
}

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 SDXL Turbo Get Image.

Code Meaning
200 Success
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
Too Many Requests
500 Internal Server Error

SDXL Turbo API Pricing

Your request is Free
Free during preview — fair-use rate limit of 60 requests/minute applies. See terms.
2. SDXL Base 1.0

SDXL Base 1.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

SDXL Base 1.0 API Pricing

Your request is Free
Free during preview — fair-use rate limit of 60 requests/minute applies. See terms.
3. SDXL Lightning

SDXL 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

SDXL Lightning API Pricing

Your request is Free
Free during preview — fair-use rate limit of 60 requests/minute applies. See terms.