LifeAstroAPILifeAstroAPI

Errors

Every error response is JSON with a consistent envelope:

{
  "error": {
    "code": "missing_param",
    "message": "lat and lon are required",
    "request_id": "770372810e5f2a70"
  }
}

code is a stable machine-readable string (listed below); message is human-readable and may change; request_id matches the X-Request-ID response header.

HTTP status codes

StatusMeaning
200Success.
400Invalid request — missing or malformed parameter.
401Missing, unknown or revoked API key.
402Payment required — no credits left, or free-tier cap reached.
403Request IP not in the key's allowlist, or account suspended.
404Unknown endpoint or sub-resource (e.g. an unknown varga or planet name).
405Wrong HTTP method (compute endpoints are GET).
429Rate limit hit — wait for Retry-After seconds.
500Internal error — retry with backoff; include request_id when reporting.
503Billing/data service temporarily unavailable — retry after a short wait.
504Request exceeded the server deadline — retry once; simplify if it repeats.

Error codes

Each code has its own page with the cause and the fix: Troubleshooting.

CodeStatusMeaning
missing_param400A required query parameter was not supplied.
invalid_param400A parameter is malformed (bad date, unknown timezone, out-of-range lat/lon).
bad_request400Malformed request body or unsupported combination.
unauthorized401Bearer token missing, unknown, or revoked.
insufficient_credits402Paid / PAYG account has no credits left — top up or upgrade.
daily_cap_exceeded402Free tier: the 500-credit daily cap is used up (resets at midnight IST).
monthly_cap_exceeded402Free tier: the 1,500-credit monthly cap is used up.
trial_exhausted402Trial credits used up.
quota_exhausted402Plan quota exhausted and overage is disabled on the account.
payment_required402Generic payment-required condition (see message).
ip_not_allowed403Request origin IP is not in the key's allowlist.
account_suspended403Account suspended — contact support.
forbidden403Authenticated, but not allowed to perform this action.
not_found404Unknown endpoint or sub-resource.
method_not_allowed405Wrong HTTP method.
rate_limited429Too many requests for your plan's per-minute limit.
data_unavailable503Ephemeris/geo data unavailable for the requested input.
billing_unavailable503Billing service unreachable — retry shortly.
internal_error500Unhandled error. Reference request_id when reporting.

Rate-limit and credit headers

Every authenticated response carries:

X-RateLimit-Limit: 156        # requests per minute for your plan
X-RateLimit-Remaining: 150
X-RateLimit-Reset: 1789363680 # unix seconds when the window resets
X-Credits-Remaining: 1970
Retry-After: 12               # only on 429

Retry semantics

  • 429: wait Retry-After seconds, then retry.
  • 500 / 503 / 504: retry with exponential backoff (1s, 2s, 4s, 8s — max 5 attempts).
  • Other 4xx: do not retry — the request is deterministically invalid. Fix the parameters, top up credits, or fix the key/IP.

Request ID

Every response (success or error) includes X-Request-ID (16 hex characters). When reporting an issue, always include it — it lets us pull the exact trace from our logs.

X-Request-ID: 52a520f261d3db37