Skip to main content

Rate limits

The API counts your calls in a short window. Over a limit, it answers 429 rate_limited with a retry-after header, in seconds. Wait that long, then send again. Burst is how many calls you can send at once. After a burst, your allowance fills up again at the per-minute rate. For example, without a key you can send 10 calls at once, and then about one call every 2 seconds. A key counts all its calls together, wherever they come from.
Most answers may be cached for 5 seconds. If many users of your app read the same machine, cache the answer on your own server. Then one call can serve them all.

API keys

Reads do not need a key. A key gives your app its own limit, instead of the shared limit for your IP address. The future build routes will need a key. Ask for a key or a higher limit at hello@gabox.fun. Gabox issues keys by hand and shows each key once. Keep it secret, like a password, and keep it on your server. Send the key in the Authorization header:
A key starts with gbx_ and has 43 more characters. If the header is there but the key is malformed, unknown or revoked, the API answers 401 unauthorized. It does not fall back to the limit without a key. So you see a typo at once. A request with no Authorization header never gets a 401.

Errors

Every error answers with this shape:
Read code in your code. The message is for people, and its wording can change. An error answer is never cached.