API docs / Image models
SDXL Lightning API
Generate images from text prompts using a fast text-to-image model optimized for 4-step generation. Creates high-quality 1024px images through progressive adversarial diffusion distillation, distilled from SDXL base model. Supports multiple schedulers including K_EULER, DDIM, DPMSolverMultistep, and HeunDiscrete. Features configurable guidance scale, negative prompts, and can generate up to 4 images per request. Optimized for speed while maintaining image quality, with recommended inference steps of 4 for best results.
- Model id
bytedance/sdxl-lightning-4step- Provider
- Bytedance
- Output
- Image
- Price
- From 1 credits per run, the same as on voor.ai. Options such as length or resolution can change it.
Request
POST https://voor.ai/v1/generations with "model": "bytedance/sdxl-lightning-4step". Poll GET /v1/tasks/{id} or receive the signed webhook. See the overview for keys, idempotency, webhooks and errors.
curl https://voor.ai/v1/generations \
-H "Authorization: Bearer $VOOR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "bytedance/sdxl-lightning-4step",
"input": {
"prompt": "self-portrait of a woman, lightning in the background"
},
"callback_url": "https://example.com/webhooks/voor"
}'
# Then poll the task (or wait for the webhook):
curl https://voor.ai/v1/tasks/TASK_ID \
-H "Authorization: Bearer $VOOR_API_KEY"Input parameters
| Name | Type | Details |
|---|---|---|
prompt | string | Input prompt Default: |
output_count | number | Number of images to output. Default: Min 1 · Max 4 |
seed | number | Random seed. Leave blank to randomize the seed Default: |
negative_prompt | string | Negative Input prompt Default: |
guidance | number | Scale for classifier-free guidance Default: Min 0 · Max 50 |
steps | number | Number of denoising steps. 4 for best results Default: Min 1 · Max 10 |
height | number | Height of output image. Recommended 1024 or 1280 Default: Min 256 · Max 1280 |
scheduler | string | Default: One of: DDIM, DPMSolverMultistep, HeunDiscrete, KarrasDPM, K_EULER_ANCESTRAL, K_EULER, PNDM, DPM++2MSDE |
width | number | Width of output image. Recommended 1024 or 1280 Default: Min 256 · Max 1280 |