NeuronLens
Browse the documentation
API reference

Errors

Every error the API returns, its shape, and what to do.


{
  "error": "service_unavailable",
  "detail": "Agent Lens is temporarily offline. This run was not counted; please try again in a few minutes.",
  "request_id": "req_3f1c0a9b2e7d",
  "service": "agent-lens"
}
  • error: a stable code to branch on.
  • detail: a sentence for people; it may change.
  • Agent Lens never returns a partial allow. If a read does not complete, the call fails, and your code applies its fail mode.
StatuserrorMeaningWhat to do
401missing_keyno key sentsend Authorization: Bearer or X-API-Key
401invalid_keyunknown, disabled or expired keycheck the key at Profile → API keys
404unknown_product / unknown_endpointwrong pathsee Authentication for the paths
422bad_requestinvalid body (detail names the field), e.g. Agent Lens without an answer or a tool_callfix the request
429rate_limitedmore than 10 requests a minutewait Retry-After seconds
429daily_limittoday's 10 runs for this product are usedwait for resets_at (00:00 UTC), or ask for more
503busyAgent Lens: the GPU queue is fullretry in a few seconds
503scoring_unavailableAgent Lens: the read did not completeretry, or apply your fail mode
503service_unavailablethe product is offline, or the Integrity scanner is waking upretry in a minute
504timeoutthe run took too longretry; for Integrity, a first scan of a large model can take minutes

Retrying

Retry 429 rate_limited after Retry-After, and 503 / 504 with a growing delay (for example 5 s, 15 s, 60 s). Do not retry 4xx otherwise: the same request gets the same answer.