What makes up the cost?
A token is a piece of a word that the model uses to count text. Cloud models charge separately for tokens they read (input) and tokens they write (output), and output costs several times more.
An agent uses more tokens than the length of its answer suggests. According to Anthropic’s documentation, at every new step the model receives the whole dialog history again, and the bill includes the agent’s instruction, messages, tool results, documents and the descriptions of the tools themselves.
So each agent step costs more than the one before. An agent that calls a CRM and a knowledge base 5 times in one dialog sends the model a growing history 5 times, and a long instruction and the passages found in the knowledge base repeat in every request.
Connecting tools also adds tokens: for Sonnet 5.5, the system instruction for tools takes 286 tokens in every request. The main cost drivers are the length of the instruction, the volume of retrieved passages and the number of steps in a dialog.
Every cloud model answer reports in the “usage” field how many tokens it used. Numbers from a week of logs are more exact than any estimate from text length.
Cloud model
In the cloud, you pay only for tokens and buy no hardware. The spread of prices is wide: GPT-6 Luna costs $0 for input and $1 for output per 1 million tokens, Sonnet 5.5 $2 and $10, Opus 5.5 $4 and $20.
Anthropic’s prices describe two ways to cut the bill. Batch mode, when the answer is not needed at once, gives a 50% discount on input and output. Cache, the reuse of an identical start of a request, cuts the price of that part to 10% of the input price, and to 5% for Sonnet 5.5 and Opus 5.5.
For an agent, the cache pays especially well: the instruction and tool descriptions are the same in every request. Batch mode fits overnight work: sorting email, checking documents, reports by morning.
The limits of the cloud are not in the price. Data goes to the provider, and when the agent works with customer data, that is a legal question: how we handle it is described on the page about data security.
You can compare the bill of different models at your volumes in the cloud API calculator.
Your own server
Open models run on your own server: you can download their weights and run them yourself. DeepSeek released R1 with open weights under the MIT license on 20 January 2025, and the Qwen 3 family came out on 29 April 2025 under the Apache 2.0 license.
There is no token bill here. There is the purchase or rental of hardware, power, a place in a server room and engineer time, and these costs are the same whether the agent works or sits idle.
Price guides as of 29.09.2026: a top-series gaming graphics card costs $8,890, a Mac Studio with large memory $10,510, and renting a gaming graphics card in Russia starts from $1 an hour. A model of 7–8 billion parameters fits on one such card.
Your own server pays off with a large, steady flow of requests or when data must not leave the company. At small volume the cloud is cheaper; see the detailed review on when the cloud is cheaper.
The local AI calculator works out the full monthly cost of your own server, with power and upkeep.
Example calculation
You calculate cloud model costs from the pilot log in four steps:
1. Take the number of input and output tokens from the log for the 14 days of the pilot and multiply by 2: that is the monthly estimate.
2. Convert both numbers to millions of tokens.
3. Multiply the millions of input tokens by the input price and the millions of output tokens by the output price, then add them.
4. Add a reserve for growth: new channels and long dialogs raise the number of agent steps.
Example: in a month, a support agent read 30 million tokens and wrote 10 million. On Sonnet 5.5 that is 30 times $2 and 10 times $10; on GPT-6 Luna, 30 times $0 and 10 times $1.
The difference is tens of times for the same agent. So choose the model first by its share of correct answers on your questions, then by price, not the other way round.
Cache for the instruction and batch mode for overnight tasks cut this sum. It makes sense to compare your own server when the cloud bill becomes a visible budget line or when data cannot go to a provider.
Model costs are only part of an agent’s cost. We cover building, connecting to the CRM and support in the article on AI agent cost.