spicyapiDocs
Main content

API rate limits & parallel tiers

Understand SpicyAPI request rate limits, upload-ticket fuses, parallel task concurrency tiers (2× / 3×), and Retry-After backoff headers.

SpicyAPI enforces two distinct kinds of throughput protection, both returning HTTP 429 with Retry-After when exceeded:

  • API request rate limits (code: 429) cap how many HTTP requests your account sends in a short window (token buckets per 10 seconds or per minute). They are safety fuses against runaway scripts.
  • Parallel task limits (code: 42901) cap how many media generation tasks your account can run simultaneously (queued or running). Top-up tiers on the Billing page unlock 2× and 3× parallel task limit multipliers — those apply to in-flight media concurrency, not to the per-window HTTP request rate buckets.

Limits at a glance

LimitDefaultWhat you get when you hit itDetails
API request rate per account1,000 per 10 seconds for reads, the same again for writes429 (code: 429) with Retry-Afterbelow
Parallel media tasks (in-flight concurrency)1,000 (1×); unlocks 2× (2,000) at $100 and 3× (3,000) at $250 lifetime top-ups; text/chat excluded429 (code: 42901) with Retry-Afterbelow
Upload URL requests1,000 per 10 seconds429 (code: 429) with Retry-Afterbelow
Upload URLs requested but not yet used128 files or 1 GiB429, waiting doesn't helpbelow
Usage report30 per minute; 92-day range429 / 400below, Billing
Available balance—40201Billing
Key spend caps (daily / monthly / lifetime)None unless you set one40202Billing
Team daily / monthly limitsNone40202Billing
Teams you own / members per team10 / 100409 in the consoleConsole and teams

Two buckets per account: reads and writes

