AI API pricing in 2026: how token economics works and what a request costs

When you call a model through an API, the bill has three parts: what you sent, what it answered, and — usually cheaper — what had already been processed before.
When you call a model through an API, the bill has three parts: what you sent, what it answered, and — usually cheaper — what had already been processed before.
The unit is not characters but tokens, fragments of words. So the total depends on the length of the request, the size of the answer, and how well any repeating text gets reused.
Below: what a token is and what makes up the bill, why output costs more than input, why the discount on repeats matters, why prices jump around, which costs are invisible in the price list, how to put this in a client quote, and how to keep a budget under control.
Every price links to its source as of 16 August 2026. Rates change, so always check the current figure with the provider.
This is a living guide: the daily AI digests update it as prices move.
---
The short version
A token is a fragment of a word. You pay for what you send and for what you get back.
Output costs more than input — often two to five times more. Asking for shorter answers is a direct saving.
Repeating text costs many times less. With some models the discount reaches 98%.
The right question is not "what does the subscription cost" but "what did this job cost me".
The price list does not show everything. Hidden reasoning, retries and failed generations are not in the table.
For a freelancer the key point: generation spend goes into the client quote the same way paper goes into a printer's.
---
Part 1. What a token is and what makes up the bill
A token is the unit of text a model works in: roughly part of a word. On average a token is 3–4 Latin characters; non-Latin scripts usually produce more tokens for the same number of characters.
The bill has three parts:
Input — everything you sent: the question itself, the system prompt, conversation history, attached documents.
Output — what the model wrote back.
Cached — the part of the input the provider has already processed and stored.
Prices are listed separately for each part because they cost different amounts.
Why output costs more than input
Output tokens are almost always dearer than input, often by two to five times.
The reason is technical: the model can read your whole request at once, while every word of the answer is computed one after another.
Practical conclusion: a long answer costs more than a long question. Where you can, ask for shorter, more structured replies — that is a direct saving.
And separately: with models that "reason" before answering, hidden reasoning tokens are added to the output. You never see them and you pay for them at the output rate.
Why the discount on repeats matters
If you send the same system prompt or the same long document with every request, the provider does not have to process that chunk again. So it costs many times less.
In agent scenarios the saving is enormous: up to 97% of the input there is repeating text, and without the discount you would pay full price for it at every step.
Practical technique: keep the unchanging part at the beginning of the request, where it will be remembered, and the changing part at the end.
---
Part 2. What APIs cost right now
Indicative prices per million tokens as of 16 August 2026, each with a source. Rates move quickly, so this is a snapshot.
| Model | Input ($/1M) | Output ($/1M) | Note |
|---|---|---|---|
| DeepSeek V4-Flash 0731 | $0.14 | $0.28 | 98% discount on repeats (Artificial Analysis) |
| DeepSeek V4 Pro | see price list | see price list | rates raised from 16 August (DeepSeek pricing) |
| Gemini 3.7 Flash | $0.75 | $3.75 | 50% introductory discount to year end, then $1.50 / $7.50 (Google) |
| Qwen 3.8 Max | $2 | $6 | repeats — $0.25 (Alibaba Qwen) |
| Grok 4.6 | $2 | $6 | per an independent measurement (Artificial Analysis) |
The mechanic is worth noting: with DeepSeek V4-Flash a repeat cuts the input price by 98%. That is not marketing but a consequence of a reused chunk costing the provider almost nothing.
For exact current DeepSeek figures see the official pricing page, where the increase of 16 August 2026 is published.
---
Part 3. Why prices jump around
Prices are not a constant: they fall under competition and rise under load, sometimes in the same week.
An example of a cut. On 14 August 2026 Google shipped Gemini 3.7 Flash with a 50% introductory discount — $0.75 per million input and $3.75 per million output to the end of the year, then $1.50 and $7.50.
An example of a rise. DeepSeek announced new pricing from 16 August 2026: V4 Pro output goes up noticeably, repeats get several times dearer, and a double rate at peak hours is introduced (official pricing).
The planning takeaway: assume the price can change, and do not tie your economics to a single provider without a fallback.
Peak and off-peak
Some providers set different rates for busy and quiet hours: dearer by day, cheaper at night.
This is a way of managing load, not only of making money. If your tasks do not need an instant answer — overnight report generation, bulk processing — check whether such a rate exists and when it applies in your time zone.
---
Part 4. Two billing models
Besides per-token billing there is a second one — by processing time. It is typical of image, video and audio generation.
Text models are almost always billed per token. Media is often billed per second of generation or per finished result, because there are no tokens there in the usual sense.
The difference matters for planning. A token price is easy to predict from the length of the text. A per-second price is harder: it depends on resolution, duration and model.
Which is why with media it is particularly valuable when a platform shows the quote before the run rather than after.
---
Part 5. Costs that are not in the price list
The final bill often comes out higher than expected. Four reasons.
Hidden reasoning. With "thinking" models a stream of reasoning is added to the visible answer, billed at the output rate even though you never see it.
Tool calls. In agent scenarios every step drags the history of the previous ones with it, so a long chain costs disproportionately more.
Retries. Repeat attempts when external services fail multiply the spend if you are not counting them.
Failed generations. The scene or the answer was not right and you regenerated — you pay for every run, not only the successful one.
Practical conclusion: when budgeting, allow not only for the ideal request but for reasoning, retries and redos.
Which is exactly why transparent mechanics matter: so it is visible what the money went on, and so a failed generation is refunded rather than quietly charged.
Where these costs arise most
The second of the four is the most expensive. Agent chains eat a budget fastest, because every step drags the history of the previous ones: step five costs more than step one, step ten more than step five.
And here is the important part: it is not that agents are inherently expensive. It is that a badly assembled chain spins its wheels — takes unnecessary steps, asks again, repeats what it already did.
The difference between a tidy and a wasteful chain on the same task is measured in multiples, not percentages.
If you build agents and want them not to burn money: the express course "AI Agents: the electrification of routine" — from a first automatic agent to chains running round the clock. Inside, 20 finished projects for real tasks and four working platforms: Make, n8n, Relevance, Lindy.
A finished project is valuable precisely because the chain in it is already worked out — you are not paying for your own experiments with superfluous steps.
$9, included in the Make and Team plans. Not included in the three free days of Basic: a one-off purchase, a plan, or 1 000 XP points.
---
Part 6. How to budget a project
The formula is simple:
number of requests × (average input + average output in tokens) × price per token
The steps:
1. Estimate how many requests a month your product makes
2. Measure the average input and output size on several real examples
3. Multiply by the price of the relevant part from the provider's table
For agent scenarios, add a multiplier for the number of steps and for the repeating text — this is where caching saves you, cutting the price of the unchanging part.
The figure you get is worth comparing against the cost of running an open model yourself: at large and predictable volumes that often wins.
And leave room for price changes. As August 2026 showed, a rate can fall and rise. A healthy budget is not a single figure from the current price list but a range with a fallback provider.
A worked example
The numbers illustrate the method, not any particular provider's rate.
Say an assistant handles 10 000 requests a month. The average request is 1 500 input tokens (system prompt plus question and context) and 500 output.
At a notional $0.75 per million input and $3.75 per million output, one request costs:
1 500 × $0.75/1 000 000 + 500 × $3.75/1 000 000 ≈ $0.0011 + $0.0019 ≈ $0.003
Across 10 000 requests — around $30 a month.
Now switch caching on: if the system prompt (say 1 000 of the 1 500 input tokens) is unchanging and gets remembered, the input becomes several times cheaper and the monthly bill drops noticeably with no loss of quality.
What this calculation shows:
Output costs more than input. 500 output tokens cost more than 1 000 ordinary input ones. Asking for shorter answers is a direct saving.
Caching the unchanging part is the simplest lever. It needs no change of model and cuts the bulk of the input in stable scenarios.
For agent tasks, multiply by the number of steps. That is where spend grows fastest.
---
Part 7. How to keep spending down
Five techniques that work regardless of provider.
Cache the unchanging part. Keep the system prompt and permanent context at the start of the request.
Ask for shorter answers. Output costs more than input; with "reasoning" models, cap the amount of reasoning where it is not needed.
Set a cheap model as the default. Route only the hard steps to the expensive one — in teams' experience this delivers the bulk of the saving.
Count cost per success, not per token. In agent chains what matters is the price of a solved task; strip out unnecessary steps. More in the AI agents hub.
Consider running your own. At large volumes an open model on your own hardware is often cheaper and immune to somebody else's price rises — comparisons in the Best open LLMs 2026 hub.
Deferred processing
If the answer is not needed this second, the cost can be cut appreciably.
Off-peak — a reduced rate during quiet hours. Bulk processing and report generation sit there comfortably.
Batch mode — asynchronous processing of a large volume at once, often billed cheaper than an ordinary call because it uses the provider's hardware better.
Practical conclusion: split tasks into urgent (ordinary calls) and deferred (batch and off-peak). That alone cuts the bill without changing anything about quality.
---
Part 8. Three payment strategies
A simple split pulls it all together.
Ordinary pay-as-you-go API. Best at small and irregular volumes, when keeping your own hardware makes no sense and speed of launch matters.
API in batch and off-peak mode. The same provider but deferred processing at a reduced price. Best for large regular volumes where the answer is not needed immediately.
Running an open model yourself. Best at large and predictable volumes, when the saving outweighs the hardware and you also gain independence from other people's price rises.
Most mature products combine all three: urgent work through the ordinary API, bulk and deferred work in batches, and the largest, steadiest load on their own hardware.
The starting point for the choice is your load profile — volume, urgency, data sensitivity — not "the cheapest price on paper".
---
Part 9. Open alternatives
Moving to open models reduces your exposure to API prices: you can run them yourself, and then the cost stops depending on somebody else's rates.
The current generation is competitive on quality: DeepSeek V4 under MIT, Qwen 3.8, GLM-5.2, Muse Glimmer 30B under Apache 2.0. Weights under free licences can be used commercially — a detailed comparison and hardware requirements are in the Best open LLMs 2026 hub.
An important nuance: open weights does not mean free. You do not pay for tokens but you do pay for hardware and maintenance, so the gain appears at volume.
Another route to cutting costs is the open tooling around models, collected in the Open Source section: it removes part of the infrastructure spend.
Your own operator instead of a browser tab
A separate case worth knowing if token spend genuinely worries you.
Ordinary assistants live in a tab: close it and they forget you, and every request is billed. There is another approach — a background service on your own hardware: it runs continuously, remembers you between sessions and does not invoice per request.
Plus two properties a tab cannot have in principle: it starts the conversation itself when an event occurs, and it connects where you already are — in messengers.
The express course "OpenClaw: not a browser helper but your own AI operator" is about deploying such a service. What you end up with: a working operator on your hardware connected to WhatsApp, Telegram, Discord, iMessage and Slack, a library of 50+ capabilities, and a configured memory system.
Who genuinely needs it: anyone with a large flow of repetitive requests, anyone with data that cannot leave the building, and anyone tired of paying per call.
Who does not: if your tasks are one-off and the volume is small, ordinary tools will cover the same ground more cheaply and without configuring hardware.
$9, included in the Make and Team plans. Not included in the three free days of Basic.
---
Part 10. What this means for you if you take on client work
The section usually missing from pricing round-ups. And for a freelancer it matters more than all the rest of the article.
The main mistake: counting the month instead of the job
Spend is smeared out: the subscription was charged a month ago, generations run in the background, and profit gets counted as "what landed in the account".
That is how people work at a loss for months without noticing.
The right question: what did this job cost me.
The job brought in $40 and cost $3 to run — seven per cent, fine. You spent $20 — the problem is not model prices, it is the process.
Put the spend in the quote
The cost of generation goes into the client's price the same way paper goes into a printer's.
No client asks a printer what the paper cost. They pay for the print run.
How to estimate: work out the spend for the task, double it for misses and revisions, and put that in. If it comes to more than five to seven per cent of the fee, either the job is too cheap or the process is too wasteful.
What not to do: list the spend as a separate line on the invoice. The client will start discussing the cost of generations instead of the result, and you will be in a conversation with nothing to win.
What to compare it against: what the work pays
From a scrape of 848 job listings over 24 days: the median one-off job is $30–75. A short clip $18–45. A logo $25–90. A multi-page website $245–730. A system or pipeline $490–1 460.
Caveat: an explicit budget appears in 6% of listings, with two to fifteen observations per category.
What that means for your sums. On pay-per-use, an operation costs cents and single dollars. Which means the first completed job covers the cost of several dozen attempts.
The whole problem is the order. A subscription wants money before the first job. Pay-per-use lets you start with a sum you do not mind and then pay out of what you earned.
Three things that break the economics
Generating on a wing and a prayer. Twenty attempts instead of four because the task was never formulated. A precise description is a direct saving.
An expensive model on drafts. The spread on video runs from $0.22 to $11.95 per generation — fifty-fold. Run drafts on the cheap one and the final on the one you need.
Revisions with no limit. For generative video a revision often means regeneration, which means a new cost. Two rounds in the quote is normal; "we revise until you like it" is an open tab at your expense.
---
Part 11. How this is set up here
On the platform the price of a request is not opaque credits but the actual cost of the tokens with a fixed margin.
The prompt generator and the chat layer count real spend — input, output, cache reads and writes — and charge it with a coefficient of 1.2. That is a margin of exactly 20%, not an abstract rate.
What that gives you in practice:
The quote is visible before you press. You see the price of the operation before the run, not after.
If it fails before answering, the money comes back.
Repeat requests get cheaper thanks to remembered context.
This follows directly from the token economics the whole guide is about: we pay the provider for tokens, and exactly that, plus 20%, is what the user sees.
A wallet instead of a subscription
Worth covering separately, because it removes the main objection.
From my audience survey, verbatim: *"AI is expensive, subscriptions cost a lot, there is no room to experiment."*
The person is right. To try three models for different tasks you need three subscriptions, each charged in full whether you worked that month or not.
A wallet works differently: you are charged for what you did. Did not open it for a week, spent nothing. A month without work costs zero. The entry threshold is low: you can start with a sum you do not mind.
Room to experiment appears exactly when an experiment stops costing as much as a monthly subscription.
---
Part 12. What to open up for your task
A pay-as-you-go wallet — available at every level, including free registration.
Ready-made assistants — more than 140 across 14 categories. Often there is no need to look for a tool at all: a ready helper closes the task without any comparison of services. Plan: Basic.
An encyclopedia of more than 190 vetted services — a reference to search by task, not to read front to back. Included in Basic.
Prompt engineering — the foundational course with a map of the model landscape: which one for what. Helps you avoid paying for a subscription to a tool you do not need. $9, included in Basic.
AI Workflow — if the task repeats: a chain where the quote is calculated before the run, charging follows the steps actually executed, and money comes back for anything not done.
The "AI Agents" express course — if you build chains and want them not to spin their wheels. 20 finished projects, four platforms. $9, the Make and Team plans.
The "OpenClaw" express course — if you want to stop paying per request: your own background operator on your own hardware with local memory and messenger connections, 50+ capabilities. $9, the Make and Team plans.
Neither is included in the three free days of Basic — a one-off purchase, the relevant plan, or 1 000 XP points.
---
Price timeline
Prices move almost weekly: some cut under competition, some raise under load, others run introductory discounts.
In August 2026 Google halved the launch price of Gemini 3.7 Flash, while DeepSeek raised V4 Pro rates from 16 August.
We track the changes in the daily AI digests. For how agents work and what a turn costs, the AI agents hub; for the run-it-yourself alternative, the Best open LLMs 2026 hub.
---
FAQ
Why does the answer cost more than the question?
Because generating takes more computation than reading. The model processes your request whole and at once, while each word of the answer is computed in sequence.
Hence the price difference, often two to five times. The practical conclusion: a long answer costs more than a long question, so ask for shorter replies where you can.
With "reasoning" models, billable hidden reasoning is added to the output.
What are cached tokens and why are they cheaper?
They are the part of the input the provider has already processed and stored: an unchanging system prompt, or a document you send with every request.
There is nothing to recompute, so it costs many times less than ordinary input — with some models the discount reaches 98%. In agent conversations, where up to 97% of the input is repeating text, caching saves the bulk of the bill.
Keep the unchanging part at the start so it gets remembered.
Which is cheaper, an API or running your own?
It depends on volume.
For small and irregular loads an API is usually better value: no hardware to keep. For large and predictable volumes, running your own often costs less, and the price becomes predictable and immune to other people's rises.
Plus independence: open weights cannot be revoked. Model comparisons and hardware requirements are in the Best open LLMs 2026 hub.
How fast do prices change?
Fast — sometimes several times a month. Providers cut under competition, raise under load, run discounts and introduce peak rates.
So check any specific figure, including the ones given here as of 16 August 2026, on the official pricing page before you commit. And do not tie your product's economics to one provider without a fallback.
What are off-peak and batch mode, in plain words?
Two ways to pay less when the answer is not needed this second.
Off-peak — a reduced rate during quiet hours: the load is easier for the provider to serve, so the same tokens cost less.
Batch mode — processing a large volume at once, billed cheaper because it uses the hardware better.
Split your tasks into urgent and deferred — that alone cuts the bill with no loss of quality.
How much should I allow for generation if I take on client work?
The rule: the spend goes into the client's price the same way paper goes into a printer's.
Estimate the spend for the task, double it for misses and revisions, and put it in the quote. If it comes to more than five to seven per cent of the fee, either the job is too cheap or the process is wasteful.
For reference: the market median for a one-off job is $30–75, while an operation on pay-per-use costs cents and single dollars. The first completed job covers the cost of several dozen attempts.
Do not itemise the spend on the invoice — the client will start discussing the cost of generations instead of the result.
---
Try it
Registration is free and opens three days of full Basic access — all 140+ assistants, the encyclopedia of more than 190 services, the prompt texts, the skill files, the ten-lesson sales module and six foundational courses.
Three days is a way to test not the tools but yourself: run a chain end to end and look at your own result, having paid nothing.
One thing to do right now. Open the list of your subscriptions and count how many times you opened each one last month.
Usually it turns out the money goes on two or three and the work happens in one. That is your saving, with no choice of plan involved.
What to read next
What it costs to try — a wallet instead of a subscription, and prices by mode.
Which plan to choose — the exact contents of each of the six.
It was expensive, now it's $9 — what is open for free right now.
What is on the platform — fourteen sections in three parts.
The real cost of a clip — the other half of the equation for a freelancer.
Local AI models for sensitive data — when your own hardware is cheaper.
The market in full: 848 jobs — what to compare your costs against.
AI freelancer price list — what to charge for the work.
What you will be able to do in a month — what all this is paid for.
Build once, run always — a chain's quote is visible before the run.
n8n and Make automation templates — where spend grows fastest.
Skills for Claude Code — how chains are built and what they cost.