🧑‍💻 개발 지식

Home › Guides

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)

ModelInputOutputCache readCache 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.

  1. Search first (grep, a file list, or an index), then send only the matching files or sections.
  2. Prefer excerpts with line numbers over whole files.
  3. 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

StepTypical model tier
Sorting, tagging, extracting fieldsSmallest
Drafting, routine code changesMid
Planning, hard debugging, final reviewLargest

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

4. Track cost per task, not per request

  1. Log input, output and cache-read tokens from each response's usage field, tagged with a task name.
  2. Once a week, sum by task and multiply by the prices above.
  3. Look at the top three tasks only. That is usually where an oversized context or a mismatched model is hiding.

Quick checklist

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

Related (Korean): AI 제작 로그·개발 지식 (한국어)

📤 Share