Replicate API 429: Request was throttled. Your rate limit resets in ~30s — causes and fixes
The exact error
Request was throttled. Your rate limit resets in ~30s.
What it means
Replicate’s rate limit page sets two ceilings. You can create predictions at 600 requests per minute, and every other endpoint allows 3000 requests per minute. Short bursts above these limits are allowed before throttling starts. Once you are throttled, the API returns HTTP 429 with a detail string such as the one shown above. The number of seconds changes from one response to the next. The docs example says ~30s, and the response quoted in replicate-python issue #445 says ~10s.
Replicate’s docs describe two situations where the limit is stricter than the defaults:
- Low credit. As your account gets close to running out of credit, Replicate applies stronger rate limits. The goal is to keep you from overspending into arrears and to give you time to top up. The docs suggest turning on credit auto-reload so your balance stays above $20.
- Granted credit with no payment method. If you are using credit you were given and have no payment method on file, you are limited to 1 request per second, with a maximum of 6 requests per minute.
So a 429 doesn’t always mean you sent too many requests. It can reflect your account’s billing state.
A community report. In replicate-python issue #445, one user got this 429 when generating six Kontext Pro images with a company API key, while the same code worked with a personal key. Support said it was an implementation issue, and the thread has no resolution. Because the stricter limits above depend on account state, two accounts can be throttled differently. That is one possible explanation, but the thread doesn’t confirm it.
How to confirm it’s this
- The status is 429 and
detailstarts withRequest was throttled. - The body quoted in #445 also included
"status":429and"retry_after":10. The rate limit page doesn’t document these fields, so use them if they’re present, but don’t rely on them. - Check the account before you blame your traffic. If credit is low, or you are on granted credit without a payment method, you’ll hit the limit well below 600 predictions per minute.
- In the Python client, the error is raised as
ReplicateError. Itsstatusattribute is 429, anddetailcontains the message.
Fix
- Space out prediction creation so you stay under the documented limit, and avoid firing large batches all at once.
- If your credit is low, top up or turn on auto-reload, as Replicate suggests. If you are on granted credit, add a payment method.
- If you need more capacity, Replicate’s docs say to contact them about higher limits.
- Know what your client already does. The JavaScript client (
replicateon npm) retries 429 responses automatically with exponential backoff for every request method, including the POST that creates a prediction. The Python client’s retry transport retries 429 only for HEAD, GET, PUT, DELETE, OPTIONS and TRACE, and it honors a numericRetry-Afterheader when one is present. Prediction creation is a POST, so in Python a 429 on creation reaches your code asReplicateError.
A minimal Python backoff around creation:
import time
import replicate
from replicate.exceptions import ReplicateError
def run_with_backoff(model, inputs, attempts=5):
for attempt in range(attempts):
try:
return replicate.run(model, input=inputs)
except ReplicateError as e:
if e.status != 429 or attempt == attempts - 1:
raise
time.sleep(10 * (attempt + 1))
Retry or not
Yes, but only after waiting. The message tells you when your limit resets, so resending the same request after that point is correct. Retrying immediately just adds to the throttled count.
If you build agents, pool prediction creation behind one rate limiter per account. Don’t let each worker retry on its own schedule. If 429s continue at low volume, stop and check the account’s credit balance and payment method. More retries won’t fix a billing-driven limit.
When it’s not this
- A 429 that shows up in logs while your calls still succeed. Both official clients retry a throttled GET, such as a prediction status poll, before raising anything. If your application never sees an error, the client absorbed the 429 for you. It is still a sign that you are near the limit.
- A different provider’s rate limit. OpenAI’s images-per-minute limit and Google’s
RESOURCE_EXHAUSTEDuse different wording and quota models. See the related pages below.
Related errors
- OpenAI: images per minute rate limit
- Google: RESOURCE_EXHAUSTED
- Google: free tier image quota limit 0
- fal: User is locked. Reason: Exhausted balance.
- fal: Downstream service unavailable
Error text last verified against the sources below on .
Where these facts come from
- https://replicate.com/docs/topics/predictions/rate-limits
- https://github.com/replicate/replicate-python/issues/445
- https://github.com/replicate/replicate-python/blob/main/replicate/client.py
- https://github.com/replicate/replicate-python/blob/main/replicate/exceptions.py
- https://github.com/replicate/replicate-javascript/blob/main/index.js