Matching model size to the job, request by request

Every provider now offers a ladder of models: a small, fast, inexpensive tier, a balanced middle and a large, slow, expensive top. Developers comparing options across vendors, for example a light Claude model against a large model from another lab, keep arriving at the same insight: one is better for high-volume simple tasks, the other for deep reasoning and big context. Launch announcements add to the noise, promising near-top performance at mid-tier prices.
This article turns that insight into a working method. It describes which tasks small models handle well, where large models clearly win, how to test the boundary on your own data and how to build a simple router that sends each request to the cheapest model that can do it. It includes a free open model as the bottom rung. AnthropicKeyFreeAPI is an independent site and is not affiliated with Anthropic; current model names and prices are on each provider's official pages.
Frequently asked questions
What counts as a small model?
Informally, a model at the fast, inexpensive end of a provider's line-up, or an open-weight model in the tens of billions of parameters. Size is relative and shifts every year as capabilities improve.
Which is better for classification, a small or a large model?
Usually a small one. Assigning a label from a fixed list, extracting fields or detecting language are tasks where small models reach high accuracy at a fraction of the cost and latency.
How do large models differ in practice?
They hold more knowledge, follow complex multi-step instructions more reliably, reason better on novel problems and make fewer subtle mistakes on long code changes and nuanced writing.
What is model routing?
Sending each request to a model chosen by rules or a classifier, so easy requests go to a cheap model and hard ones to a strong model. It is one of the most effective ways to cut costs.
Does a bigger context window mean a better model?
No. Context size is how much text a model can take in; quality is how well it uses it. A small model with a long context can still miss details a larger model would catch.
Are launch claims like near-top performance at mid-tier price reliable?
They are often true on the benchmarks chosen. Whether they hold for your tasks is something only your own evaluation can show.
Where does free-ai sit on the ladder?
It is an independent open-weight model of about 35B parameters, comparable to a small-to-mid tier. It is free and keyless here, but not Claude and not as capable as frontier models.
The model ladder in one picture
Think of three rungs. The bottom rung is fast and cheap, ideal for repetitive work at scale. The middle rung balances cost and quality and handles most general tasks. The top rung is the most capable and the most expensive, reserved for difficult reasoning, critical outputs and complex agent work.
Free open models fit at or near the bottom rung. Their price per token is zero, but they bring limits, shared capacity and no service guarantee. Local models sit in a similar place, with the cost moved to your hardware.
Price scales faster than quality
Moving up a rung often multiplies the price while improving quality only on some tasks. That gap is where routing saves money.
Latency matters too
Small models usually answer faster. For interactive features where users wait, speed can matter as much as a marginal improvement in quality.
Tasks where small models shine
Small models do best when the task is well defined, the output is short or structured and the answer can be checked. Many production workloads look like this, which is why high-volume pipelines lean on light models.
A good test: if you could write precise instructions for a temp worker to follow without needing to think hard, a small model can probably do it.
The economics are compelling. If a small model handles most of a task's volume and only a minority of cases escalate, the blended cost stays close to the small model's price while quality on the hard cases matches the large one. That is the whole argument for routing in one sentence.
Structured output helps small models
Asking for a fixed JSON shape or a single word from a list makes small models far more reliable than asking for free-form prose. Validation then catches the occasional slip.
- Labelling support tickets, reviews or emails from a fixed set
- Extracting names, dates and amounts into JSON
- Summarising short documents into a few bullet points
- Rewriting text in a different tone or length
- Detecting language, sentiment or spam
- Generating titles, tags and meta descriptions

Tasks where large models clearly win
Some tasks show a clear and consistent quality gap. Multi-step reasoning on unfamiliar problems, long code changes that touch many files, subtle bug hunting, careful legal or medical-adjacent wording and long-form writing with a consistent argument all benefit from the top rung.
Agent work is the most obvious case. A small model may follow a tool format for a few steps, then lose the plan. A frontier model keeps the thread across dozens of steps and recovers from errors more gracefully.
Writing quality is a subtler case. Small models produce fluent text, and for short pieces the difference may not be noticeable. In longer pieces the gap shows up as repetition, weaker structure and claims that drift from the source. Readers notice even when they cannot say why.
Long context needs strong attention
Asking a question about a detail buried in a long document is harder than it looks. Larger models are generally better at finding and using the right passage.
Cost of a mistake decides
If a wrong answer is cheap and visible, a small model is fine. If it is expensive or hidden, pay for the strongest model you can.
Testing the boundary on your data
Instead of guessing where the boundary lies, measure it. Take a few hundred real examples of a task, run them through a small and a large model, and compare the outputs with a human-checked answer or with each other. You are looking for the share of cases where the small model is good enough.
If the small model matches on most items, route the task to it. If it diverges on a predictable subset, such as long inputs or a certain category, route only that subset to the large model.
Agreement is a cheap signal
Where you lack labelled answers, measure how often the small model agrees with the large one. High agreement suggests the small model suffices; disagreement points to the hard cases.
Check the tails
Averages hide failures. Read the twenty worst small-model answers; they tell you which inputs need escalation.

