All models
Balanced
stable-diffusionStable Diffusion XL
Stability AI — broad style range, strong for artistic and creative content.
Best for: Artistic illustrations, concept art, stylized content, anime, creative variety. Wide aesthetic range.
Quality steps
30
Fast preset
20
Max steps
50
Negative prompt
Yes
cURL
POST a single request to generate an image with Stable Diffusion XL.
curl -X POST https://imageapi.org/api/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a cinematic mountain landscape at sunrise",
"model": "stable-diffusion",
"width": 1024,
"height": 1024,
"num_inference_steps": 30
}'Python
import requests
resp = requests.post(
"https://imageapi.org/api/v1/generate",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"prompt": "a cinematic mountain landscape at sunrise",
"model": "stable-diffusion",
"width": 1024,
"height": 1024,
"num_inference_steps": 30,
},
timeout=120,
)
print(resp.json())Node.js
const res = await fetch("https://imageapi.org/api/v1/generate", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "a cinematic mountain landscape at sunrise",
model: "stable-diffusion",
width: 1024,
height: 1024,
num_inference_steps: 30,
}),
});
console.log(await res.json());Plan availability
Stable Diffusion XL is included on the following plans.
- basic
- pro
- enterprise
Frequently asked questions
How do I call the Stable Diffusion XL model?
Send a POST request to https://imageapi.org/api/v1/generate with the body { "prompt": "...", "model": "stable-diffusion" } and an Authorization: Bearer YOUR_API_KEY header.
What is Stable Diffusion XL best for?
Artistic illustrations, concept art, stylized content, anime, creative variety. Wide aesthetic range.
Does Stable Diffusion XL support negative prompts?
Yes — pass a negative_prompt field to steer Stable Diffusion XL away from unwanted concepts.
What inference step counts work best for Stable Diffusion XL?
Use ~30 steps for production quality and ~20 steps when you want lower latency. The hard cap is 50 steps.
Which plans include Stable Diffusion XL?
Stable Diffusion XL is available on basic, pro, enterprise plans.
Ready to ship with Stable Diffusion XL?
Free tier, transparent pricing, and a single REST endpoint for 9 models.
