Compare Chat Models with One Script: Same Prompt, Compare Speed, Tokens and Cost
CQTAI
10/28/2026

"Which model should I use?" is the wrong first question. A better one is: which model is good enough for my task at a price I accept? You answer it with your own prompts, not with a leaderboard.
Because every chat model on CQTAI sits behind the same POST /v1/chat/completions endpoint, a comparison is cheap to build. Change the model string, keep everything else the same, and measure.
What to measure
For each model, with the same prompt:
- Latency, the wall-clock time until the answer is complete.
- Tokens, the prompt and completion counts from
usage. - Cost, tokens multiplied by that model's price.
- Quality, which only you can judge. Save the answers so you can read them side by side.
Where the price comes from
The public model list needs no key and has a price for every chat model:
curl https://api.novapi.ai/v1/models
A chat entry looks like this (the numbers are an example, read the live ones):
{
"id": "MODEL_ID",
"category": "chat",
"pricing": { "prompt": "0.0006", "completion": "0.0022", "unit": "points_per_token" }
}
The unit is points per token, and 1 USD is 100 points on the international site. To read a price in the way vendors quote it, multiply by 10,000: a prompt price of 0.0006 is 6 USD per million input tokens, and a completion price of 0.0022 is 22 USD per million output tokens. Cached input has its own, cheaper field when the model supports it.
The script
import os, sys, time, requests
BASE = "https://api.novapi.ai/v1"
HEAD = {"Authorization": "Bearer " + os.environ["API_KEY"]}
PROMPT = "Explain what an API rate limit is in two sentences."
# 1. Read the public catalog and keep chat models that have a price
catalog = requests.get(BASE + "/models", timeout=30).json()["data"]
chat = {m["id"]: m for m in catalog if m.get("category") == "chat" and m.get("pricing")}
candidates = sys.argv[1:] or list(chat)[:3]
print(f"{'model':28} {'seconds':>8} {'in':>6} {'out':>6} {'points':>10}")
for model in candidates:
price = chat[model]["pricing"]
t0 = time.time()
r = requests.post(
BASE + "/chat/completions",
headers=HEAD,
json={"model": model, "messages": [{"role": "user", "content": PROMPT}]},
timeout=120,
)
secs = time.time() - t0
if r.status_code != 200:
print(f"{model:28} failed: HTTP {r.status_code}")
continue
u = r.json()["usage"]
points = u["prompt_tokens"] * float(price["prompt"]) + u["completion_tokens"] * float(price["completion"])
print(f"{model:28} {secs:8.1f} {u['prompt_tokens']:6d} {u['completion_tokens']:6d} {points:10.4f}")
Run it with the models you want to compare:
API_KEY=sk-... python compare.py MODEL_A MODEL_B MODEL_C
The output is one row per model, with seconds, input tokens, output tokens and points. It prints the model ids you passed, so use ids exactly as they appear in the catalog.
Reading the result
A few things will surprise you the first time:
- A reasoning model can use far more output tokens than the visible answer. Some models think before they answer, and those thinking tokens count in
completion_tokensand are billed at the output price. A two-sentence answer that reports hundreds of output tokens is normal for them. Compare the cost, not just the length of the text. - Latency varies from run to run. One timing means little. Run each model several times and look at the middle value.
- The cheapest model is not the cheapest answer. A model that needs a second attempt, or a longer prompt to behave, can cost more than a pricier one that gets it right the first time.
- Your prompt decides. A model that wins on a trivia question may lose on your real task. Replace
PROMPTwith a handful of real inputs from your product.
Make it a habit
When a new model appears in the catalog, rerun the script on your own prompts before you switch anything. Keep the prompts and answers in your repository and you have a small regression suite for model changes. If you want a safety net after you choose, combine it with model fallback, and cap the spend of the test key as described in one key per script.