All models
Fast
sdxl-lightningSDXL Lightning
ByteDance accelerated SDXL — very fast generation with fewer steps needed.
Best for: Fast SDXL output, rapid creative iteration, lower-latency alternative to SDXL base.
Quality steps
8
Fast preset
4
Max steps
50
Negative prompt
Yes
cURL
POST a single request to generate an image with SDXL Lightning.
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": "sdxl-lightning",
"width": 1024,
"height": 1024,
"num_inference_steps": 8
}'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": "sdxl-lightning",
"width": 1024,
"height": 1024,
"num_inference_steps": 8,
},
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: "sdxl-lightning",
width: 1024,
height: 1024,
num_inference_steps: 8,
}),
});
console.log(await res.json());Plan availability
SDXL Lightning is included on the following plans.
- basic
- pro
- enterprise
Frequently asked questions
How do I call the SDXL Lightning model?
Send a POST request to https://imageapi.org/api/v1/generate with the body { "prompt": "...", "model": "sdxl-lightning" } and an Authorization: Bearer YOUR_API_KEY header.
What is SDXL Lightning best for?
Fast SDXL output, rapid creative iteration, lower-latency alternative to SDXL base.
Does SDXL Lightning support negative prompts?
Yes — pass a negative_prompt field to steer SDXL Lightning away from unwanted concepts.
What inference step counts work best for SDXL Lightning?
Use ~8 steps for production quality and ~4 steps when you want lower latency. The hard cap is 50 steps.
Which plans include SDXL Lightning?
SDXL Lightning is available on basic, pro, enterprise plans.
Ready to ship with SDXL Lightning?
Free tier, transparent pricing, and a single REST endpoint for 9 models.
