Skip to content

Error Handling

Every error includes context for agents to self-correct:

{
"error": {
"code": "validation_error",
"message": "missing required field: model"
},
"help": {
"api_guide": "GET /api/v1/agent/capabilities",
"graphql": "POST /api/v1/graphql",
"auth": "Use X-API-Key header or Authorization: Bearer"
}
}
CodeMeaning
200Success
201Created
204Deleted (no content)
400Bad request
401Unauthorized — check your API key
403Forbidden — insufficient permissions
404Not found — check the endpoint path
422Validation error — check request body format
429Rate limited — too many requests
500Internal error — contact support
502Bad gateway — upstream service unavailable