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.
Google's latest image generation model producing high-quality, photorealistic images from text prompts with support for multiple aspect ratios.
OpenAI's image generation model that creates and edits images from text prompts, supporting multiple quality levels and output sizes.
from openai import OpenAI
client = OpenAI(
base_url="https://api.aigateway.sh/v1",
api_key="sk-aig-...",
)
# Imagen 4
client.chat.completions.create(
model="google/imagen-4",
messages=[{"role":"user","content":"hello"}],
)
# GPT Image 1.5
client.chat.completions.create(
model="openai/gpt-image-1.5",
messages=[{"role":"user","content":"hello"}],
)