MaveraMavera Docs
Reference
Checking…
Use or share this pageSend the page itself, print it, or open its complete context in your AI workspace.

Errors, limits & headers

Error envelope, rate limits, response headers.

1 min readDocs build Updated Jul 26, 2026

The envelope

Response
{ "ok": true,  "data": { }, "meta": { "tool": "…", "estimateCredits": N } }
{ "ok": false, "error": { "code": "…", "message": "…" } }

Error codes

StatusCodeMeaning & fix
401UNAUTHORIZEDMissing/invalid/revoked x-api-key. Mint or rotate the key.
402PAYMENT_REQUIREDOut of credits this period. Upgrade plan or add credits.
403FORBIDDENNot an admin for this workspace (members/billing/keys).
404UNKNOWN_TOOL / UNKNOWN_SURFACE / NOT_FOUNDNo such tool/surface/run.
422VALIDATION_ERRORBody didn't match the tool's JSON-Schema. The message lists the issues.
429RATE_LIMITEDToo many requests. Honor Retry-After.
400TOOL_ERROR / BAD_REQUESTThe tool ran but failed, or a malformed request.
500INTERNALUnexpected server error.

Response headers

HeaderOnMeaning
X-RateLimit-Limitevery callRequests allowed per window.
X-RateLimit-Remainingevery callRequests left in the current window.
X-RateLimit-Resetevery callUnix seconds when the window resets.
Retry-After429Seconds to wait before retrying.
X-Credits-Usedmetered callsCredits this request consumed.
X-Tokens-Totalmetered callsInput + output tokens this request.

Rate limits

Per-key sliding window — defaults to 120 requests / 60s (configurable via API_RATE_LIMIT / API_RATE_WINDOW_MS; set the limit to 0 to disable). Public discovery endpoints are rate-limited by IP.

Retry guidance

  • 429 — back off for Retry-After seconds, then retry. Use jittered exponential backoff for bursts.
  • 402 — don't retry; top up credits or upgrade.
  • 5xx — safe to retry idempotent reads; for tool invocations, check the result before re-running anything irreversible.
  • 422 — fix the body; retrying unchanged won't help. Pull the schema from GET /api/v1/tools/{name}.

On this page