Skip to content

Errors

Crisps uses conventional HTTP status codes. Error responses are JSON with an error message (some also include context fields such as credits_used):

{ "error": "monthly credit quota exceeded", "credits_used": 1000, "credits_limit": 1000 }
StatusMeaningWhat to do
200 OKSuccess.
400 Bad RequestInvalid parameters (e.g. malformed body).Fix the request payload.
401 UnauthorizedMissing, malformed, or revoked API key.Check the key and the Authorization header.
402 Payment RequiredMonthly credit quota exceeded.Raise your limit or upgrade in the dashboard.
403 ForbiddenThe key lacks the required scope, or is limited to basic depth.Use a key permitted for this endpoint/depth.
429 Too Many RequestsPer-minute rate limit exceeded.Back off; honour the Retry-After header.
502 Bad GatewayUpstream search backend failed.Retry with backoff.

Every metered response includes usage headers:

HeaderDescription
X-RateLimit-LimitRequests allowed per minute on your plan.
X-RateLimit-RemainingRequests left in the current window.
X-Credits-LimitMonthly credit allowance.
X-Credits-UsedCredits used this month (including this call).
X-Credits-RemainingCredits left this month.
Retry-AfterSeconds to wait before retrying (on 429).

Pass an Idempotency-Key header to make a request safe to retry — Crisps de-duplicates repeated calls with the same key within your organization, so a retried request isn’t billed twice.

Terminal window
curl -X POST https://api.crisps.ai/search \
-H "Authorization: Bearer $CRISPS_API_KEY" \
-H "Idempotency-Key: 2f9c1a7e-…" \
-H "Content-Type: application/json" \
-d '{"query": "…"}'
  • Retry 429 and 502 with exponential backoff (e.g. 1s, 2s, 4s, jittered).
  • Do not retry 400, 401, 402, or 403 — they need a change on your side.
  • Reuse an Idempotency-Key across retries so a succeeded-but-timed-out call isn’t charged twice.