How to route AI work without wasting money
Match tasks to suitable tools, understand subscriptions and API bills, and compare the cost of completed work rather than the price of one answer.
Routing means choosing where a task goes. You can do it manually: use an ordinary calculator for arithmetic, an assistant you already subscribe to for project work, or a suitable local model for a small task.
You do not need a custom router, another subscription, or several agents to begin. The aim is the lowest practical cost for a correct, usable result.
Know which bill you are using
There are three common cost situations:
| Route | What you pay for | What to check |
|---|---|---|
| Existing subscription | The plan, plus any separately enabled extras | Remaining allowance, model availability, and extra-usage settings |
| Metered API | Usage charged under that provider's rates | Input, output, tool charges, and applicable spending controls |
| Local model | Your hardware, power, setup, and operating time | Model fit, speed, answer quality, and whether work really stays local |
OpenAI documents subscription access and a separate API-key route for Codex. API-key usage follows API pricing; subscription allowances have their own rules. Codex access and pricing (opens in a new tab)
Claude Code likewise distinguishes included subscriber usage from API billing. Its displayed session dollar estimate should not be assumed to be an additional bill for a subscriber. Check the account's actual billing and usage screens. Claude Code cost guidance (opens in a new tab)
Ollama offers both local execution and cloud services. Cloud usage has its own pricing; the Ollama name alone does not mean a task is free or local. Ollama pricing (opens in a new tab)
Already-paid capacity may let you finish a task without an additional charge. It still uses allowance that you might need for other work. Buying another subscription purely for a small task may cost more than the task warrants.
Try an ordinary tool first
If you need to add numbers, sort rows, compare two text versions, or check JSON syntax, a conventional tool may do the job more directly than a model.
AI is useful for interpreting unclear requests and generating or reasoning about material. It does not need to perform every mechanical step. This is one reason a small browser tool can provide real value without an AI bill.
Match the model to the difficulty
Use these as starting hypotheses to test, rather than guarantees about a brand:
| Task | Sensible starting route | Evidence you need |
|---|---|---|
| Format supplied text | Ordinary tool or a capable smaller model | Meaning and details preserved |
| Label repetitive examples | Tested local or lower-cost model | Accuracy on representative samples |
| Make a bounded code change | Coding assistant with suitable project access | Relevant checks and a reviewed change |
| Diagnose a difficult recurring bug | More capable model when needed | Reproduction, explanation, and verified fix |
| Check current product facts | Assistant with approved public research tools | Current primary sources |
A cheap model without the necessary tools is not a useful route. A small local model may handle one workload well and struggle with another. Test your own examples before assigning a large batch.
For Codex or Claude Code, compare the task result and allowance consumed under your actual access. Do not assume one is always cheaper, or that using both for every task provides extra value.
Give the worker a bounded job
During our ecosystem repair, recovering existing records and testing narrow tasks helped us avoid rebuilding working components. The same habits make a useful cost-control method, although we did not run a controlled savings benchmark.
A practical task brief might say:
Review this one function and its supplied failing example. Explain the cause, propose the smallest fix, and run the relevant existing check. If the same failure repeats twice, report the blocker and evidence before continuing with another approach.
Include the relevant information. Do not save a few tokens by omitting the failing example and forcing the assistant to rediscover it.
When switching assistants, hand over the goal, current state, relevant sources, decisions, and next step. Requiring each assistant to reconstruct the entire history can cancel out the benefit of switching.
Escalate when the cheaper route stops being useful
A stronger model can be economical when it avoids repeated failed attempts. Conversely, sending every small task to the most expensive option can waste capacity.
Set a stopping condition before work starts. If the result fails the same check repeatedly, improve the evidence, change the approach, or escalate. Do not let repeated retries become the routing strategy.
A second assistant is especially useful for a focused independent review of an important result. It also consumes resources. Ask for the specific check you need rather than having two agents repeat the whole job.
Understand a simple API estimate
For ordinary text usage, a starting estimate is:
input tokens / 1,000,000 × input rate + output tokens / 1,000,000 × output rate
This fictional example uses invented rates, not prices for Codex, Claude, or any current model:
- Input: 20,000 tokens at $1 per million = $0.02.
- Output: 2,000 tokens at $5 per million = $0.01.
- Estimated text cost per attempt: $0.03.
- One thousand identical attempts: $30.
If it takes three full attempts to get one acceptable result, that result costs $0.09 under these assumptions. A different route that succeeds once for $0.06 would be cheaper per completed task.
Real bills can also include tools, cached input categories, reasoning tokens, service tiers, or other charges. An agent may make many model calls during one visible task. Use current provider pricing and actual usage records for a real estimate. OpenAI API pricing (opens in a new tab)
For subscriptions, compare completed work against both the monthly fee and consumed allowance. Do not convert a hypothetical API estimate into a claimed subscription charge.
Keep a small routing record
For five representative tasks, record the route, whether it passed your check, elapsed time, retries, human correction time, and measured cost or allowance where available.
Choose the option that performs well enough at an acceptable total cost. Include local hardware costs when relevant, but do not buy new hardware merely to make a small hosted bill disappear without comparing the totals.
Cost is one constraint. The destination must also be permitted to receive the information, and the agent must have only the authority needed for its job. A cheaper route does not justify sending private data somewhere new or loosening security settings.
Start with manual choices and a few real results. Automate routing only when a repeated, measured need makes the extra complexity worthwhile.