🚧 Machines That Talk · Day 14

The Speed-Limit Gates

Having money isn't enough — the AI also caps how fast you can use it. There are several separate gates, and hitting any one stops you cold (that's the dreaded "429" error). Let's trip every gate on purpose.

↓ hit the gas
🚧 Lab · The Four Gates

Fire requests and watch the limits

Each request uses tokens. Every request counts toward requests-per-minute and tokens-per-minute. Blow past either and you're blocked until the minute resets. Bigger requests also risk the context and budget gates.

Request size:

📏 Context window

max 8,000 tokens per single request

🔁 Requests / minute (RPM)

max 5 requests each minute

🔢 Tokens / minute (TPM)

max 30,000 tokens each minute

💰 Daily budget

max $0.50 today
Send a few small requests, then spam them fast — you'll trip the RPM gate before you run out of money. Different jobs hit different gates first!
🐞 Break-It Challenge

Two very different blocks

Tap each and watch which gate slams first — they fail for totally different reasons.

See the difference? Spamming trips RPM (too many requests) — the tokens were tiny. The giant request trips the context window (too big to even fit) and TPM. "Slow down" and "too big" are different limits with different fixes.
🏷️ The pro wordThese caps are rate limits: RPM (requests per minute), TPM (tokens per minute), plus the context window per request and a spending quota / budget. Hit one and the API returns error 429 (Too Many Requests). Your limits depend on your usage tier — pay more history, get higher limits.
🎯 Boss Build · Beat the Gates

Get the batch through

You must process 5 jobs of 5,000 tokens each (25,000 tokens total). But TPM is 30,000 and RPM is 5 per minute. Plan how to send them without a 429. Pick a plan and run it!

🚀 Beyond the Basics

How the pros really do it

Every real app has to live within rate limits. Here's how they cope, from naive to pro:

😵

Just retry instantly (the mistake)

Hammer the API again right away. ✅ Simple. ⚠️ You stay blocked and can get throttled harder.

Back off & wait (the fix)

Wait a bit longer after each 429. ✅ Recovers smoothly. ⚠️ Slower overall.

📬

Queue & batch (the pro move)

Spread jobs over time / use a batch API. ✅ Never trips limits, often cheaper. ⚠️ Not instant.

🏷️ Pro names to look up429 Too Many Requests, exponential backoff, retry with jitter, Retry-After header, request queue, batch API, and usage tiers / quotas.

🎉 Day 14 Complete!

You tripped every gate: context window, RPM, TPM, and budget. Now a "429" error will never confuse you — you'll know exactly which limit you hit and how to fix it (slow down, shrink the request, or wait for the reset).

Day 15: Cheap, Fast, Smart →
Tomorrow: with cost AND limits understood, we learn to pick the right model for each job — cheap, fast, or smart. ⚖️
AI Adventure · Machines That Talk · Day 14 — made for young inventors 🚀