AI agent instructions
AI agent instructions
HTTP status codes
Error response format
Most errors raised by the API share this envelope.detail, error, and message carry the same text:
X-Error-Class header naming the error type, for example NotteApiInvalidApiKeyError or NotteApiRateLimitExceededError. Use the status code and this header rather than parsing the message text.
Common errors
Authentication (401)
HeaderX-Error-Class: NotteApiInvalidApiKeyError:
Access tokens (401, 403)
Requests made with an access token can fail with one of these classes, in the standard envelope:
Header
X-Error-Class: NotteApiAccessTokenNotAllowedError:
401, mint a new token. On a 403, the route needs an API key.
Validation (422)
Request validation errors use a different envelope, with the individual errors summarized inmessage:
Cluster overloaded (529)
Returned when no browser is available to start a session. Wait for the number of seconds in theRetry-After header, then retry.
Execution errors
Returned with status500 when an operation fails. Includes the X-Error-Class: NotteApiExecutionError header and the standard envelope.