Skip to main content

Command Palette

Search for a command to run...

Rate Limits: The Wall You'll Hit Right When Things Start Working

The API caps how fast you can call it. Plan for the 429, because you will meet it.

Updated
3 min readView as Markdown
Rate Limits: The Wall You'll Hit Right When Things Start Working
I
Welcome to Bits8Byte! I’m Ish, an AI Engineer with 13+ years of experience across software engineering, automation, cloud, and AI-driven systems. This blog is where I share practical insights, technical deep dives, and real-world lessons from building modern software and exploring the fast-moving world of AI. My background spans Java, Spring Boot, Python, FastAPI, AWS, Docker, Kubernetes, DevOps, observability, and automation. Today, my work is increasingly focused on AI engineering, including LLM applications, AI agents, production-grade microservices, and scalable cloud-native architectures. Here, you’ll find thoughtful writing on AI trends, engineering best practices, software architecture, and the mindset required to adapt and grow in the age of AI. My aim is not just to explain technology, but to make it useful, practical, and grounded in real implementation experience. Thanks for stopping by. I hope this space helps you learn something valuable, think more deeply, and stay ahead in a rapidly evolving industry.

Rate limits are the thing you never think about while you're building and slam into the moment you go to production. Everything works beautifully in testing — you're making a handful of calls — and then real traffic arrives, the API starts returning 429s, and you're learning about rate limits the hard way. Better to learn them the easy way.

What a rate limit is

A rate limit is a cap on how much you can call the API in a given window of time. It's not one number; it's usually a few, measured along different axes — requests per minute and tokens per minute being the common ones. Exceed any of them and the API stops serving you and returns an error (the famous 429, "Too Many Requests") until the window resets.

The reason they exist is mundane and reasonable: shared infrastructure. The provider is protecting the service from any single customer — or a runaway loop in your code — overwhelming it. It's the same reason every serious API has them.

Why tokens-per-minute trips people up

The requests-per-minute limit is intuitive. The tokens-per-minute one catches people out, because it means your effective capacity depends on how big your calls are, not just how many. A hundred tiny requests and ten enormous ones can hit the same token ceiling. If you're sending large prompts or asking for long outputs, you'll exhaust the token budget long before the request budget — and it won't be obvious why you're throttled while making "only a few" calls.

The failure mode, and the fix

Here's how it usually goes wrong. You build something that fires requests in a tight loop — processing a list, backfilling data, handling a spike — and you blow through the limit almost instantly. The naive version just crashes or drops work.

The grown-up version expects the 429 and handles it. Two habits cover most of it. First, retry with backoff: when you get throttled, wait a moment and try again, increasing the wait each time rather than hammering the door. Second, control your own send rate so you stay under the ceiling in the first place, instead of sprinting into it and recovering. Any client library worth using has this built in; the mistake is assuming you'll never need it.

The mindset

Treat rate limits as a normal operating condition, not an error. The 429 isn't a bug in your code or theirs — it's the API telling you to slow down, and a well-built integration listens. If your volume genuinely outgrows the limits, that's a conversation with the provider about higher tiers, not something to brute-force around.

The teams that get surprised by rate limits are the ones who tested with ten requests and shipped for ten thousand. The ones who don't are the ones who assumed, from day one, that the wall was there — and built to live comfortably on the right side of it.

Exploring OpenAI

Part 6 of 6

A deep dive into OpenAI’s models, applications, and use cases. Learn how GPT, DALL·E, Codex, and Whisper work, with easy-to-follow insights, practical examples, and best practices for beginners and developers.

Start from the beginning

Choosing an OpenAI Model: The Only Trade-Offs That Matter

The lineup changes every few months. The way you pick between them doesn't.