Every apitree error response carries two extra fields designed for AI Agents: recovery_action tells the agent what to do next, and docs_url points to a deep link in this documentation.
{
"error": "RATE_LIMIT_EXCEEDED",
"http_status": 429,
"message": "Rate limit exceeded: 60 requests per 1m on trial plan.",
"request_id": "req_abc123",
"recovery_action": "Back off for ~42s and retry (honor the Retry-After header).",
"docs_url": "https://apitree.ai/docs/errors#rate-limit"
}UNAUTHORIZED, FORBIDDEN, NOT_FOUNDINVALID_BATCH, BATCH_TOO_LARGERATE_LIMIT_EXCEEDED, PAYLOAD_TOO_LARGECIRCUIT_OPEN, PROVIDER_TIMEOUTINSUFFICIENT_CREDITS, CALL_FAILED