Errors

Problem Details responses, error codes, and how to retry safely.

Errors use Problem Details with Content-Type: application/problem+json. Business errors include a stable code you can branch on.

Error format

{
  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.30",
  "title": "Credit allowance and top-up balance exhausted or customer access changed. Check usage before retrying.",
  "status": 429,
  "code": "quota_exceeded"
}
Field Description
status The HTTP status code
title A human-readable summary. Don't parse it; wording can change.
code A stable, machine-readable identifier. Present on business errors only.
type A URI describing the HTTP status

Additional fields such as traceId can appear. Ignore fields you don't use. Error responses never include internal exception details.

Error codes

Status code Meaning Retry?
400 invalid_content content is missing, empty, whitespace only, longer than 16,000 characters, or contains NUL characters No — fix the request
400 invalid_language language isn't a valid language code No — fix the request
400 — Invalid JSON or wrong field types No — fix the request
401 — Missing, invalid, expired, or revoked API key No — check the key
403 customer_unavailable Your workspace is unavailable, for example suspended No — contact support
404 review_not_found The review doesn't exist, belongs to another workspace, or has expired. Review IDs that aren't UUIDs also return 404. No
413 — Request body larger than 64 KiB No — shorten the content
429 quota_exceeded Monthly allowance and top-up balance are used up After adding credits or the next reset
429 — A rate limit was reached Yes — after Retry-After
503 provider_unavailable No inference provider could produce a valid result. The credits were refunded. Yes — with backoff
503 review_unavailable The pending review couldn't be saved. The credits were refunded. Yes — with backoff
503 — Service capacity unavailable: too many concurrent requests Yes — with backoff and lower concurrency
500 — Unexpected server error Yes — with backoff

Handling errors safely

An error is never a moderation result. If you can't get a result, decide what your product should do — for example hold the content, publish it with a later re-check, or ask the author to try again. Don't treat a 503 as Pass.

Retry only what can succeed. Retry 429 without a code, 503, and 500 with exponential backoff and jitter. Don't retry 4xx validation and authentication errors — they fail the same way every time.

Respect Retry-After. When a 429 includes Retry-After, wait at least that many seconds.

Check usage before retrying quota_exceeded. Call GET /v1/usage to see creditsRemaining, topUpBalance, and resetsAt.

Remember retries are charged. A retried moderation is a new request. Server-side failures are refunded, but a request you cancel after it was admitted is not.

Example

const response = await fetch(url, options);
if (response.ok) return await response.json();

const problem = await response.json().catch(() => ({}));
switch (problem.code ?? response.status) {
  case "invalid_content":
  case "invalid_language":
    throw new ValidationError(problem.title);
  case "quota_exceeded":
    throw new OutOfCreditsError();
  case 429:
  case 503:
  case "provider_unavailable":
  case "review_unavailable":
    throw new RetryableError(response.headers.get("Retry-After"));
  default:
    throw new Error(`Clusterbot request failed with ${response.status}`);
}

See Integration examples for a complete retry loop.

Questions about this guide? Contact us or try requests in the playground.