View as Markdown

API

Statuses

Every status the API returns and what to do about it.

Application errors are JSON with a _tag and a message. Request-schema validation failures return 400 and may have an empty body, so check the HTTP status before parsing JSON.

status_tagmeaningwhat to do
400InvalidRequest or an empty bodyThe request is invalid.Check required fields, types, and limits against the request schema.
401UnauthorizedKey missing, unknown, or revoked.Send a live key as Authorization: Bearer or X-API-Key.
402PaymentRequiredNo credit left for this call. topUpUrl points at the console.Top up in the console.
403InsufficientScopeThe key lacks the scope for this product.Create a key with the papers scope.
429RateLimitedThe workspace exceeded its request limit.Wait 60 seconds before retrying.
403HipaaRestrictedThe workspace is HIPAA-enabled; Papers is not available.Use a non-HIPAA workspace.
502UpstreamUnavailableThe search index did not answer.Retry with backoff. Metered calls that fail this way are not charged.
503ContentsUnavailablePublic contents retrieval is intentionally disabled pending licensing review.Do not retry; no retrieval or charge occurs.

Retrying

Treat 502 as retryable after a short backoff and 429 as retryable after 60 seconds. Treat 402 as final until you top up.