Skip to content
Notifications
Clear all

API keeps throwing 429s. What's a sane retry strategy?

6 Posts
6 Users
0 Reactions
34 Views
(@emmam4)
Estimable Member
Joined: 2 months ago
Posts: 114
Topic starter   [#20940]

Hey everyone, been playing with the DeepSeek API on the free tier for a week. I'm trying to build a simple customer query classifier in Airtable.

My automation hits the API maybe 10 times in a minute sometimes, and I keep getting 429 errors. I'm using Zapier's built-in delay, but it's clunky.

What do you folks do? Is there a standard wait time before retrying? Should I just space out my calls way more? I'm worried about messing up my workflows 😅

I'm mostly using this with no-code tools, so a simple rule of thumb would be super helpful.



   
Quote
(@cost_optimizer_88)
Reputable Member
Joined: 5 months ago
Posts: 372
 

You're hitting 10 calls a minute on a free tier? That's your problem right there. There's no "standard" wait time, it's entirely dependent on the vendor's rate limit, which they often don't publish clearly for free tiers.

The rule of thumb is painfully simple: you're getting 429s because you're over the limit, so you need to slow down. Zapier delays are clunky because you're using a tool designed for connecting apps, not for building a proper queue. You need exponential backoff, but since you're in no-code land, your options are limited.

Your easiest fix is to space your calls out to, say, one every 15 seconds at most. That's 4 calls a minute, which might still be too many. The real solution is to move your logic to a platform that can handle a proper retry queue, but I suspect you don't want to hear that.


pay for what you use, not what you reserve


   
ReplyQuote
(@cloud_infra_newbie)
Honorable Member
Joined: 6 months ago
Posts: 367
 

Yeah, 10 calls a minute on a free tier sounds like a lot. I'm learning about this stuff too, and I've seen people use a "jitter" approach where you add a random wait before trying again. Makes it less likely to keep hitting the wall at the same time.

Would checking the response headers help? I saw somewhere that some APIs put the retry-after time in the 429 response. Not sure if DeepSeek does that tho.



   
ReplyQuote
(@caseyd)
Reputable Member
Joined: 3 months ago
Posts: 305
 

Checking the `Retry-After` header is the correct move, but it's often not there with a 429. More common with 503s.

Jitter is critical to avoid thundering herds. Don't just add random wait, use exponential backoff with jitter. A basic version:

```python
import random
import time

def wait_with_jitter(attempt):
base_delay = 2 ** attempt
jitter = random.uniform(0, base_delay * 0.1)
time.sleep(base_delay + jitter)
```

Even that might be too aggressive for a free tier. Start with a fixed 30-second delay between calls.


Benchmarks or bust.


   
ReplyQuote
(@cloud_sec_enthusiast)
Reputable Member
Joined: 4 months ago
Posts: 304
 

Great point about checking headers - that's the first thing I look for when dealing with 429s. DeepSeek's API docs aren't super clear on free tier limits, but you're right that `Retry-After` headers are more common with server-side throttling (503) than client-side rate limits.

Jitter is definitely important, but I've seen a common mistake where people add jitter without exponential backoff first. What happens is you're still retrying too fast, just randomly 😅

For no-code tools, here's a simple approach:
- Start with a 30-second delay between calls
- Double the wait time after each 429 (so 30s, then 60s, then 120s)
- Add ±5 seconds of randomness at each step

That basic pattern will get you further than trying to parse headers from tools that might not expose them.


security by default


   
ReplyQuote
(@dianar)
Honorable Member
Joined: 3 months ago
Posts: 487
 

Ten calls a minute on a free tier is definitely the trigger. The "standard" is backoff, but your no-code constraint changes the game.

Your simplest fix: hard cap your calls to one every 20 seconds. That's 3/minute, which is usually safe. Zapier delays are clunky because they're linear. If you get a 429, you need to stop and increase your base delay significantly.

Check if Zapier can read the HTTP response. If you see a 'Retry-After' header, use that. If not, double your base wait after each failure. So 20s, then 40s, then 80s. That's your exponential backoff, no-code style.


Five nines? Prove it.


   
ReplyQuote