DEV Community

Api-Ceilings
Api-Ceilings

Posted on Edited on

I built a cross-API rate limit reference because I was tired of guessing

I kept hitting 429s on APIs I use daily. Every time, I'd search "Stripe rate limit" or "OpenAI rate limit" and land on a docs page that told me about one API, in one tier, with no error shape and no retry logic.

So I started writing down what I actually needed:

  • The RPM and TPM by usage tier
  • The exact JSON the 429 returns
  • Retry logic that actually reads the Retry-After header
  • One escape hatch if I'm stuck

The first page covers OpenAI's 2026 limits — Build / Launch / Grow tiers, the difference between slow_down (429) and server_is_overloaded (503), and a Python retry wrapper that respects Retry-After instead of blindly backing off. Every number is dated.

It's here if it's useful: https://api-ceilings.github.io/theceiling/

No signup. No tracking. Just the numbers and the sources. I'll be adding more APIs one at a time — if there's a specific API whose limits you keep hitting, tell me and I'll prioritize it.

Top comments (4)

Collapse
 
krusenas profile image
Karolis •

The Retry-After wrapper is the useful bit. Most of my 429s weren't a plain wait though, they were OpenAI tokens-per-minute. A request that waits out the header still fails if it's bigger than the remaining budget. Worth storing that request's token count next to each limit and shrinking before you retry. Which API do you hit most that has no Retry-After header at all?

Collapse
 
apiceilings profile image
Api-Ceilings •

been thinking about your question and the honest answer is it isn't an api. it's an error type.

anthropic throws a 429 on the monthly spend cap and it's the same rate_limit_error as a normal limit. only difference is details.error_code says enforced_spend_limit_reached and there's no retry-after header at all. clears on the 1st, so waiting does nothing, and the sdk retries it anyway because it only sees rate_limit_error.

checking that code first now, before anything else. your token point is in there too and it mattered more than i expected. cache reads don't count against itpm, so the real ceiling is way higher than the number on the page.

Collapse
 
apiceilings profile image
Api-Ceilings •

you're right — retry-after only covers request rate. if a request is bigger than the remaining token budget then waiting out the header does nothing, and i'd been treating both cases as the same bug.

storing the token count per limit is the right fix. adding that this week.

honestly i don't have one that's worse than the others. it's TPM across the board, and none of them send the header on that side. maybe the token-budget case is the thing to lead with instead of the request-rate one.

Collapse
 
apiceilings profile image
Api-Ceilings •

Only OpenAI so far. Bit of a stretch for "cross-API," I know. Anthropic next, Stripe after that, then GitHub. If you keep hitting 429 on a different one, name it and I'll do that first.