Loading your account

Rate limits

Limits keep the API fast for everyone. They count requests in fixed windows, per key and per account.

Request limits

Applies toLimit
Each API key120 requests per 60 seconds
All keys of an account together300 requests per 60 seconds

Headers

Every response to an API key carries the tighter of the two limits:

  • RateLimit-Limit: requests allowed in the current window.
  • RateLimit-Remaining: requests left in the current window.
  • RateLimit-Reset: seconds until the window resets.
  • RateLimit-Policy: the limit and the window, for example 120;w=60.

Above the limit you get 429 with the code rate_limited and a Retry-After header: wait that many seconds before you retry.

HTTP
HTTP/1.1 429 Too Many Requests
Content-Type: application/problem+json
RateLimit-Limit: 120
RateLimit-Remaining: 0
RateLimit-Reset: 17
RateLimit-Policy: 120;w=60
Retry-After: 17

Generations running at once

Apart from request limits, 4 generations run at once per account (8 after your first coin purchase). You can submit more: extra generations wait in the queue and start as others finish. GET /v1/generations/concurrency shows the limit and how many run or wait right now.

Poll a generation no faster than every 2 seconds, or use webhooks instead.