The API — everything under /api/v1/* and the compatible /v1/* and /v1beta/* endpoints — is rate-limited per account, not per key: per key, anyone could route around it by creating more keys.

Reads and writes are counted in two separate buckets with the same allowance. The default protection threshold is 1,000 requests per 10 seconds in each: about 100 sustained RPS (requests per second) with a burst of 1,000. This is a high-level abuse and runaway-client fuse, not a low quota for normal paid generation traffic.

It is a token bucket rather than a fixed-window counter: capacity 1,000, refilled over 10 seconds (roughly 100 tokens per second). Each request takes one token; tokens come back steadily. Unlike a fixed window, the token bucket smooths replenishment at window boundaries.

Reads and writes draw from different buckets

Reads are every GET request — recordInfo, the jobs list, chat/credit, usage, models — plus jobs/quote, which only prices a request. Writes are everything else: createTask, retry, stream, purge, common/upload-url, common/download-url, and the compatible chat/completions, messages and Gemini generation endpoints. The native and compatible endpoints share the same two buckets, so switching a text integration from /api/v1 to /v1 does not give you a second allowance.

Polling can no longer starve task submission. A runaway polling loop drains only the read bucket: recordInfo starts returning 429, while createTask keeps going through. Polling still spends requests, so production integrations should still prefer webhooks to cut pointless calls and latency.

The model catalog draws on the read bucket. Do not fetch an unchanged schema before every task; cache it by update time and refresh after validation failures.

upload-url has its own 1,000 requests per 10 seconds high-level fuse on top of the write bucket above. It separately protects object-storage write authorization; normal uploads should not approach it.

usage has an extra fuse in the opposite direction: a far tighter 30 requests per minute, on top of the read bucket above. It aggregates historical tasks, so one call costs much more than an ordinary read and a high-level fuse alone is not enough protection for it. Use it to reconcile, not as a polling endpoint. This bucket also never fails open: when the rate-limit decision is unavailable it always returns 429, where other buckets may be configured to let traffic through.

Upload URLs you haven't used yet

Separately, one account can hold at most 128 upload URLs that haven't been used yet, or 1 GiB of declared file size across them. Requesting another returns 429 with Too many pending uploads; finish existing uploads before requesting more, and no Retry-After.

Waiting doesn't help here, so don't let a generic retry loop spin on it. Upload and commit the files you already requested (or let their upload URLs expire, which takes about 20 minutes), and the room is freed immediately. This usually means a script requests upload URLs in bulk and never uses them. See Media.

Every bucket

Limits are mounted per surface, so everything under one surface shares a middleware chain. As an API consumer you can hit the first five:

BucketCoversCounted byDefault allowance
(network)every API request, before the key is checkedsource IP address (IPv6: its /64 network)6,000 per minute — far above normal use; many people behind one company network share it
open_apiwrites under /api/v1/*, /v1/* and /v1beta/* (every method except GET/HEAD, apart from jobs/quote)account1,000 per 10 seconds (about 100 sustained RPS)
open_api_readreads under the same paths: GET/HEAD (including the models catalog) and jobs/quoteaccount1,000 per 10 seconds (about 100 sustained RPS)
upload_url/api/v1/common/upload-urlaccount1,000 per 10 seconds (on top of open_api)
api_usage/api/v1/usageaccount30 per minute (on top of open_api_read)
console surfaceauthenticated /console/v1/* endpointsaccount120 per minute for reads, the same again for writes
catalogthe public, anonymous catalog behind the marketing site (not /api/v1/models)source IP300 per minute

Per account, not per key

open_api and open_api_read count against the account. Minting more keys buys you nothing — if the limit were per key, working around it would be one click in the console.

upload_url and api_usage are genuinely separate buckets, though: uploading a reference image draws a token from open_api and from upload_url, one usage read draws from open_api_read and from api_usage, and either bucket running dry returns 429.

These numbers are defaults that we can change without a release. Your current allowance is always in the X-RateLimit-Limit header and on the console Overview. Trust the header, and do not hard-code the defaults into your client.

Response headers

HeaderPresent onMeaning
X-RateLimit-LimitEvery responseAllowance for the current window
X-RateLimit-RemainingEvery responseTokens left
Retry-After429 from a rate limitSeconds to wait, minimum 1

A normal response from an account with the default allowance carries:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 997

X-RateLimit-Remaining is sent on successful responses too, so you can slow down before hitting a 429 rather than after.

On a 401 these headers describe the per-network bucket (6000), not your account's bucket, because the key was never identified.

What a limit looks like

{
  "code": 429,
  "msg": "Too many requests. Retry in a moment",
  "request_id": "req_…"
}

HTTP status 429, with Retry-After.

Over-limit requests are rejected, not queued

They return immediately. Queuing them would just let latency pile up and hand you a connection that never returns — harder to handle than a clear 429. A rejected request was never accepted, so it costs nothing.

Handling it

Read Retry-After. Do not hammer at a fixed interval. The examples stop after five attempts, which also keeps the "pending uploads" 429 above from looping forever.

JavaScript
async function callRespectingLimits(url, init) {
  for (let i = 0; i < 5; i++) {
    const res = await fetch(url, init);

    if (res.status !== 429) return res;

    // The server already told you how long to wait; don't guess
    const wait = Number(res.headers.get('retry-after') ?? 1);
    await new Promise((r) => setTimeout(r, wait * 1000));
  }
  throw new Error('persistently rate-limited');
}
Python
import time, requests


def call_respecting_limits(method: str, url: str, **kwargs) -> requests.Response:
    for _ in range(5):
        res = requests.request(method, url, **kwargs)

        if res.status_code != 429:
            return res

        # The server already told you how long to wait; don't guess
        time.sleep(float(res.headers.get("retry-after", 1)))

    raise RuntimeError("persistently rate-limited")

Rate limits vs. parallel task limits

API request rate limits and parallel task limits are enforced separately

  • API request rate limits (code: 429) govern submission and polling speed — how many HTTP requests your account sends per 10-second window (open_api and open_api_read). Once a task is accepted, it stops consuming request-rate tokens.
  • Parallel task limits (code: 42901) govern in-flight media concurrency — how many image, video, audio, or 3D generation tasks your account has queued or running at the same time. Text and chat completions are not counted against this cap.

Parallel task limit tiers (1× / 2× / 3×)

The 2× and 3× parallel task limit perks shown on the Billing / top-up page multiply your account's simultaneous media-task ceiling automatically based on lifetime top-ups (they do not change the per-window HTTP request rate buckets above):

TierLifetime top-upsMultiplierDefault parallel media tasks
StandardUnder $1001×1,000 in flight
Pro$100 or more2×2,000 in flight
Studio / Scale$250 or more3×3,000 in flight

When your account reaches its parallel media task cap, new task creations return HTTP 429 with business code 42901 and a Retry-After header. No task is created and no funds are held. Wait for running tasks to finish and retry after Retry-After. Accounts on custom enterprise plans can arrange higher or uncapped concurrency.

Other bounds on tasks in flight

In addition to your parallel task tier, simultaneous work is bounded by:

  • Available balance — every in-flight task holds funds. When the balance runs out, new tasks get 40201.
  • Spend caps — key daily, key monthly, key lifetime, a team's daily and monthly limits (for keys that belong to a team), and the platform daily cap. Any of them reaching its ceiling gives 40202. See Spend caps.
  • Execution capacity — when a model cannot run at all you get 50301.

Branch on the business code (429 vs. 42901 vs. 40201 / 40202) rather than HTTP status alone so your client backs off on request bursts, waits for running jobs on 42901, and surfaces balance or cap errors directly.

Asking for more

Your current allowance is shown on the console Overview. To ask for more, open a conversation under Support (topic: API integration) and describe your traffic: peak requests per second, whether you run batches and how large a batch gets. That makes the review considerably faster.

Until then, keep client concurrency bounded and honor Retry-After. Choose the concurrency bound from workload, generation time, and available balance rather than forcing it artificially low to fit the default rate limit.

When the limiter itself is unavailable

Rate limiting depends on an external counter. If it fails, the configured posture decides what happens: allow (keep serving) or reject (protect the allowance). Reject is the default — "we could not read the configuration" must never come out as "there is no limit".

When configured to reject you receive 429 with Retry-After: 1, not 500. That is deliberate: 500 means "we are broken", and client SDKs overwhelmingly retry it immediately, adding load during an incident. 429 with Retry-After means "back off and come back", which is what is needed.

So do not read 429 as proof that you were going too fast. Honouring Retry-After is the correct response either way.

On this page