All models

gpt-image-2

Generate images with gpt-image-2 through the same key and base URL as chat — priced per image, no subscription.

OpenAITextImageOpenAI-compatible
Pricing (per image)
Size tierPrice
1K · ≤1024²$0.0177
2K · ≤2048²$0.0264
4K · >2K$0.0354
Quick start
from openai import OpenAI

client = OpenAI(
    api_key="<your API key>",
    base_url="https://inferkey.dev/openai/v1",
    timeout=300,
)
r = client.images.generate(
    model="gpt-image-2",
    prompt="a lighthouse at dawn",
    size="1024x1024",
)