Skip to main content
Errors come back as the error envelope: error (message), code (HTTP status), error_type (stable kind), plus op, request_id and attempts when the request got that far. Match on error_type, not on the message text.

Status codes

Other kinds you may see inside attempts[].error_type but rarely as the final status: upstream_unauthorized (a provider rejected AgentKey’s own credential — we are alerted and the call fails over) and provider_error (the provider returned an error inside a 200).

A disabled category

A category you switched off in the console (Marketplace) is refused before any upstream call. For compatibility with the MCP surface this refusal is an HTTP 200 with a distinctive body, not an error envelope:
Check for disabled: true before reading data. Do not retry and do not route the request through another method; re-enable the category in the console if you need it.

Retrying

  • Retry 429, 502 and 504 with exponential backoff; the failed attempts were refunded, so a retry costs you nothing extra until it succeeds.
  • Do not retry 400, 401, 402 or 404 unchanged — the result will be the same.
  • When one provider keeps failing, name a different one with routing.only (see Routing & Pricing) rather than retrying blindly; GET /v2/ops/{method} shows each provider’s live health.
  • Include request_id when you contact support about a call.