1ToolRing Docs Get a key
View as markdown
concepts/errors

Every error is one envelope:

{ "error": { "code": "INSUFFICIENT_CREDITS", "message": "what to do" } }

The message says what to do; the code is the stable value to branch on. A non-2xx response is never charged.

Metered calls

CodeStatusMeaning
UNAUTHORIZED401Missing or invalid key.
INVALID_API_KEY401Key not found or revoked.
VALIDATION_ERROR400The request does not match the entry’s input.
INSUFFICIENT_CREDITS402The wallet cannot cover this call.
BUDGET_EXCEEDED402A credit cap for this key, org or agent would be exceeded.
CALL_CAP_EXCEEDED402The call cap for this key has been reached.
POLICY_DENIED402A deny rule blocked this host, path or method; its note is in the body.
PAYMENT_REQUIRED402x402 offer issued (see x402).
UNPRICED_PRODUCT402The product has no price in the price table; it is refused, not served free.
NOT_FOUND404Unknown catalog id, or a path this API does not serve.
CATALOG_PRICE_UNVERIFIED409The entry’s price has no provenance.
NO_CANDIDATE_SOURCE422No source may serve this routed capability for this caller.
RATE_LIMITED429Too many requests for this key; retry after Retry-After.
NO_USABLE_SOURCE502Every candidate source was tried and none could express the request.
UPSTREAM_ERROR502The provider answered 4xx or 5xx.
UPSTREAM_UNAVAILABLE502The provider could not be reached or timed out.
UPSTREAM_RESPONSE_TOO_LARGE502The provider’s answer exceeded the tool’s response limit.

Account and billing

CodeStatusMeaning
TURNSTILE_REQUIRED400Turnstile token required.
TURNSTILE_FAILED403Turnstile verification failed.
EMAIL_EXISTS409Email already registered.
EMAIL_NOT_VERIFIED403A verified email is required.
INVALID_CREDENTIALS401Bad email or password.
ACCOUNT_SUSPENDED403Account suspended.
UNAUTHORIZED / INVALID_TOKEN401Bad or expired JWT.
FORBIDDEN403Admin route for a non-admin.
INVALID_PACKAGE400Unknown top-up package_id.
PAYMENT_NOT_CONFIGURED503The payment provider is not configured.
PAYMENT_PROVIDER_ERROR502The Polar checkout could not be created; nothing was charged.
INVALID_SIGNATURE403Payment webhook signature invalid (Polar to 1ToolRing only).