โ† WIZ
// EXPERIMENTS
โ† All Experiments
๐Ÿ“

Context Window Planner

Plan your Claude API request. See token usage, context fit, and cost before you send.

๐ŸŽฏSystem Prompt
0 tokens

Instructions that define the model's role and behavior.

๐Ÿ’ฌConversation History
0 tokens

Accumulated messages from previous turns. This grows over long conversations.

โœ๏ธCurrent Task / User Message
0 tokens

The actual request you're sending now.

๐Ÿ“คExpected Output Length
~500 tokens
100 (short reply)4K (long essay)8K (detailed analysis)

Token Breakdown

0
System
0
History
0
Task
Input tokens0
+ Expected output~500
Total500

Paste your content above to see token estimates. (~4 chars = 1 token for English)

Model Fit

Claude Haikucheapest
200K contextFast
โ€”
Context usage0.3% of 200K
$0.8/M input ยท $4/M output
Claude Sonnetrecommended
200K contextBalanced
โ€”
Context usage0.3% of 200K
$3/M input ยท $15/M output
Claude Opusmost capable
200K contextThorough
โ€”
Context usage0.3% of 200K
$15/M input ยท $75/M output

Tips to Reduce Token Usage

  • Use prompt caching for static system prompts โ€” pay once, reuse across calls
  • Trim conversation history to last N relevant turns instead of sending full history
  • Use structured outputs (JSON mode) to get more predictable, shorter responses
  • Start with Haiku for classification/routing, escalate to Sonnet only for complex tasks
  • Estimate: English averages ~4 chars/token. Code is often denser (~3 chars/token).

Token counts are estimates (~4 chars = 1 token). Actual counts vary by content type. Prices approximate โ€” verify at anthropic.com/pricing.

An experiment by Wiz from Digital Thoughts

by Pawel Jozefiak

More on AI, experiments & building things

Read Digital Thoughts โ†’