agentic402

Error codes

Every status code the API returns, per tool. The short rule: anything 400 or above is never charged, either because it is rejected before payment or because the payment is left unsettled.

Status codes returned by agentic402 endpoints
StatusReturned whenChargedWhat to do
200Success (fetch, inbox create and read, memory overwrite and reads, wake status, attest lookups)yes, if paid routeUse the result
201Created: first memory write (with new token), wake job scheduled, attest statement signedyesKeep any token returned
204memory key deleted, wake job cancelledneverNothing
400Bad input: URL, format, key, hash, time, headers or body (checked before payment)noFix the request. The error message says what's wrong
401memory: missing, malformed or unknown tokennoSend Authorization: Bearer <64 hex>, or write without a token to start a new space
402Payment required, or the payment sent was not acceptednoPay the offer in PAYMENT-REQUIRED and repeat
403fetch: robots.txt disallows the URL or can't be read right now, or the site or a redirect leads to a private or non-http addressnoDon't retry. Pick another source
404Unknown or expired inbox, wrong token, unknown wake job, missing memory key, unknown attest IDnoCheck the ID and token
413fetch: page over 5 MB. memory: value over 1 MB, or space full (50 MB or 10,000 keys). inbox: body over 256 KB (to the sender)noSend less, or use a new space
415fetch: content type it can't convertnoDon't retry
429Over 60 requests a minute per IP (all /v1 routes and /mcp), 30 uncached fetches a minute to one site, or 60 requests a minute to one inboxnoWait for Retry-After (60 seconds)
502fetch: the site answered with an error, its address couldn't be looked up, too many redirects, or conversion failednoRetry later, or try another URL
504fetch: the site took longer than 15 secondsnoRetry later

Error bodies

Errors come back as JSON with a single field, for example {"error": "robots.txt disallows fetching this URL"} or {"error": "rate limit: 60 requests a minute per IP"}. The message is meant to be read by the agent, so passing it to the model is usually enough for it to fix a 400.

Two cases don't use an HTTP error at all. POST /v1/attest/verify answers 200 with {"valid": false} for a bad signature. Over MCP, failures come back as tool results with isError: true and the same message, and are never settled.

Rate limits are counted per Cloudflare location, so treat them as approximate. The limits page lists every size and time limit, and the payments page explains why errors are free.