A simple router in code
Routing does not require machine learning. Start with rules: input length, task type and a confidence check. The example below sends classification to the free model and asks it to report confidence; low-confidence or long inputs are escalated to a stronger model you configure.
Self-reported confidence is rough
Models are not perfectly calibrated, so treat the number as a hint. Validate the threshold against your own labelled sample and adjust it.
import json
import os
from openai import OpenAI
small = OpenAI(base_url="https://api.anthropickeyfreeapi.com/v1", api_key="none")
large = OpenAI(base_url=os.environ.get("LARGE_BASE_URL", "https://api.anthropickeyfreeapi.com/v1"),
api_key=os.environ.get("LARGE_API_KEY", "none"))
LARGE_MODEL = os.environ.get("LARGE_MODEL", "free-ai")
LABELS = ["billing", "bug", "feature", "other"]
PROMPT = ("Classify the message into one of " + ", ".join(LABELS) +
'. Reply as JSON: {"label": ..., "confidence": 0-1}.')
def classify(text):
if len(text) < 4000:
r = small.chat.completions.create(
model="free-ai", temperature=0,
messages=[{"role": "system", "content": PROMPT}, {"role": "user", "content": text}],
)
try:
out = json.loads(r.choices[0].message.content)
if out.get("label") in LABELS and float(out.get("confidence", 0)) >= 0.7:
return out["label"], "small"
except (ValueError, TypeError):
pass
r = large.chat.completions.create(
model=LARGE_MODEL, temperature=0,
messages=[{"role": "system", "content": PROMPT}, {"role": "user", "content": text}],
)
return json.loads(r.choices[0].message.content).get("label", "other"), "large"
print(classify("I was charged twice for my subscription this month."))Reading launch claims sensibly
New models are often announced as delivering near-top performance at a lower tier's price, sometimes with introductory pricing for a limited period. These claims can be genuine and are worth testing, but they describe averages on selected benchmarks. Your tasks may land above or below the average.
Introductory prices also end. When you evaluate a new model, compare it at its regular price, and keep your router configurable so you can move traffic again when terms change.
Keep a record of the claims that mattered to your decision and revisit them after a few weeks of real use. Production traffic is a better benchmark than any launch chart, and it will either confirm the switch or tell you to move back.
Watch for quiet changes
A model served under the same name can be updated by its provider. Re-run your boundary test periodically so a change in behaviour does not go unnoticed for months.

Cost and throughput at volume
At high volume, small differences add up. A task that runs a million times a month on a top-rung model can cost many times what it would on a small one, for little or no visible gain. Conversely, a cheap model that produces errors requiring manual correction is not cheap at all once staff time is counted.
Throughput is the other constraint. Small models handle more requests per second on the same hardware, and free shared endpoints add rate limits. The one here allows one request per second per IP with bursts of three, two in parallel and a daily ceiling of 10,000 requests or 10 million tokens. For volumes beyond that, a paid small model or local hardware is the right step.
Measure cost per correct result
Divide what you spend by the number of acceptable outputs, including the time people spend fixing errors. That figure, not price per token, decides which tier is cheaper.
Mixing providers safely
A router can span providers: a free open model for the bottom rung, a paid light model for the middle, a frontier model at the top. Since most providers and local runners accept the OpenAI chat format, the code stays simple. Anthropic's native API uses its own Messages format, which needs a small adapter; see Messages API vs chat completions.
Keep data rules consistent across rungs. If some requests contain personal data, route them only to providers whose terms cover it, regardless of difficulty.
Record which model answered
Store the tier and model with every result. When quality questions arise later, you can see immediately whether escalation worked as intended.

A practical starting point
Start every new task on the smallest model you have, measure where it fails and escalate only those cases. Most teams discover that a large share of their traffic never needed the top rung. Revisit the routing every few months as models change.
The free endpoint is a convenient bottom rung for experiments: no key, no billing and the same chat format as everything else. For other ideas on where it fits, see the n8n rewrite pipeline and tracking API spend. free-ai refuses less than commercial assistants while keeping two hard rules, no sexual content involving minors and no operational guidance for mass-casualty weapons.
Remember that the boundary moves. Each generation of small models absorbs tasks that previously needed a large one. A routing table that was right last year may now be sending too much to the top rung, so a scheduled re-test is cheap insurance against overspending.
Send a prompt to the keyless free-ai endpoint from the home page and see how it handles your own task, no signup needed.
Read also
- Can you run a chat subscription inside third-party AI agents?
- How do you keep track of AI API spend across several providers?
- Why do AI coding agents burn through so many tokens so quickly?
- What does an overloaded error from an AI API mean, and what helps?
- How to build an n8n pipeline that refreshes old blog posts with AI