When you look at AI pricing for example cursor, you will often see four numbers:
| Pricing component | What it means |
|---|---|
| Input | What you send to the AI |
| Cache Write | Information saved temporarily so it can be reused |
| Cache Read | Previously cached information that the AI reads again |
| Output | What the AI generates for you |
These are usually priced per million tokens.
Let's break them down.
1. Input
Input is everything you give the AI.
This can include:
- Your question
- Your instructions
- Code you provide
- Files you ask it to analyze
- Previous conversation/context
- Relevant parts of your project
For example, you tell Cursor:
"Fix this Laravel authentication bug."
And Cursor sends your instructions plus relevant code to the AI.
That information is input.
Example
Suppose the model's input price is:
$2 per million tokens
If your request uses 10,000 input tokens:
10,000 / 1,000,000 × $2
= $0.02
So the input cost would be approximately $0.02.
2. Output
Output is what the AI generates in response.
For a coding assistant, output could include:
- Code
- Explanations
- SQL queries
- Suggestions
- Refactored code
- JSON
- Documentation
Suppose a model costs:
$6 per million output tokens
If it generates 10,000 tokens:
10,000 / 1,000,000 × $6
= $0.06
So the output cost would be approximately $0.06.
Why is Output often more expensive?
Generating information is computationally expensive.
That's why you will often see something like:
Input: $2/M
Output: $6/M
The AI charges differently for what it reads and what it generates.
3. Cache Write
This one is slightly more complicated.
Imagine you are working on a large Laravel project.
Every time you ask Cursor something, Cursor may need to provide the AI with a lot of context about your project.
For example:
Laravel project
+ routes
+ controllers
+ models
+ migrations
+ services
+ configuration
+ existing code
Sending the same information repeatedly can be inefficient.
Caching allows some of that information to be stored temporarily so it can be reused.
When information is stored in the cache, that is called a:
Cache Write
In simple terms:
Cache Write = putting information into the AI's reusable memory/cache.
4. Cache Read
Once information has been cached, the AI can reuse it.
Instead of processing the information as completely new input again, it can read the cached information.
That's:
Cache Read
In simple terms:
Cache Read = using information that was already stored in the cache.
This is usually cheaper than sending the same information as completely new input.
For example, suppose:
Input = $2 / million tokens
Cache Read = $0.50 / million tokens
If you repeatedly work with the same project context, using the cache can significantly reduce the cost of processing that repeated context.
5. A Simple Real-World Example
Imagine you are building a Laravel application in Cursor.
You ask:
"Create an API endpoint for registering users."
Cursor might send:
Input
Your instructions + relevant Laravel code.
Then the AI generates:
Output
The controller, request validation, route and other code.
Now you ask:
"Add email verification."
Some of the project context may already be cached.
So instead of treating everything as completely new information, Cursor may use:
Cache Read
to reuse previously processed context.
If Cursor needs to add new information to the cache, that's:
Cache Write
6. Why Cache Pricing Can Be Confusing
You might see pricing like:
| Price per million tokens | |
|---|---|
| Input | $2 |
| Cache Write | $2.50 |
| Cache Read | $0.20 |
| Output | $10 |
At first, this can look confusing.
You might ask:
"Why am I being charged four different prices?"
Because the AI provider is measuring different types of token processing.
Think about it like a database:
- Input = sending data to the database
- Cache Write = storing frequently used data
- Cache Read = retrieving stored data
- Output = generating the result
The exact implementation of caching differs between AI providers, but this mental model is useful for understanding the pricing table.
7. Putting Everything Together
Let's say you use a model with:
| Component | Price |
|---|---|
| Input | $2/M |
| Cache Write | $2.50/M |
| Cache Read | $0.20/M |
| Output | $10/M |
During one interaction, suppose you use:
- 20,000 input tokens
- 5,000 cache-write tokens
- 50,000 cache-read tokens
- 10,000 output tokens
The approximate cost would be:
Input
20,000 / 1,000,000 × $2
= $0.04
Cache Write
5,000 / 1,000,000 × $2.50
= $0.0125
Cache Read
50,000 / 1,000,000 × $0.20
= $0.01
Output
10,000 / 1,000,000 × $10
= $0.10
Total
$0.04 + $0.0125 + $0.01 + $0.10
= $0.1625
So that interaction would cost approximately:
$0.16
The important lesson is that you don't simply multiply the model's headline price by the number of times you use it. The actual cost depends on how many tokens are processed in each category.
8. Which One Should You Pay Most Attention To?
As a beginner, focus on these two first:
Input
How much information are you asking the AI to process?
Output
How much information is the AI generating?
These are the easiest to understand.
Then learn:
Cache Read
This can help reduce the cost of repeatedly processing the same context.
Cache Write
This is related to putting information into the cache so it can potentially be reused.
9. Why This Matters When Using Cursor
This becomes especially important when you use Agent mode.
Suppose you ask Cursor to:
"Build a complete payment integration."
Cursor may need to understand:
- Your existing application
- Your database
- Existing controllers
- Routes
- Models
- Configuration
- Payment code
- Documentation
- Your instructions
That's potentially a lot of context.
If you then continue asking:
"Now add callbacks."
"Now add transaction validation."
"Now add retries."
"Now write tests."
Cursor may repeatedly work with a large amount of project context.
This is one reason why Agent-heavy users can consume significantly more AI usage than developers who only use autocomplete or ask small questions.
10. The Easiest Way to Remember It
Think of an AI conversation like this:
Input
"Here is what I want and here is the information you need."
↓
Cache Write
"Store some of this information so we can reuse it."
↓
Cache Read
"Use information we already stored."
↓
Output
"Here is the answer/code I generated."
And because each operation can have a different computational cost, each can have a different price per million tokens.
That is what the four columns in Cursor's model pricing table are telling you.
Top comments (0)