You can verify that an LLM API serves the real model by sending the same small, fixed requests to it and to a baseline you trust, then comparing token counts, repeated answers, identity probes, tool behaviour, parameter handling and long-context recall. No single check proves anything, but six together, run on about a hundred requests, catch the lazy swaps and the padded bills and give you evidence for the careful cases.
What are you actually trying to find out?
Three different questions hide inside “is it the real model”, and each one has its own test. The first is identity: is the model that answers the one you asked for, or a cheaper one with the same label? The second is fidelity: do your settings, tools and parameters arrive and behave as you wrote them? The third is the bill: does the token count you are charged for match what you sent?
The research is clear about why this is hard. Cai and colleagues show that software-only detection is fundamentally unreliable against a provider working to hide a substitution: text-based tests need many queries and fail against subtle swaps, and log-probability methods are defeated by nondeterminism. The practical answer is not to give up. It is to collect several independent kinds of evidence, each cheap, and to treat the pile as a judgement, not a proof. Our post on reseller risks summarises what the audits found when people did this at scale, and the explainer on LLM gateways shows which step of the request path each check probes.
You also need to decide what “real” means. Two correct deployments of one set of open weights can answer the same prompt differently, because of the inference engine, the numeric precision, the sampling defaults and batching, which is why the transparency page refuses to promise identical output. Artificial Analysis makes the same point in its Endpoint Accuracy Index: it reruns a fixed suite, built from a tool-calling subset, a hard-reasoning set and a long-context recall set, on each provider’s endpoint and scores it against a self-hosted reference, so 100% means the endpoint matches. Your baseline can be the official endpoint, a copy you run, or published results. A copy you run is the subject of the self-host comparison, and if the endpoint you trust is another gateway, the list of OpenRouter alternatives and the migration guide show how their model ids and fallbacks differ from ours. Without a baseline, you can only look for contradictions.
How do you set up a fair test?
Most disappointing results are set-up errors, so this part decides whether the rest means anything. Fix everything you can and change one thing at a time.
- One concrete model id, no routing magic. Do not use an auto id, a virtual model or a fallback chain. On this gateway, the model you named is retried up to twice first, and if it is still failing, fallback rules, presets and automatic routing move the request to another similar model; the reply then names the model that failed in an
X-Fallback-Fromheader. The failover rules have the details. Send noX-Fallback-Modelsheader while you test, and check that none comes back. A virtual or auto model answers by rule, so it is the wrong thing to fingerprint. - Identical settings on both sides. Same temperature, same
max_tokens, same system prompt, same API mode. The chat completions reference lists the fields, and the guide to switching an SDK to a different base URL shows the two lines that change. - Keep every request id. Our replies carry
X-Request-Id, listed in the headers reference and explained in the error reference. The same id appears on your usage page, next to the model, the input, output and cached tokens and the cost. We keep counts, never content, so keep your own copy of every prompt and reply. - Practise on the free lane. The ids on the free models list bill $0 per token and work with a $0 balance, so you can run the whole kit without spending anything or adding a card. Free ids do count against the shared daily allowance, which is why the budget table matters.
The official OpenAI Python SDK is enough for every script below: only the base URL, the key and the model id change, and the quickstart shows how to create a key. Set BASELINE_BASE_URL, BASELINE_API_KEY and BASELINE_MODEL for the endpoint you trust, and keep keys in environment variables, as the API key security guide recommends.
| Check | Requests to the suspect | Rough tokens | What it costs on a free id |
|---|---|---|---|
| 1. Token reconcile | 3 | about 150 | $0, 3 of the daily requests |
| 2. Graded repeats | 30 | about 2,400 | $0, 30 requests |
| 3. Identity probes | 50 | about 3,000 | $0, 50 requests |
| 4. Tool permissions | 4 | about 1,600 | $0, 4 requests |
| 5. Parameters and errors | 3 | under 100 | $0, 3 requests |
| 6. Long context | 3 | about 75,000 | $0, 3 requests, but the largest token use |
The token figures are our estimates for the scripts in this post and will vary by model. The totals matter more than the details: 93 requests and well under 100,000 tokens, inside a free allowance of 100 requests and 3,000,000 tokens a day.
A loop of ten repeats can trip a limit if you run it too fast. A 429 reply is a limit and not a model result, so wait and retry instead of scoring it as a failure; the 429 guide explains how to tell a provider limit, a key limit and the daily cap apart.
Requests each check sends to the suspect endpoint
- 1. Token reconcile3
- 2. Graded repeats30
- 3. Identity probes50the largest, because distributions need repeats
- 4. Tool permissions4
- 5. Parameters and errors3
- 6. Long context3few requests, many tokens each
The order of the six checks
Check 1: do the token counts reconcile?
Send a short, fixed prompt and compare the input tokens you are billed for with a count from a trusted source. This is the cheapest check and the one that has caught the most in the wild. The ZhuoQi Dev relay audit found that the sentence “Reply with the single word OK.” counted 18 input tokens on a vendor’s official counting endpoint on 14 October 2026, while a relay reselling subscription accounts billed 526 for it, a constant surplus of 508 tokens that was a hidden system prompt. The Wu study found five relays reporting 4,200 to 60,000 more input tokens than the official API for identical requests.
curl -sS https://api.oneaiapikey.com/v1/chat/completions \
-H "Authorization: Bearer $ONEAIAPIKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "z-ai-glm-5.3:free",
"temperature": 0,
"max_tokens": 20,
"messages": [{"role": "user", "content": "Reply with the single word OK."}]
}'
# In the reply, read usage.prompt_tokens and compare it with your baseline count.Where do you get the baseline count? Three options, in order of preference. Some vendors publish a token-counting endpoint, and the ZhuoQi Dev post says one major vendor documents its counting endpoint as free. Next best is the usage figure from the official API itself for the same prompt. For open-weight models, the model’s published tokenizer run locally gives a close count, with a small constant difference from the chat template. The same source notes that a constant difference of around four tokens is usually a template difference, while a constant difference of hundreds or thousands is injected text. Two traps from that post are worth repeating: do not compare against the relay’s own counting endpoint, which may not inject, and for APIs that report cache fields separately, add them before comparing.
A first request that looks clean does not clear the later ones. UnifyLLM recommends testing fresh conversations, repeated prefixes, long histories, tool loops and retries separately, because agent workflows add earlier messages, tool definitions and tool results on later turns. So run the probe once, then a five-turn conversation where you can compute the expected growth, and compare the usage on each turn. Our prompt caching notes explain how cached input shows up in the usage record, and the billing documentation shows how a request is priced from those tokens, so a charge can be recomputed by hand. If the surplus is yours, with a bloated system prompt of your own, the guide to reducing LLM API costs shows how to trim it. Balances are shown rounded down to the cent, so compare your own arithmetic with the per-request cost on the usage page and not with the balance.
Try the arithmetic with your own numbers. The defaults reproduce the ZhuoQi Dev example, priced at an illustrative $0.30 per million input tokens and 300,000 requests a month.
Token reconcile: what a hidden prefix costs you
- Extra tokens on every request
- 508
- Billed as a multiple of the baseline
- 29.22
- short prompts show the biggest multiples
- Extra input tokens per month
- 152,400,000
- Extra cost per month
- $45.72
- Reading
- Likely hidden text or padding
The thresholds are rules of thumb from the sources above, not vendor promises: a few tokens can be a chat template, hundreds or thousands are almost never accidental. The price is an example, not any provider's rate.
Check 2: do repeated answers match a baseline?
One answer is a sample from a random process, so the unit of evidence is a pass rate over repeats. Write a handful of prompts with answers a script can grade, run each ten times at temperature 0 on both endpoints, and compare the pass rates and the prompt-token counts. The script below does it with three tiny prompts, and prints the set of prompt_tokens it saw, which doubles as a second token check: the set should hold one value per prompt.
import os
from openai import OpenAI
TARGETS = {
"suspect": (OpenAI(base_url="https://api.oneaiapikey.com/v1", api_key=os.environ["ONEAIAPIKEY_API_KEY"]), "z-ai-glm-5.3:free"),
"baseline": (OpenAI(base_url=os.environ["BASELINE_BASE_URL"], api_key=os.environ["BASELINE_API_KEY"]), os.environ["BASELINE_MODEL"]),
}
GRADED = [
("What is 17 * 24? Reply with the number only.", "408"),
("Spell the word strawberry backwards. Reply with the word only.", "yrrebwarts"),
("How many days are in a leap year? Reply with the number only.", "366"),
]
RUNS = 10 # a single run proves nothing; ten is the floor
for name, (client, model) in TARGETS.items():
for prompt, expected in GRADED:
passed, prompt_tokens = 0, set()
for _ in range(RUNS):
r = client.chat.completions.create(
model=model, temperature=0, max_tokens=30,
messages=[{"role": "user", "content": prompt}],
)
passed += expected in r.choices[0].message.content.lower()
prompt_tokens.add(r.usage.prompt_tokens)
print(f"{name:9} {passed}/{RUNS} prompt_tokens={sorted(prompt_tokens)} {prompt[:44]}")How much should a gap worry you? Less than you think at ten runs. If the true pass rate is 80%, the 95% margin on a ten-run measurement is roughly plus or minus 25 percentage points, so 7 of 10 and 9 of 10 can come from the same model. At 100 runs the margin is about 8 points. That is why serious tests, such as the one in the model equality paper, compare distributions over many prompts instead of reading one pass rate, and why that paper’s test, built on a simple string kernel, reached a median 77.4% power with an average of only 10 samples per prompt but across a battery of prompts. Use your own prompts too. A public benchmark tells you about the benchmark, and ten to fifty questions from your product tell you about your product.
If you would rather not write the harness, promptfoo is an open-source evaluation runner whose OpenAI provider accepts a custom apiBaseUrl and a named key variable, so one config file can run the same prompts against both endpoints. The transparency page has a ready-made config for our free ids. The aim is the same either way: identical prompts, identical settings, many runs, and a comparison you can repeat next week.
Check 3: does an identity probe match the reference?
Identity probes ask questions with a small set of valid answers, many times, and compare the tally with a trusted endpoint’s tally. The idea comes from the fingerprinting literature. LLMmap sends a few crafted queries and identified 42 model versions with over 95% accuracy from as few as 8 interactions. The distributional fingerprint auditing paper by Miao and colleagues queries simple finite-choice probes repeatedly and compares the response distributions to a reference, and it reports high detection of full substitution with five probes and 250 relay requests per audit, against stored reference fingerprints for 16 models from 10 families.
The script below is a small cousin of that idea, not a reimplementation. It runs five random-choice prompts ten times on each endpoint and prints a distance between the tallies. The important part is the noise floor: it samples the baseline twice and prints that distance too. With ten samples, two draws from the same model differ visibly, and a suspect only looks odd if its distance clearly exceeds the baseline’s own.
import os, collections
from openai import OpenAI
suspect = OpenAI(base_url="https://api.oneaiapikey.com/v1", api_key=os.environ["ONEAIAPIKEY_API_KEY"])
baseline = OpenAI(base_url=os.environ["BASELINE_BASE_URL"], api_key=os.environ["BASELINE_API_KEY"])
SUSPECT_MODEL, BASELINE_MODEL = "z-ai-glm-5.3:free", os.environ["BASELINE_MODEL"]
PROBES = [
"Pick one at random: amber, birch, coral, delta. Reply with that word only.",
"Pick a whole number from 1 to 8 at random. Reply with the digit only.",
"Heads or tails? Reply with one word.",
"Name one primary colour at random. Reply with one word.",
"Choose a letter from A to F at random. Reply with the letter only.",
]
def sample(client, model, prompt, n):
tally = collections.Counter()
for _ in range(n):
r = client.chat.completions.create(model=model, temperature=1, max_tokens=20,
messages=[{"role": "user", "content": prompt}])
tally[r.choices[0].message.content.strip().lower()] += 1
return tally
def distance(a, b): # total variation distance: 0 = same tallies, 1 = nothing in common
na, nb = sum(a.values()), sum(b.values())
return 0.5 * sum(abs(a[k] / na - b[k] / nb) for k in set(a) | set(b))
N = 10
for p in PROBES:
ref_1, ref_2 = sample(baseline, BASELINE_MODEL, p, N), sample(baseline, BASELINE_MODEL, p, N)
sus = sample(suspect, SUSPECT_MODEL, p, N)
print(f"noise floor {distance(ref_1, ref_2):.2f} suspect vs baseline {distance(ref_1, sus):.2f} {p[:42]}")Two warnings from the same papers. First, settings matter: the Miao authors report that configuration overrides can lead to a rejection even when the served model has not changed, so keep temperature, token limit and API mode identical on both sides. Second, a mismatch is evidence of difference, not of fraud. A different quantization, a different inference engine or a different chat template can move a distribution. When a mismatch survives fixed settings and a few repeats, it is worth a question to the provider. You can also ask a model to name itself, but treat the answer as the weakest signal here, since UnifyLLM reports a channel that edited a reply to change the product name it gave.
Check 4: do tool calls and permissions behave?
Agents depend on tool calls, and tool behaviour is where relays and hosts diverge in measurable ways. Wu and colleagues found four relays that returned tool calls despite instructions disabling them. Moonshot built the K2 Vendor Verifier because third-party hosts of its Kimi K2 model diverged on tool calls, and the Artificial Analysis index above includes a tool-calling subset run with repeats for the same reason. If your agent can touch files, shells or money, this check is not optional, and the coding agent key guide shows how to give each tool its own key with a spend limit.
Send a request that defines a tool and sets tool_choice to none. The reply must contain text and no tool_calls. Then repeat with auto and check that the arguments parse as valid JSON and match your schema. Pick a model whose page lists tool calling; our tool calling guide shows what the gateway passes through.
curl -sS https://api.oneaiapikey.com/v1/chat/completions \
-H "Authorization: Bearer $ONEAIAPIKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_ID_THAT_LISTS_TOOL_CALLING",
"tool_choice": "none",
"max_tokens": 200,
"tools": [{"type": "function", "function": {
"name": "get_weather",
"description": "Get the weather for a city",
"parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}
}}],
"messages": [{"role": "user", "content": "What is the weather in Pune right now?"}]
}'
# With tool_choice "none" the reply must hold text and no tool_calls. Repeat with "auto" and check the arguments parse as JSON.Our gateway has one intentional edit here. If a model refuses tool calling, the gateway can resend the request without tools, and the reply then carries an X-Tools-Dropped: 1 header, listed in the headers reference. We would rather the edit be visible than silent, and you can add the header to your checks: any reply that arrives without tools should say so. Whatever the provider, enforce permissions in your own client as well. A model told not to call a tool is a polite request, not a control.
Check 5: does the API handle bad parameters like the original?
Send a few requests that should fail, and compare the status codes with your baseline. The ZhuoQi Dev audit found a relay that answered temperature: 9, a value outside the valid range for that vendor, with a 200 where the official API returned a 400, and another that stripped a valid region setting without any error. Silent acceptance looks friendly and means your request did not arrive as written.
# 1. A value far outside the valid range. Compare the status code with your baseline, not with a rule.
curl -sS -o /dev/null -w "%{http_code}\n" https://api.oneaiapikey.com/v1/chat/completions \
-H "Authorization: Bearer $ONEAIAPIKEY_API_KEY" -H "Content-Type: application/json" \
-d '{"model": "z-ai-glm-5.3:free", "temperature": 9, "max_tokens": 5, "messages": [{"role": "user", "content": "Hi"}]}'
# 2. A model id that does not exist: expect a 4xx, never a 200 from some other model.
curl -sS -o /dev/null -w "%{http_code}\n" https://api.oneaiapikey.com/v1/chat/completions \
-H "Authorization: Bearer $ONEAIAPIKEY_API_KEY" -H "Content-Type: application/json" \
-d '{"model": "no-such-model-9999", "max_tokens": 5, "messages": [{"role": "user", "content": "Hi"}]}'
# 3. A wrong key: expect 401.
curl -sS -o /dev/null -w "%{http_code}\n" https://api.oneaiapikey.com/v1/chat/completions \
-H "Authorization: Bearer not-a-real-key" -H "Content-Type: application/json" \
-d '{"model": "z-ai-glm-5.3:free", "max_tokens": 5, "messages": [{"role": "user", "content": "Hi"}]}'Be careful in two ways. Vendors differ: some clamp or ignore an out-of-range temperature, so the right comparison is your baseline, not a rule. And probes can cost money on some relays, because the ZhuoQi Dev post saw relays that billed an accepted invalid request or retried a rejected one on another channel. Send each probe once and check the usage log before you repeat it. On our gateway, requests that fail before the model produces anything are not charged, as the billing documentation says, and the error reference shows what an error and its request id look like. The wrong-key and unknown-model probes are the safest to run first.
Check 6: does the model find a fact in a long prompt?
A provider can advertise a very long context window and serve less of it when capacity is tight, and even honest long windows are used unevenly. The Artificial Analysis suite includes a long-context recall set for this reason, and the transparency page cites the research on facts getting lost in the middle of long prompts. The test is simple: bury a short fact at a chosen depth in filler text, ask for it, and see whether it comes back.
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.oneaiapikey.com/v1", api_key=os.environ["ONEAIAPIKEY_API_KEY"])
FILLER = "The committee reviewed the quarterly logistics report and moved on to the next item. "
NEEDLE = "The vault code is 7413. "
def build(sentences, depth):
parts = [FILLER] * sentences
parts.insert(int(sentences * depth), NEEDLE)
return "".join(parts) + "\n\nWhat is the vault code? Reply with the digits only."
SENTENCES = 1500 # roughly 25,000 tokens; keep it well under the model's advertised window
for depth in (0.1, 0.5, 0.9):
r = client.chat.completions.create(model="z-ai-glm-5.3:free", temperature=0, max_tokens=20,
messages=[{"role": "user", "content": build(SENTENCES, depth)}])
print(f"depth {depth:.0%}: {'found' if '7413' in r.choices[0].message.content else 'MISSED'} prompt_tokens={r.usage.prompt_tokens}")Run it at lengths below the model’s advertised window first, then at lengths near it, and at three depths each time. A model that finds the fact at the start and end and misses it in the middle is behaving like many honest models do. A model that fails at half its advertised window, or returns an error you did not expect, is worth a note. Our models documentation lists the advertised window for each model, and the long-context check is the one place where paid tokens can add up, so start with a free id and use the cost calculator before you scale the prompt on a priced one. The open model price comparison lists per-million rates, which turns a 75,000-token run into a figure in cents.
How do you read the results?
Put the six results next to each other before you decide anything. A single odd result has many innocent explanations. Two or three that agree are a pattern.
| What you saw | Likely cause | What to do next |
|---|---|---|
| Constant surplus of hundreds of input tokens | A hidden system prompt or padding | Repeat with a second prompt. If it persists, stop adding balance and ask the provider to explain |
| A few tokens of constant difference | Chat template differences | Nothing, unless it grows with prompt length |
| Pass rates lower on the suspect, but inside the margin | Noise at ten runs | Increase to 50 or 100 runs, or add more prompts |
| Identity distance well above the baseline’s noise floor, with fixed settings | A different quantization, engine or model | Repeat on another day, then ask which model and precision are served |
| Tool calls returned with tools disabled | The provider ignores the instruction | Enforce permissions in your client and do not use that route for agents |
| 200 where the baseline gave 400 | Parameters dropped or clamped | Test every parameter your product relies on |
| Long-context miss far below the advertised window | Less context served than advertised | Use shorter prompts or another route, and report it |
Pick the result you got
Tokens do not match
usage in the reply with the row on your usage page and keep both. The reseller risks post explains the patterns seen in the audits.Answers are a bit worse
Tool calls appear when disabled
Everything passes
What can these checks not tell you?
Quite a lot, and it is better to say so now than to oversell a hundred-request kit. They cannot see the GPU, the numeric precision or the serving stack. They cannot prove identity against a provider that mixes models or substitutes a close sibling; Cai and colleagues say as much, and propose hardware attestation as the only strong answer. They cannot tell you about next week: a route that passes today can change quietly. And they say little about speed and capacity under load, which need production monitoring and a few weeks of data.
Our own position is the same, and we would not claim more. The transparency page lists what we monitor and what each monitor cannot tell you. We measure uptime, speed and errors from real traffic, probe every listed model, and keep a manual black-box audit tool that follows the ideas above; it is not public today and it is not a scheduled monitor. No job scores every route’s answers against an official endpoint. A problem you report to support is read by a person, on the evidence you send. If you want a second opinion on us, run this kit, and the free lane makes that cost nothing. The review of One AI API Key says what you get and what you do not, and the privacy guide covers what the gateway sees while you test.
What should you do with a bad result?
Write it down before you argue about it. A useful evidence packet has the model id, the date and time, the request ids, the exact prompt and settings, the replies, the baseline replies and the usage figures from both sides. UnifyLLM’s advice for a suspect reseller is to stop adding funds, keep the original requests, responses and billing records, compare several task types under fixed settings, and ask the service to explain its actual routing and fallback rules. That is sound for any provider.
For us, send the packet to somdutt777@gmail.com and see the reporting steps. Our policy is plain: it is an online product and people can change their mind, but once a key is created and usage is consumed, we do not provide refunds. If the key does not work, or there is a technical problem on our side, support will look at it, with a genuine concern, decided case by case. The terms are the policy page. For any other provider, read its money-back terms before you rely on them: the guide to reading money-back terms lists what to look for, and the guide to prepaid credits covers how to limit what you put at risk. If you are choosing between providers, the 12-point provider checklist puts substitution next to price, limits, privacy and money-back terms, and the fee comparison covers the cost side. Free models are a good place to learn the checks: see the free model guide for which ones suit which task, the no-card guide for the limits, and the chat for a no-code look (the chat guide says what it can do). The monthly cost estimate guide helps you size the paid runs, and the pricing page shows how credit is added by email while online checkout is closed.
Run the kit against a free model first
$10 sign-up credit, 47 free models sharing 100 requests and 3,000,000 tokens a day, no card.
Frequently asked questions
Can I verify an LLM API without access to the official one?
How many requests do I need before I can trust a result?
Can I just ask the model which model it is?
Will these checks cost me money?
What if my results differ from the official API?
How do I report a bad result to One AI API Key?
X-Request-Id header, the exact prompt and settings, the answers and the baseline answers. A person reads it, and the reporting steps say what happens next. Once a key is created and usage is consumed, that usage is final, because it is an online product. If the key does not work or there is a technical problem on our side, support will look at it: the concern has to be genuine, and exceptions are decided case by case. The terms are the policy page.Does a fallback model change my results?
X-Fallback-From header. The failover rules explain it. For a clean test, send no X-Fallback-Models header, use a concrete model id and confirm that no X-Fallback-From header comes back. If one does, discard that reply from the comparison. The gateway explainer shows where in the path the switch happens.