The cheapest GPT API (route it, or switch models in one line)
To use GPT models for the least money you have two levers: route each request to the cheapest healthy seller for the GPT model you want, and switch to a cheaper model when a task does not need GPT at all. UberLLM gives you both through one OpenAI-compatible key — the price shown includes UberLLM’s 10% fee, and switching models is a one-line change.
Two levers, not one
Most "cheapest GPT API" advice stops at picking a smaller model. There is a second, bigger lever: the same GPT model is sold by more than one seller, and the live price is whatever the cheapest healthy seller is charging. A gateway routes you to that seller automatically.
UberLLM pulls both levers. You keep the OpenAI SDK and one key, and every GPT request is matched to the cheapest healthy seller. When a task does not actually need GPT, you drop to a much cheaper open-weight model by changing one string. The price on the live pricing board already includes UberLLM’s 10% fee.
Keep your OpenAI code, change the base URL
from openai import OpenAI
client = OpenAI(
base_url="https://api.uberllm.dev/v1", # was: https://api.openai.com/v1
api_key="ull_your_key_here",
)
resp = client.chat.completions.create(
model="openai/gpt-5.1-mini", # or any id from /models
messages=[{"role": "user", "content": "Summarise this ticket."}],
)
Nothing else in your OpenAI SDK code changes. See the OpenAI SDK doc for streaming, tools and structured outputs, all unchanged.
When to switch models instead of routing
- Classification, extraction, routing, short rewrites rarely need a frontier GPT model. Open-weight models (DeepSeek, GLM, Qwen) do them for a few cents per million tokens — compare the live numbers on /models.
- Long, cheap, high-volume jobs are where the per-token gap compounds. Changing
model="openai/gpt-5.1-mini"to a cheaper id is the whole migration. - Keep GPT where it earns its price — hard reasoning, agentic tool use — and route it to the cheapest healthy seller there.
Failures are free
A GPT call that fails before output starts is retried on the next healthy seller, and a request that returns nothing costs $0 — how pricing works. No monthly fee, no minimum.
Keep reading
- The short answer: the cheapest GPT API
- Moving off another gateway? UberLLM vs OpenRouter
- What an OpenAI-compatible API endpoint is