AstroAsk Docs

Rate limits & quotas

Monthly quotas, per-second rate limiting, response headers, and the three limit responses you can receive.

Two independent limits apply to every key, and they fail differently. Knowing which response you got tells you exactly what to do next.

Monthly quota

Each plan includes a monthly request allowance, counted per account (all your keys share it) in calendar months (UTC). One HTTP request = one unit — every endpoint costs the same. A batch of N calculations costs N units.

When the month's allowance is exhausted:

{ "success": false, "error": "QUOTA_EXCEEDED", "message": "…" }

with status 429. The quota resets at the start of the next UTC month.

Per-second rate limit

Each key also has a requests-per-second ceiling (token bucket, brief bursts tolerated). Exceeding it returns status 429 with a Retry-After header (seconds):

{ "success": false, "error": "RATE_LIMITED", "message": "…" }

Rate-limited requests are not charged against your monthly quota — a retry loop can never drain your allowance. Honour Retry-After and resend.

Trial hard stop

Trial keys stop hard at 5,000 requests or 14 days, whichever comes first, with status 402:

{ "success": false, "error": "TRIAL_EXPIRED", "message": "…" }

Unlike the two 429s, a 402 never resolves by waiting — it means the trial is over.

Telling them apart

StatuserrorMeaningWhat to do
429RATE_LIMITEDToo fast right nowWait Retry-After seconds, retry
429QUOTA_EXCEEDEDMonthly allowance used upUpgrade, or wait for the UTC month reset
402TRIAL_EXPIREDTrial cap or 14-day window hitSubscribe to continue

Response headers

Every authenticated response includes your live standing:

HeaderMeaning
X-RateLimit-LimitMonthly request allowance for your plan
X-RateLimit-RemainingRequests left this month
X-RateLimit-ResetISO timestamp of the next monthly reset (first instant of next UTC month)
X-RateLimit-RPSYour per-second ceiling
X-PlanPlan slug
Retry-AfterOnly on RATE_LIMITED responses — seconds until a token frees up

Usage alerts

We email the account owner when monthly usage crosses 80% and 100% of the allowance — once per threshold per month, so you hear about it before your users do.