Errors and limits

Error format, error codes, and request limits.

Error format

Errors use standard HTTP status codes and a consistent JSON body:

400 Bad Request
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "The message field is required."
  },
  "request_id": "req_6yN1sQ8vKb2LmZ0e"
}

Branch on error.code, which is stable. error.message is meant for people and may change. Error responses never include stack traces or details from upstream services.

Error codes

StatusCodeMeaning
400INVALID_REQUESTThe body is not valid JSON or fails validation. The message names the field.
401UNAUTHORIZEDThe API key is missing, malformed, unknown, or revoked.
402BILLING_PAYMENT_REQUIREDPaid usage is blocked: an invoice is unpaid, or Pay As You Go has no payment method. Resolve it in the billing dashboard. Unused free requests still work.
404NOT_FOUNDThe requested API does not exist. Check the product and operation in the path.
413PAYLOAD_TOO_LARGEThe request body is over the size limit.
415UNSUPPORTED_MEDIA_TYPEThe Content-Type header is not application/json.
422UNPROCESSABLE_CONTENTThe input could not be evaluated. Retrying the same input is unlikely to help.
429RATE_LIMITEDThe workspace exceeded its per-minute request limit. Retry after the Retry-After header.
429USAGE_LIMIT_EXCEEDEDThe workspace reached its monthly allowance (Free) or its spending cap (Pay As You Go). Don't retry until the limit changes or the next UTC month starts.
500INTERNAL_ERRORSomething failed on our side. Retrying is safe.
503SERVICE_UNAVAILABLEThe API is temporarily unavailable or not yet configured. Retry later.
504TIMEOUTProcessing took too long. Retrying is safe.

Rate limits

Each workspace can make 10 requests per rolling minute on Free and 60 on Pay As You Go, across all of its keys and the playground. Over the limit, the API returns 429 RATE_LIMITED with a Retry-After header in seconds. If you need a higher limit, contact us.

Monthly usage limits

Usage is counted per workspace per UTC calendar month, across all keys and the playground. A request counts once it completes successfully (a 2xx response, including results such as unknown or requires_review). Rejected and failed requests (4xx, 5xx) never count.

  • Free includes 1,000 requests a month. After that, requests return 429 USAGE_LIMIT_EXCEEDED until the next month.
  • Pay As You Go includes the same free requests, then bills each successful request up to your monthly spending cap. At the cap, requests return 429 USAGE_LIMIT_EXCEEDED.
  • If an invoice is unpaid or no payment method is saved, paid requests return 402 BILLING_PAYMENT_REQUIRED until it's resolved; unused free requests keep working.

Retries

Retry 429 RATE_LIMITED, 500, 503, and 504 with exponential backoff. Don't retry 429 USAGE_LIMIT_EXCEEDED, 402, or other 4xx responses without changing the request or your billing settings.