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.
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.
Stable Diffusion Inpainting is a latent text-to-image diffusion model capable of generating photo-realistic images given any text input, with the extra capability of inpainting the pictures by using a mask.
from openai import OpenAI
client = OpenAI(
base_url="https://api.aigateway.sh/v1",
api_key="sk-aig-...",
)
# Stable-Diffusion-V1-5-Img2img
client.chat.completions.create(
model="runwayml/stable-diffusion-v1-5-img2img",
messages=[{"role":"user","content":"hello"}],
)
# Stable-Diffusion-V1-5-Inpainting
client.chat.completions.create(
model="runwayml/stable-diffusion-v1-5-inpainting",
messages=[{"role":"user","content":"hello"}],
)