A unified LLM API is one endpoint and one key that reach models from many makers, billed from one balance. It is a good deal for most people, and it is a deal: you hand a third party your traffic, your upstream relationships and a bigger single secret. This post prices that trade. You get six trades with a check for each, a table of the spend controls read from vendor documentation on 28 November 2026, two calculators (hop latency and leaked-key loss) you can set to your own numbers, and a day-one checklist. One AI API Key publishes this post and sells a unified API, so we mark every place where that matters.
What does a unified LLM API actually replace?
Without one, each maker is a separate relationship: its own account, its own key, its own base URL, its own request format quirks, its own billing page and its own rate limits. With one, your code talks to a single base URL (ours is {OPENAI_BASE}), authenticates with a single key, and picks the model by name in the request body. The gateway behind it holds the credentials for the providers, converts formats when it must, meters tokens and writes one usage record per request. The longer version is in what an LLM gateway is, and the question of when to skip it entirely has its own post, LLM gateway vs direct API.
The convenience is real. Swapping from one model to another becomes a one-line change, a bad provider day can be routed around, and a finance person can read one invoice. Google’s own documentation describes the same pattern from the other side: its Gemini endpoint accepts the OpenAI libraries after changing three lines, which is the compatibility layer a unified API generalises across makers.
What the convenience hides is a set of choices you used to make implicitly. The diagram shows where each one sits on the path of a request.
Where the trades sit on the path
The rest of this post takes the trades in order of how often they bite. Each has the same shape: what you give up, a number or a source, and a check you can run for nothing.
Trade 1: how much latency does the extra hop add?
Your request now crosses your network to the gateway, the gateway’s checks, and the gateway’s connection to the provider, before the model starts. On the way back, a streamed answer is passed on chunk by chunk, so the hop shifts the first token later and leaves the token-to-token pace almost untouched. That is the whole mechanism: a fixed delay per call, not a slower model.
Whether a fixed delay matters depends on how many calls are chained. A person chatting feels one hop per message. An agent that plans, calls a tool, reads the result and plans again pays it on every step, in sequence. There is a second, easier-to-miss cost: when the provider fails before answering, the gateway retries before it gives up. Ours retries the model you named up to twice, then tries the fallbacks you picked in advance, as the routing documentation states. That is good for success rates and bad for the slowest 5 percent of calls, which now include a failed attempt.
We do not publish a hop number, and we would rather say so than print one with no benchmark behind it. Our own performance page states that it contains no benchmark figures because speed depends on the model, the prompt and the provider’s load at that moment. What we can give you is arithmetic with a placeholder that you replace, and a script that measures the real thing.
What the hop adds to an agent task
- Seconds added to the whole task
- 2.00
- Task time without the hop, seconds
- 240
- Hop as a share of the task
- 0.8%
- Hop as a share of one first token
- 8.3%
The 50 ms default is a placeholder, not a measurement of any gateway. At these defaults 40 calls of 6 seconds take 240 seconds, the hop adds 2 seconds, and a user waiting for a first token feels it more than a batch job does.
At the defaults, the hop adds 2 seconds to a 240-second task, under 1 percent, and about 8 percent to a 600-millisecond first token. Those two figures point in opposite directions, which is the useful finding: a batch pipeline barely notices a hop, a voice or autocomplete product notices it a lot. If your product lives on first-token time, measure before you commit.
The script below measures both targets the same way: streamed, 20 runs, medians. It only isolates the hop if both targets serve the same model from the same upstream, so check that first. A gateway that routes to a different provider than your direct account will show a difference that is routing, not the hop.
import os, statistics, time
from openai import OpenAI
# Two targets that serve the SAME model on the SAME upstream, or the difference is routing, not the hop.
TARGETS = {
"direct": dict(base_url=os.environ["DIRECT_BASE_URL"], api_key=os.environ["DIRECT_KEY"], model=os.environ["DIRECT_MODEL"]),
"gateway": dict(base_url="https://api.oneaiapikey.com/v1", api_key=os.environ["ONEAIAPIKEY_API_KEY"], model=os.environ["MODEL_ID"]),
}
RUNS = 20
PROMPT = "Name three uses of a hash map. One line each."
def one_call(cfg):
client = OpenAI(base_url=cfg["base_url"], api_key=cfg["api_key"])
t0 = time.perf_counter()
first = None
stream = client.chat.completions.create(
model=cfg["model"], max_tokens=120, stream=True,
messages=[{"role": "user", "content": PROMPT}],
)
for chunk in stream:
if first is None and chunk.choices and chunk.choices[0].delta.content:
first = time.perf_counter() - t0
return first or 0.0, time.perf_counter() - t0
for name, cfg in TARGETS.items():
runs = [one_call(cfg) for _ in range(RUNS)]
ftl = statistics.median(r[0] for r in runs) * 1000
total = statistics.median(r[1] for r in runs)
print(f"{name:8s} median first token {ftl:7.0f} ms median total {total:5.2f} s")Run it from the machine your app runs on, at the hour your traffic peaks, and compare medians. Single requests tell you nothing, as the performance page says, and your own network is part of the number. If the gateway number is close to the direct number, stop worrying about this trade. If it is not, you have a figure to put in the decision flow instead of a feeling.
Trade 2: who else sees your prompts?
Calling a provider directly puts one company in the path of your data. Calling through a gateway puts two. The gateway relays the request, and the provider that runs the model receives all of it: messages, system prompt, images, tools and parameters. On ours, the routing and privacy documentation says so in plain words, adds that each provider processes the request under its own terms, and says what the provider does not receive (your key, your email address or your account details).
What a gateway keeps is a separate question from what it passes on. Ours relays the content of requests in memory to complete them and keeps one usage record per request: model, token counts, charge, timing and request id. We do not train on user data. The qualifiers are published and worth reading: prompt logging is opt-in per key, X-No-Log: true leaves one call out, and content is captured only when you ask us to troubleshoot or we investigate abuse. The privacy policy and the post on what a gateway sees and stores go through it, and the transparency page lists what we monitor and what we cannot see.
You should hold every gateway to the same standard, rivals included. OpenRouter’s FAQ says it logs basic request metadata (timestamps, model used, token counts) and does not log prompts and completions by default, with an opt-in that gives a 1 percent usage discount in exchange for logging them. That is a clear published position, and a fair comparison point. The ten data-processing questions turn this into a list you can send to any vendor, and a sensible answer names who receives the request, what is kept, for how long and how to ask for deletion.
The darker version of this trade is a gateway that does not run the model it names. A 2026 academic audit, Real Money, Fake Models (accepted to ACM CCS 2026), looked at 17 shadow APIs used in 187 academic papers and audited three of them. Its abstract reports performance divergence of up to 47.21 percent from the official APIs, unpredictable safety behaviour, and identity verification failures in 45.83 percent of fingerprint tests, and says 4 of the 17 providers had already ceased operations. Be exact about what that is: three audited endpoints out of a market of unnamed size, not a verdict on gateways in general. We unpack it in the study, explained, and the practical answer is in how to verify an API serves the real model and the post on cheap reseller risks.
The check that costs nothing is the script below. It asks for one model, prints which model answered, prints the usage object the bill is built from and prints the request id you would quote to support. Run it on any gateway by changing the base URL and key.
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.oneaiapikey.com/v1", api_key=os.environ["ONEAIAPIKEY_API_KEY"])
ASKED = "z-ai-glm-5.3:free"
raw = client.chat.completions.with_raw_response.create(
model=ASKED,
max_tokens=40,
messages=[{"role": "user", "content": "Reply with the single word: ready"}],
)
reply = raw.parse()
print("asked for :", ASKED)
print("answered :", reply.model) # the model that actually ran
print("usage :", reply.usage) # prompt_tokens + completion_tokens
print("request id:", raw.headers.get("x-request-id"))
print("fell back from:", raw.headers.get("x-fallback-from")) # None unless a fallback answeredIf answered is not the model you asked for and fell back from is empty, stop and ask why. If a fallback answered, the header tells you which model failed, which is the behaviour you want: a switch you can see.
Trade 3: how big is the blast radius of one leaked key?
A key that works for every model is a bigger prize than a key that works for one. A leaked key exposes every model at once, and the bill is the model price times how fast the thief can go times how long you take to notice. That is arithmetic, so we can do it.
OWASP’s API Security Top 10 lists unrestricted resource consumption as API4:2023 and recommends configuring spending limits for every service provider or API integration, with billing alerts when a hard limit is not possible. The OWASP GenAI entry on unbounded consumption names the LLM version, denial of wallet: generating excessive operations to exploit a pay-per-use model. OpenAI’s key-safety guidance says the same in operational terms: project keys with expiration dates, monthly spend limits with hard enforcement, and a warning that spend alerts alone do not stop traffic and that enforcement is not instantaneous, so spend may slightly exceed the limit.
The calculator uses a thief running a modest script. Replace the price with your model’s blended rate from the models page.
What one leaked key can cost
- Tokens burned if nothing stops it
- 86,400,000
- Cost with no cap at all
- $259.20
- Cost if only the balance stops it
- $50.00
- Cost with a key spend limit
- $20.00
Defaults: 30 requests a minute for 12 hours is 21,600 requests, 86.4 million tokens, 259.20 dollars at 3 dollars per 1M. A limit can be crossed slightly by the request in flight, so leave headroom.
Worst case at the calculator defaults
- No cap, pay-as-you-go card$259.2021,600 requests of 4,000 tokens at $3 per 1M
- Only the account balance$50.00
- Key spend limit$20.00the loss you chose in advance
The reading is simple. Without a cap, 12 hours costs $259.20. With a $50 balance it costs at most $50. With a $20 key limit it costs at most $20, and the other keys on the account keep working. That last sentence is the design goal of per-key limits, and it is also why “one key for every model” must never mean “one key for everything you run”.
What controls exist, and where?
Here is what we could confirm on the vendors’ own pages on 28 November 2026. A blank means the page we read did not state it, not that the feature is absent.
| Where | Spend cap | Limit by model | Source |
|---|---|---|---|
| OpenAI, direct | Monthly spend limits per organization or project, with hard enforcement; may overshoot slightly | Not stated on the page read | OpenAI key safety |
| OpenRouter | Per-key credit limit; org guardrail and workspace budgets | Not stated on the page read | OpenRouter limits |
| LiteLLM, self-hosted | Per-key max_budget on virtual keys |
Per-model budget on a key is listed as an Enterprise feature | virtual keys, budgets |
| One AI API Key | Per-key spend limit, plus an account cap per day, week or month | A model list on each key, not a separate dollar rule per model | authentication, cost control |
We publish this post, so read the last row sceptically and check it against the linked documentation. Two honest points in the rivals’ favour: LiteLLM’s per-model dollar budget is something we do not offer as a rule today, and OpenAI’s hard enforcement at the source is the only control that lives where the model runs. Two points in ours: the per-key model list and spend limit are on every account from the first key, and the key limit refuses a request up front when its estimate exceeds what is left, so a runaway loop stops earlier than it would on a post-hoc meter. The authentication guide explains the estimate and why long agent keys need headroom.
How do you make a per-model budget today?
Put the budget on the key. Create one key per model class, give it only the models it should call, and give it a spend limit equal to the most that class may cost. A coding agent key may call two mid-priced models and carry a $15 limit. A batch summariser key may call one cheap model and carry $5. An experiment key carries a short expiry. If the experiment key leaks, the thief can reach one model class and $5. That is the per-model budget in practice, and it works the same way on every gateway that has per-key limits and model lists.
Add the layers around it. A per-key requests-per-minute ceiling stops a loop earlier than a dollar cap does, because a runaway usually shows up as a request rate before it shows up as money; ours returns 429 with code key_rate_limit before the request reaches a model, as the rate limits page describes. An IP allowlist on a server key makes a stolen key useless from anywhere else, which the account security page covers. The account cap sits above all of it and a request that crosses it may still finish, so the total can end slightly above the number. For loops specifically, the six caps against a runaway token bill go deeper, and the guide to leaked keys and the first hour covers what to do after the key is already out. For the general habits, see API key security for AI apps and one key per project with spend limits.
There is a second blast radius, and it belongs to people who run the gateway themselves. A gateway holds your upstream provider credentials in one place. LiteLLM’s own incident notice records that versions 1.82.7 and 1.82.8 of its PyPI package were live on 24 March 2026 for about 40 minutes and appear to have carried a credential stealer that scanned for environment variables, SSH keys, cloud credentials, Kubernetes tokens and database passwords; the notice also says users of the official Docker proxy image were not affected. That is a primary source about a self-hosted gateway, not a claim about any hosted one. It shows where the secret lives if you host: on your machine, next to everything else the attacker wants. We go through the self-host side in LiteLLM alternatives and LiteLLM against a hosted gateway. Hosting shifts the risk from your supply chain to ours, and you should price that honestly.
Trade 4: why do model names drift between gateways?
You write model: "something" and expect the same thing everywhere. You will not get it. Each layer names models its own way, and some of them rename.
| Layer | How it names a model | Example from its own docs or list | Source |
|---|---|---|---|
| OpenRouter | maker/slug, with variant suffixes; some aliases redirect to a canonical slug | openai/gpt-4o; an alias such as anthropic/claude-3-5-sonnet redirects to anthropic/claude-3.5-sonnet |
models API |
| Google, direct | bare name | gemini-4-hydrogen in its compatibility example |
Gemini compatibility |
| LiteLLM | whatever model_name you write in your config, mapped to a provider model |
model_name pointing at ollama/llama2 in its quick start |
virtual keys |
| One AI API Key | bare lowercase id; :free ending on the free lane; a -1, -2 counter on a second lane of the same model |
{FREE_ID} |
models and ids |
Our own list shows the problem honestly. The free lane carries ids such as ernie-5.5-flash-preview:free, ernie-5.5-flash-preview-1:free, ernie-5.5-flash-preview-2:free, where the counter marks extra lanes of one model that act as its fallback, and it carries families whose ids put dots and hyphens in different places (gemma-4-31b-it:free next to gemma4-31b:free). That is accurate to how the providers publish them, and it is why we tell you to read GET {OPENAI_BASE}/models with your key instead of trusting a blog post, including this one.
Names are the visible part. Behaviour drifts too. Google’s compatibility page shows OpenAI’s reasoning_effort mapped onto different native settings per Gemini generation: low and minimal both become low on its newest family, while an xhigh level exists only on two named models and is not supported on the older ones. It also says reasoning_effort and the native thinking_level cannot be used at the same time, and offers an extra_body field to pass vendor fields through. A unified API presents one surface, and the translation underneath is where vendor differences leak. When something behaves oddly on one model and not another, suspect the translation first.
The practical defence is a small alias map in your own configuration: your name for the job (summarise, code-review) on the left, the gateway’s id on the right. The vendor lock-in exit plan shows one with a switch drill, and the compatibility test matrix shows which request features survive the translation on a given provider. Swapping an app from one base URL to another is covered in switching an OpenAI SDK app to a different base URL, and the OpenAI API alternatives post lists what differs for each destination.
Does a fallback change what you pay?
It can, and this is the part of naming that hits your wallet. OpenRouter’s documentation says requests are priced using the model that was ultimately used, and gives a sharp example: if a :free model is followed by a paid model in the fallback list and the fallback fires, you are billed at the paid model’s price. Its advice is to list only free models to keep a request free. That is documented, sensible, and worth knowing before you build a chain.
On ours, only the attempt that answers is billed, so one call is never billed twice, a reply from a fallback carries X-Fallback-From with the model that failed, and the model field names the model that answered. Your key’s model list applies to each fallback, so a key restricted to cheap models cannot be silently moved to an expensive one. That interaction is the strongest argument for model lists on keys: they make the fallback chain a budget decision you made in advance. The uptime and fallbacks guide explains how to set a chain, and the header reference lists every header named here.
Trade 5: what does the convenience cost in fees and credit terms?
A unified API is a service, and services charge. Where the charge lands differs. OpenRouter’s FAQ states that it passes through the pricing of underlying providers without markup, charges a fee of 5.5 percent with a $0.80 minimum when you buy credits (5 percent on crypto payments), and reserves the right to expire unused credits after one year. It also charges a fee when you bring your own provider keys above a monthly allowance. Those are published terms and a fair price for a mature product with broad coverage.
Because of the minimum, the effective rate falls as the purchase grows. The arithmetic: the fee is the larger of 5.5 percent of the purchase and $0.80, so the crossover is $0.80 divided by 0.055, about $14.55.
OpenRouter credit-purchase fee as a share of the purchase
- Buy $516.0%the $0.80 minimum applies
- Buy $108.0%5.5 percent would be $0.55, so the minimum applies
- Buy $255.5%$1.375
- Buy $1005.5%$5.50
The takeaway is not that OpenRouter is expensive. At $100 it is the rate it says it is. The takeaway is that small test purchases carry a high effective rate on any service with a minimum fee, so test with credit that costs nothing before you buy anything. Ours: the sign-up credit pays priced models first, the free lane needs no balance, and adding credit later is done by email, in the amount you ask for, because online checkout is not open yet. That has a cost too, which is time: you wait for a person. The post on why paid access is set up by email explains why we do it and what you give up. The full fee picture across gateways is in what LLM gateways charge and prepaid credits, what to check, and reading a usage record against the bill shows how to audit what you were charged.
Trade 6: what happens when the gateway is the thing that is down?
One key for every model concentrates access as well as risk. If the gateway is unreachable, so is every model behind it, even when each provider is healthy. This is the same trade as any middle layer, and the mitigation is the same too: a second route.
Two details from the docs are worth reading before you rely on a gateway’s resilience. First, OpenRouter’s limits page says that making additional accounts or API keys will not affect your rate limits, because capacity is governed globally, so spreading across keys does not buy headroom there. Check what applies on any gateway before you design around many keys. Second, fallback inside a gateway protects you from a provider outage but not from a gateway outage. A real second route is a second base URL in your own configuration, ideally a different company, which is what the alias map and a short drill make cheap.
What a good status page looks like is its own checklist, LLM API status page checklist, and ours is the live status page with per-model availability. We also publish usage on the rankings page, built from the gateway’s own records, so you can see which models are really being used before you depend on one. If you are weighing an acquisition headline against your own continuity, what changes when OpenRouter joins Stripe lists what to watch without speculating.
When should you use direct access instead?
A unified API is not always the right answer, and we say so even though we sell one. Go direct when you use exactly one model from one maker, when you need a vendor feature the compatibility layer does not carry, when contractual data terms must be with the model maker and no one else, or when a first-token budget in the tens of milliseconds leaves no room for a hop. Go unified when you use several models, when you compare models on your own prompts, when a second route matters, or when one invoice and one usage view are worth the trade.
Which setup fits what you are doing?
Trying several models before choosing one
model field of each reply, and cap output with max_tokens. On One AI API Key the 48 free ids share 100 requests and 3,000,000 tokens a day, so it costs nothing. The free tier comparison has the numbers.Shipping one model in a product
Running a coding agent
Handling private or regulated data
What should you set on day one with any unified key?
These ten settings take about twenty minutes. Tick what you have done and the band below tells you where you stand. Nothing is stored or sent.
Day-one checklist for a unified API key
0 of 10 done
Not started
Start with limits and model lists: they cost nothing and cap the loss from a leak or a loop.
How does One AI API Key do on its own tests?
We sell a unified API, so here is how it fares against the checks above, with the honest gaps. Everything here is on the site today and linked.
- Sign-up and cost to try. Google sign-in only, no card field. The $10 sign-up credit pays priced models first, and 48 free ids share 100 requests and 3,000,000 tokens a day per account, refilling at 00:00 UTC. The free ids work at a $0 balance. See the free models page.
- Prices before you ask. Rates per million tokens are on the models page and the pricing page, from one file. Paid models beyond the credit are set up by hand by email, so you know the price before you contact us. Online checkout and the monthly plans are not open yet. Our cost calculator turns token counts into dollars.
- Per-key controls. Spend limit, expiry, model list, IP allowlist and a requests-per-minute ceiling on each key, plus an account cap per day, week or month. The cost control documentation lists them, and the cap that stops a request can be crossed slightly by the request in flight.
- Visible switching. A fallback answer carries
X-Fallback-From, the reply’smodelfield names the model that answered, and only the answering attempt is billed. - What we cannot offer. A dollar budget per model as a separate rule, a published hop-latency benchmark and a quote of the provider’s data terms on your behalf. The transparency page says what we monitor and what we cannot see, and the free models run on upstream providers we choose and watch but do not host.
- Where rivals win. OpenRouter has the broader catalogue, a longer track record and a published fee schedule; LiteLLM gives you control of the whole stack if you will operate it; going direct removes a company from the path. Our honest comparison with OpenRouter and the dated comparison page set out the detail, and the nine-option gateway table puts all of them side by side. For a wider list, see OpenRouter alternatives and the 12-point provider checklist.
The test that matters most is the one you run yourself. Sign in, create a key with a $1 limit and a model list of one free id, run the identity script, open the usage page and confirm that the request you just sent is the only one listed, with tokens that match the usage object. The eight-test free protocol extends that to streaming, tool calls, errors and a support reply, and works on any gateway. The quickstart is on the docs quickstart page and the chat on the chat page uses the same allowance if you would rather try a model in the browser first. If a reply is capped rather than failed, the 429 guide separates the causes, and the post on reducing LLM API costs shows how to stretch whatever balance you hold.
Run the identity script on the free lane
$10 sign-up credit, 48 free models sharing 100 requests and 3,000,000 tokens a day, no card.
Frequently asked questions
What is a unified LLM API?
model field changes. The explainer on what an LLM gateway is covers the mechanics, and this post covers the price you pay for the convenience.Is a unified API slower than calling the provider directly?
Does one key for every model mean one point of failure?
Can I set a budget for a single model?
Do model names stay the same across gateways?
:free ending on the free lane. Keep an alias map in your own config, as the exit plan guide shows, so a rename is a one-line change.Who can see my prompts when I use a unified API?
How do I know a unified API serves the model it names?
model field of the reply, compare token counts with your own tokenizer, and run the checks in the verification guide. A 2026 study of shadow APIs found identity verification failures in 45.83 percent of its fingerprint tests, so the habit is worth the ten minutes. The study, explained says exactly what it did and did not audit.