Skip to content

Ruza Drive / Guides

Rate limits

How many requests the Ruza Drive API accepts per minute and per day by plan, the headers that tell, and how to react to a 429 error.

Limits by plan

Limits apply to the account, all keys together, per minute and per day, by plan. GET /key returns those of your account, in limits.

PlanRequests per minuteRequests per dayKeys at most
Free302,0002
Standard12025,0005
Plus300100,00015
Unlimited600500,00030

A key may also have its own per-minute ceiling, lower than the account's, set in your account (rate_limit_per_minute in GET /key): a runaway script does not drain the others.

Response headers

Every answer tells where you stand:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
X-RateLimit-Reset: 1795431960
  • X-RateLimit-Limit: the requests allowed in the current minute.
  • X-RateLimit-Remaining: those left.
  • X-RateLimit-Reset: the end of the minute, in Unix seconds.
  • Retry-After (on a 429): the seconds to wait.

Exceeding and backing off

Beyond, the answer is 429 rate_limited with Retry-After. Wait that long before retrying, never in a tight loop: a refused request counts too. Not every other error should be retried (retry or not).

// Retries a request after a 429 (Retry-After) or a 503, with a growing delay.
async function call(url, options, attempts = 5) {
  for (let attempt = 0; ; attempt++) {
    const response = await fetch(url, options);
    if ((response.status !== 429 && response.status !== 503) || attempt + 1 >= attempts) return response;
    const wait = Number(response.headers.get("Retry-After")) || 2 ** attempt;
    await new Promise((resolve) => setTimeout(resolve, wait * 1000));
  }
}

Invalid keys count apart, by IP address: 30 failures per minute, then 429 for 15 minutes for that address.

Transfers and blocks

An upload block (PUT /uploads/{id}/chunks/{index}) counts as one request, whatever its size. Volume stays bounded by the quota and by any measure on the account. Too many simultaneous transfers answer 429 too_many_transfers, too many open uploads 429 too_many_uploads: complete or cancel the uploads in progress.

Next guidePermissions and restrictions