Cheapest LLM API: Why the Lowest Token Price Rarely Wins
The cheapest LLM API is rarely the cheapest system. Compare token price with retries, routing, failure cost, and the deterministic app layer that makes spend predictable.

The cheapest LLM API is the one with the lowest cost per accepted result
The cheapest LLM API is the endpoint that produces an accepted result for your task at the lowest all-in cost. That cost covers input and output tokens, reruns after failures, and the human minutes spent fixing answers that returned a clean 200 and were still wrong. The per-token rate on a pricing page is one input to that number.
The more useful move for a team running real workflows is to cut the number of calls. Major is the enterprise platform where agents build the software they run on, so repeatable steps leave the model and run as deterministic apps. The agent reasons once, the app runs forever, and token spend concentrates on the decisions that need judgment.
Use this formula for any workload:
cost per successful task = (token cost per attempt / success rate) + review overhead
Scope the overhead to review and correction minutes at a loaded hourly rate. Put one-time engineering setup on a separate line.
What LLM API pricing actually measures
Providers bill per token, split into input and output. Input covers everything you send: the system prompt, retrieved documents, conversation history, and tool definitions. Output is what the model generates, and it is priced higher almost everywhere because each generated token needs its own pass through the model. CostGoat's comparison explains the same asymmetry.
Live comparators such as CostGoat and Price Per Token list input price, output price, cached-input price, and context window across hundreds of models. Prices move. Use them to learn which fields to compare, then confirm any number you budget against the provider's official pricing page on the day you commit.
A price table measures the cost of a token. You pay for tasks, and the ratio between the two depends on prompt shape. Extracting fields from a 6,000-token contract into a 200-token JSON object is input-heavy. Turning a 300-token brief into a 2,000-token memo is output-heavy. The same two models can swap rank on the same price table depending on which job you run.
Why per-token price is not task cost
Take an invoice-extraction workflow. The numbers below are illustrative and describe no provider's pricing.
Model A costs $0.002 per attempt and Model B costs $0.010. A schema validator catches malformed output and triggers a retry. A passes on the first try 70% of the time, B passes 97% of the time. Per 1,000 invoices, token cost per success is about $2.86 for A and $10.31 for B. A wins by roughly seven dollars.
Then the validator's blind spot appears. It catches broken JSON. It cannot catch a well-formed invoice total that is simply wrong. Suppose 8% of A's accepted outputs carry a wrong value against 1% of B's, and each one costs a finance reviewer four minutes. That is 320 reviewer minutes for A and 40 for B. At a $60 loaded hourly rate, A carries $320 in overhead and B carries $40. The expensive model is cheaper by a wide margin.
Retries also add a full round trip of latency each. Verbose models spend more output tokens per answer. A model that needs a longer prompt to behave pays for that prompt on every call.
Which model tier fits which workload
- Fixed-label ticket classification: budget tier. Output is constrained, so retry risk is low. Measure accuracy on a labeled set of 200 tickets.
- Structured document extraction: budget to mid-tier. The risk is valid but wrong values, so measure field-level accuracy against a gold set.
- Internal digests and summaries: budget tier. Sample human ratings and watch output length.
- Prototypes and evals: free tier. Rate limits and outages are the cost.
- Customer-facing drafts: mid-tier. Track approval rate and edit distance.
- Contract review, code changes, multi-step reasoning: frontier tier. A single failure is expensive, so measure acceptance-test pass rate and review minutes.
- Agent tool calls across several systems: mid-tier to frontier. Errors compound at every step, so measure end-to-end completion.
Free tiers deserve their own warning. They throttle requests per minute and per day, and limits change without notice. OpenRouter's free API comparison puts the math plainly: 20 requests per minute is one request every three seconds, and 1,000 per day is about 40 an hour. It also notes that some free endpoints shrink context windows or serve lower-precision weights, and some providers train on free-tier prompts. Use free tiers for evals. Keep customer data and confidential work off them.
How to pick on evidence
The cheapest capable model should handle each task, and capable means it passes your acceptance test. A model that fails the test is expensive at any price.
- Build an acceptance test per workload. Collect 100 to 300 real examples with known correct outputs and a pass/fail rule a script can check.
- Run every candidate across the set. Log input tokens, output tokens, retries, pass rate, and latency per example.
- Compute cost per successful task, choose the cheapest model that clears the bar, and rerun the test whenever a provider changes a price or ships a new model version.
LLM routing applies the same rule per request, sending easy queries to small models and escalating hard ones. Routing lowers the price of each call. It does nothing about how many calls you make.
Build the invoice workflow on Major
Most steps in a repeatable workflow never needed a model: fetching a record, validating a schema, writing a row. An agent that re-reasons them on every run pays for that reasoning every time. Here is how the invoice example from above looks on Major.
- Connectors: Gmail receives the vendor invoice email. Google Sheets or your accounting system holds contract terms. Slack carries exception approvals.
- The app: the agent builds an invoice app once. It parses the email, writes each invoice to the app's managed database, and checks totals against stored contract terms in code. Same input, same output, zero tokens per run.
- The agent's judgment: only when a line item fails a known rule does the model decide whether to approve, hold, or escalate. That is the work a validator can't encode.
- Trigger: a workflow fires on each new invoice email. Nobody prompts anything.
- State: invoices, decisions, and reviewer outcomes live in the app, not in a context window that disappears after the run.
- Governance: scoped credentials per connector, role-based access on the app, and an audit row for every decision with the input, the model's reasoning, and the outcome.
Cost is front-loaded, because the agent spends tokens figuring the workflow out once, then flat, because later runs execute code and call the model only on exceptions. The model does less, not nothing. See the same pattern on a single connector in Google Sheets automation and across a multi-step operational flow in AI agents for project management.
Build your first cost-predictable workflow app on Major.
Start building on Major
Take the invoice, ticket, or extraction workflow you are costing out right now and move its repeatable steps into an app with its own state and audit trail. Major's agents build it, run it, and leave the model for the exceptions.
Related articles
Frequently asked questions
- What is the cheapest LLM API right now?
- It changes month to month, so check a live comparator such as CostGoat or Price Per Token and confirm on the provider's official pricing page before you commit. The lowest per-token rate is only a starting point. The cheapest API for you is the one with the lowest cost per successful task on your own workload, counting retries and human correction.
- Are free LLM APIs safe for production?
- Rarely. Free tiers cap requests per minute and per day, can tighten those limits without notice, and come with no SLA or compensation for outages. Some shrink context windows, and some providers use free-tier prompts for training. They work for prototypes and evals. Customer-facing or confidential workloads belong on a paid tier with a clear data policy.
- Is a cheaper model always lower quality?
- No. Quality only matters relative to the task. A small model can classify tickets into fixed labels as well as a frontier model, at a fraction of the cost. On multi-step reasoning, the same small model may fail often enough that retries and human fixes make it the more expensive choice per success.
- How do I cut LLM costs without switching models?
- Trim prompts and retrieved context, cap output length, and use cached-input pricing for stable system prompts. Route easy requests to smaller models. The biggest structural cut comes from moving repeatable workflow steps into deterministic apps, so the model stops re-reasoning the same plumbing on every run and only handles the judgment calls.