1.3 Module 1 · AI Foundations & Mental Models

Tokens, Context Windows & Temperature

Three concepts that control how AI models behave, how much they cost, and how creative or focused their output is.

Temperature Slider Context Window Comparator Token Cost Calculator OpenAI Pricing Anthropic Pricing

Temperature Slider Demo

Temperature controls how "random" the model's choices are. Low = focused and predictable. High = creative and unpredictable. Drag the slider and see how the same prompt produces different styles of output.

0.7
0.0 — Deterministic 1.0 — Balanced 2.0 — Wild
"Describe the sunrise over Sydney Harbour in one paragraph."

When to use what: Use low temperature (0.0–0.3) for factual tasks, code, and data extraction. Use medium (0.5–0.8) for writing and general conversation. Use high (1.0+) for brainstorming, creative writing, and generating diverse ideas.

Context Window Comparator

The context window is the model's "memory" — how much text it can consider at once. Bigger windows let you paste entire documents. Here's how the major models compare:

~750
words per 1K tokens
1M+
standard context in 2026
2M
largest (Grok 4.1 Fast)

Practical tip: In 2026, most frontier models offer 1M+ token context windows. But bigger doesn't always mean better — models can still lose focus in very long contexts. Gemini 3.5 Pro achieves 99.7% recall at 1M tokens, while others may struggle. Put the most critical content at the beginning or end of your prompt.

Token Cost Calculator

Estimate how much your AI usage costs via API. This is the developer pricing — consumer subscriptions (like ChatGPT Plus at $20/mo) give you unlimited messages for a flat fee.

Daily cost
$0.00
Monthly cost
$0.00
vs ChatGPT Plus ($20/mo)

Bottom line: For most individuals, a $20/mo subscription is far better value than API pricing. API pricing matters for businesses building products on AI, or power users who process thousands of documents.