Pricing per million tokens, context window, capabilities — pulled from each provider's public docs. All 2 are available via the same AIgateway OpenAI-compatible endpoint; flip the model string to switch.
SDXL-Lightning is a lightning-fast text-to-image generation model. It can generate high-quality 1024px images in a few steps.
Diffusion-based text-to-image generative model by Stability AI. Generates and modify images based on text prompts.
from openai import OpenAI
client = OpenAI(
base_url="https://api.aigateway.sh/v1",
api_key="sk-aig-...",
)
# Stable-Diffusion-XL-Lightning
client.chat.completions.create(
model="bytedance/stable-diffusion-xl-lightning",
messages=[{"role":"user","content":"hello"}],
)
# Stable-Diffusion-XL-Base-1.0
client.chat.completions.create(
model="stabilityai/stable-diffusion-xl-base-1.0",
messages=[{"role":"user","content":"hello"}],
)