[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3

Task Budgets & Token Economics

🏛️ Models & Architecture⏱ 10 min⭐ 150 BASE XP⌨ HANDS-ON LAB

Managing Token Budgets in Series 5

In high-throughput and long-horizon agentic environments, controlling token economics is paramount. Anthropic's pricing structure rewards efficient prompt engineering and prompt caching:

  • Claude Sonnet 5: $2.00 / MTok input, $10.00 / MTok output.
  • Claude Opus 5: $5.00 / MTok input, $25.00 / MTok output.
  • Claude Fable 5.1: $10.00 / MTok input, $50.00 / MTok output.
  • Claude Haiku 4.5: $1.00 / MTok input, $5.00 / MTok output.
  • Prompt Cache Write: 1.25x base input rate for initial caching.
  • Prompt Cache Read: 0.10x base input rate (90% discount on cache hits).
  • Batch API: Flat 50% discount on both input and output tokens across all models.
⌨ HANDS-ON LABAudit Token Budgets & Input Limits
⭐ +150 XP

Protect against unbounded costs. Calculate exact token consumption using count_tokens before making downstream calls.

1POST an oversized context payload to /v1/messages/count_tokens to measure exact input tokens before spending.
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
OBJECTIVE 1 / 1 — type "hint" if stuck
SYNAPSE VERIFICATION
QUERY 1 // 2
What is the cost reduction achieved on cached prompt tokens?
10% discount
50% discount
90% discount (0.1x base rate)
100% free