Pricing, context window, capabilities, and release date — pulled from each provider's public docs. Both are available via the same AIgateway OpenAI-compatible endpoint; flip the model string to switch.
Both models stream in parallel through your own AIgateway key. Tokens, latency, and cost update as they arrive.
| Stable-Diffusion-XL-Lightning bytedance/stable-diffusion-xl-lightning | Stable-Diffusion-V1-5-Img2img runwayml/stable-diffusion-v1-5-img2img | |
|---|---|---|
| Provider | ByteDance | Runway |
| Family | Stable Diffusion | Stable Diffusion |
| Modality | image | image |
| Context window | — | — |
| Max output | — | — |
| Released | 2024-02-27 | 2024-02-27 |
| Input price | $0.0000 /img | $0.0000 /img |
| Output price | — | — |
| Cache read | — | — |
| Tools | — | — |
| Streaming | — | — |
| Vision | — | — |
| JSON mode | — | — |
| Reasoning | — | — |
| Prompt caching | — | — |
SDXL-Lightning is a lightning-fast text-to-image generation model. It can generate high-quality 1024px images in a few steps.
Stable Diffusion is a latent text-to-image diffusion model capable of generating photo-realistic images. Img2img generate a new image from an input image with Stable Diffusion.
# pip install aigateway-py openai
# aigateway-py: sub-accounts, evals, replays, jobs, webhook verify.
# openai SDK: chat/embeddings/images/audio — drop-in compat per our SDK's own guidance.
from openai import OpenAI
client = OpenAI(
base_url="https://api.aigateway.sh/v1",
api_key="sk-aig-...",
)
# Try Stable-Diffusion-XL-Lightning
client.chat.completions.create(
model="bytedance/stable-diffusion-xl-lightning",
messages=[{"role":"user","content":"hello"}],
)
# Try Stable-Diffusion-V1-5-Img2img — same client, same key
client.chat.completions.create(
model="runwayml/stable-diffusion-v1-5-img2img",
messages=[{"role":"user","content":"hello"}],
)