Pixazo APIModelsStable Diffusion
Pixazo APIModelsStable Diffusion

Stable Diffusion 3.5 API, Stable Diffusion 3.0, 1.5, 1.0 Turbo, 1.0 Video (Free) API - AI Image & Video Generation APIs

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

LIMITED TIME OFFER

Get $5 Free Credit on First Payment

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

Claim Your $5 →

Stable Diffusion v3.5 Text to Image API Documentation

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 Description
promptYesstringThe text prompt describing the desired image
aspect_ratioYesstringAspect ratio of the output image (e.g., "1:1", "16:9")
cfgYesnumberClassifier-Free Guidance scale, controls prompt adherence (1.0-20.0)
stepsYesnumberNumber of inference steps (20-100)
output_formatYesstringOutput format: "webp", "jpg", "png", "jpeg"
output_qualityYesnumberQuality level for compressed formats (1-100)
prompt_strengthYesnumberStrength of prompt influence (0.0-1.0)

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 Text to Image API Pricing

ResolutionPrice (USD)
All Resolution$0.2
2. Stable Diffusion v3

Stable Diffusion v3 Text to Image API Documentation

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 Description
promptYesstringThe text query that instructs the AI model on what kind of content to generate. In this case, "womens street skateboarding final in Paris Olympics 2024."
negativePromptNostringNegative prompts do not really work in SD3. Using a negative prompt will change your output in unpredictable ways.
stepsNointegerThe number of steps for the transformation process. Default: 28, (minimum: 1, maximum: 28)
cfgNodecimalThe guidance scale tells the model how similar the output should be to the prompt. Default: 3.5, (minimum: 0, maximum: 20)
aspect_ratioNostringThe aspect ratio of your output image. This value is ignored if you are using an input image. Default: "1:1"
output_formatNostringFormat of the output images. Default: "webp"
output_qualityNointegerQuality of the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Default: 90, (minimum: 0, maximum: 100)
prompt_strengthNodecimalPrompt strength (or denoising strength) when using image to image. 1.0 corresponds to full destruction of information in image. Default: 0.85, (minimum: 0, maximum: 1)

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 Text to Image API Pricing

ResolutionPrice (USD)
All Resolution$0.2
3. Stable Diffusion XL v1.0

Stable Diffusion XL v1.0 Text to Image API Documentation

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 Description
promptYesStringThe main instruction for the image generation
negative_promptNoStringA prompt to specify what should be avoided in the image
heightNoIntegerThe height of the output image (e.g., 1024)
widthNoIntegerThe width of the output image (e.g., 1024)
num_stepsNoIntegerThe number of steps for the generation process (e.g., 20)
guidance_scaleNoIntegerThe guidance scale for the generation (e.g., 5)
seedNoIntegerThe seed value for random number generation to ensure reproducibility

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 Text to Image API Pricing

ResolutionPrice (USD)
All Resolution$0
4. Stable Diffusion XL Lightning

Stable Diffusion XL Lightning Text to Image API Documentation

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 Description
promptYesStringThe main instruction for the image generation
negativePromptNoStringA prompt to specify what should be avoided in the image
heightNoIntegerThe height of the output image (e.g., 1024)
widthNoIntegerThe width of the output image (e.g., 1024)
num_stepsNoIntegerThe number of steps for the generation process (e.g., 20)
guidanceNoIntegerThe guidance scale for the generation (e.g., 5)
seedNoIntegerThe seed value for random number generation to ensure reproducibility

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 Text to Image API Pricing

ResolutionPrice (USD)
All Resolution$0

Stable Diffusion XL Lightning Text to Image (Stream) API Documentation

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 Description
promptYesStringThe main instruction for the image generation
negativePromptNoStringA prompt to specify what should be avoided in the image
heightNoIntegerThe height of the output image (e.g., 1024)
widthNoIntegerThe width of the output image (e.g., 1024)
num_stepsNoIntegerThe number of steps for the generation process (e.g., 20)
guidanceNoIntegerThe guidance scale for the generation (e.g., 5)
seedNoIntegerThe seed value for random number generation to ensure reproducibility

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 Text to Image (Stream) API Pricing

ResolutionPrice (USD)
All Resolution$0
5. Stable Diffusion Inpainting

Stable Diffusion Inpainting Image to Image (Inpainting — Ref Image + Ref Mask to Image) API Documentation

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 Description
promptYesStringThe main instruction for the image transformation
imageUrlNoURLThe URL of the initial image to be transformed
maskUrlNoURLThe URL of the mask image
negativePromptNoStringA prompt to specify what should be avoided in the image
heightNoIntegerThe height of the output image (e.g., 1024)
widthNoIntegerThe width of the output image (e.g., 1024)
num_stepsNoIntegerThe number of steps for the transformation process (e.g., 20)
guidanceNoIntegerThe guidance scale for the transformation (e.g., 5)
seedNoIntegerThe seed value for random number generation to ensure reproducibility

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 Image to Image (Inpainting — Ref Image + Ref Mask to Image) API Pricing

ResolutionPrice (USD)
All Resolution$0

Stable Diffusion Inpainting Text to Image (Stream) API Documentation

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 Description
promptYesStringThe main instruction for the image transformation
imageUrlNoURLThe URL of the initial image to be transformed
maskUrlNoURLThe URL of the mask image
negativePromptNoStringA prompt to specify what should be avoided in the image
heightNoIntegerThe height of the output image (e.g., 1024)
widthNoIntegerThe width of the output image (e.g., 1024)
num_stepsNoIntegerThe number of steps for the transformation process (e.g., 20)
guidanceNoIntegerThe guidance scale for the transformation (e.g., 5)
seedNoIntegerThe seed value for random number generation to ensure reproducibility

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 Text to Image (Stream) API Pricing

ResolutionPrice (USD)
All Resolution$0