API reference

Rate limits & retries

#How limits work

Each account can send 500 model requests per minute by default. Only requests that start work count; checking a task or downloading its result does not. Need more? Contact support to raise it.

The limit covers the whole account, not each key, so splitting projects across keys does not split it. Past the limit the gateway answers 429; back off and retry.

#Retrying correctly

Honor Retry-After when present, otherwise back off exponentially with jitter. Cap total attempts — a hard-down model is better surfaced to your caller than retried forever.

backoff.py
import time, requests

def call_with_backoff(url, headers, body, tries=5):
    for i in range(tries):
        r = requests.post(url, headers=headers, json=body)
        if r.status_code != 429:
            return r
        # Respect Retry-After (seconds); fall back to 2**i backoff.
        wait = int(r.headers.get("Retry-After", 2 ** i))
        time.sleep(wait)
    r.raise_for_status()

Still stuck?

Send us the request ID or the error message and we will look into it.