Cut AI Token Costs: Context, Model Split, Caching, Cost Tracking
Published 2026-10-19
If you use an AI model through an API for real work — coding agents, document processing, support drafts — most of the bill usually comes from input tokens you did not need to send. This guide covers four habits that cut cost without making answers worse, with current list prices so you can do the math yourself.
Current prices (USD per million tokens)
| Model | Input | Output | Cache read | Cache write (5-min) |
|---|---|---|---|---|
| Claude Opus 5.5 | $4 | $20 | $0.20 | $5 |
| Claude Sonnet 5.5 | $2 | $10 | $0.10 | $2.50 |
| Claude Haiku 5.5 (prompts ≤100K tokens) | $0.10 | $0.50 | $0.01 | $0.125 |
Source: anthropic.com/pricing, checked 2026-10-19. Batch processing is listed there at 50% off. Haiku 5.5 prices are higher for prompts over 100K tokens. Prices change — check the page before budgeting.
1. Send only the documents the task needs
The most common waste is pasting a whole repository, manual or chat history "just in case". Every request pays for all of it again.
- Search first (grep, a file list, or an index), then send only the matching files or sections.
- Prefer excerpts with line numbers over whole files.
- For long conversations, start a fresh one with a short written summary instead of carrying 100 turns along.
2. Split the work by step and model
| Step | Typical model tier |
|---|---|
| Sorting, tagging, extracting fields | Smallest |
| Drafting, routine code changes | Mid |
| Planning, hard debugging, final review | Largest |
From the table above, a million input tokens cost $4 on Opus 5.5 and $0.10 on Haiku 5.5 — a 40× gap. Test quality on a small sample before moving a step down: a cheaper call that needs two retries is not cheaper.
3. Keep a project summary file — and cache it
- Write one short file: what the project is, folder layout, conventions, current goals. Put it at the very start of every request.
- Because it does not change between calls, it suits prompt caching: after the first write, reads cost $0.20 instead of $4 per million on Opus 5.5 — 5% of the normal input price.
- Put anything that changes (dates, the user's question) after the cached part. Any change earlier in the prompt breaks the cache.
4. Track cost per task, not per request
- Log input, output and cache-read tokens from each response's usage field, tagged with a task name.
- Once a week, sum by task and multiply by the prices above.
- Look at the top three tasks only. That is usually where an oversized context or a mismatched model is hiding.
Quick checklist
- Is the stable part of the prompt first and cached?
- Did I send whole files where excerpts would do?
- Could this step run on a smaller model at the same quality?
- Can this job wait for batch (50% off)?
FAQ
- Does a cache write cost more than normal input?
- Yes — on Opus 5.5 a 5-minute cache write is $5 vs $4 for plain input. It pays off as soon as the same prefix is read again.
- Is batch always worth it?
- Only for work that does not need an answer right away, such as overnight document processing.
Sources
- Anthropic pricing — checked 2026-10-19
Related (Korean): AI 제작 로그·개발 지식 (한국어)