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

NameTypeDetails
promptstring

Input prompt

Default: self-portrait of a woman, lightning in the background

output_countnumber

Number of images to output.

Default: 1

Min 1 · Max 4

seednumber

Random seed. Leave blank to randomize the seed

Default: 0

negative_promptstring

Negative Input prompt

Default: worst quality, low quality

guidancenumber

Scale for classifier-free guidance

Default: 0

Min 0 · Max 50

stepsnumber

Number of denoising steps. 4 for best results

Default: 4

Min 1 · Max 10

heightnumber

Height of output image. Recommended 1024 or 1280

Default: 1024

Min 256 · Max 1280

schedulerstring

Default: K_EULER

One of: DDIM, DPMSolverMultistep, HeunDiscrete, KarrasDPM, K_EULER_ANCESTRAL, K_EULER, PNDM, DPM++2MSDE

widthnumber

Width of output image. Recommended 1024 or 1280

Default: 1024

Min 256 · Max 1280