Public agent API / v1

Errors and retries

Check the HTTP status first, then read the error body. Authentication and origin checks have their own response shapes.

Tool and request errors

{
  "success": false,
  "error": {
    "code": "RATE_LIMITED",
    "message": "Too many requests. Please try again later.",
    "retryAfter": 5
  }
}

This is an illustrative rate-limit response. retryAfter is optional and measured in seconds; when supplied for HTTP 429, the response also sets Retry-After. Exact messages can vary.

Public API errors and recovery
HTTPCode or messageNext step
400INVALID_ARGUMENTSCheck parameters and request fields.
401invalid_tokenAuthorize again using the WWW-Authenticate challenge.
403Invalid request originSend browser writes from an allowed origin.
404ASSET_NOT_FOUNDCheck the item ID and the signed-in account.
413PAGE_TOO_LARGE / DETAIL_TOO_LARGERequest fewer items or omit geometry.
429RATE_LIMITEDWait for Retry-After before retrying.
500INTERNAL_ERROR / UNKNOWN_OPERATIONAn unexpected server failure occurred.
502PROJECT_READ_FAILED / ASSET_READ_FAILED / PROJECT_CREATE_FAILED / BLOCK_CREATE_FAILEDThe backing operation failed. Check state before repeating a write.
503MCP_DISABLED / CATALOG_UNAVAILABLEThe agent surface or catalog is temporarily unavailable.

Authentication and origin errors

HTTP 401 uses the OAuth challenge body below, with a WWW-Authenticate header pointing to protected-resource metadata:

{"error":"invalid_token","error_description":"A valid OAuth access token is required."}

The cookie-write origin check returns HTTP 403 with:

{"error":"Invalid request origin"}

Unexpected errors handled by the outer API error handler may return an error object without success. Do not require the tool envelope to recognize a failed request.

Rate limits and safe retries

Backing operations enforce their own limits; v1 does not publish a single global requests-per-minute allowance. Honor Retry-After when present and back off between read retries.

Creating a project or block is not replay-safe. After a timeout or server error, check whether it was created before trying again. Repeating an Arazzo workflow can create duplicates.