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.
| GPT-4.1 Nano openai/gpt-4.1-nano | GPT-4o openai/gpt-4o | |
|---|---|---|
| Provider | OpenAI | OpenAI |
| Family | GPT-4 | GPT-4 |
| Modality | text | text |
| Context window | 1,000,000 tok | 128,000 tok |
| Max output | 32,768 tok | 16,384 tok |
| Released | 2026-05-22 | 2026-05-22 |
| Input price | $0.100 /1M | $2.50 /1M |
| Output price | $0.400 /1M | $10.00 /1M |
| Cache read | — | — |
| Tools | yes | — |
| Streaming | yes | yes |
| Vision | yes | — |
| JSON mode | yes | — |
| Reasoning | — | — |
| Prompt caching | — | — |
GPT-4.1 Nano is OpenAI’s smallest and cheapest GPT-4.1 variant, optimized for high-throughput, low-latency tasks.
GPT-4o is OpenAI’s multimodal flagship, accepting text and images and responding quickly across a wide range of tasks.
# 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 GPT-4.1 Nano
client.chat.completions.create(
model="openai/gpt-4.1-nano",
messages=[{"role":"user","content":"hello"}],
)
# Try GPT-4o — same client, same key
client.chat.completions.create(
model="openai/gpt-4o",
messages=[{"role":"user","content":"hello"}],
)