Skip to main content

Errors

RAG API error responses, HTTP status codes, business error codes, and retry strategy.

Every error response uses the same structure:
{
  "error": {
    "code": "INVALID_PARAMETER",
    "message": "field knowledge_base_id cannot be empty",
    "param": "knowledge_base_id"
  },
  "request_id": "req_xxx"
}

HTTP status codes

StatusMeaningWhat to do
400Invalid request parameterVerify the parameter
401Authentication failedCheck your API key
403ForbiddenRequest the appropriate permission scope
404Resource not foundVerify the ID
409Resource conflictUsually a duplicate name
413Request body too largeSplit the request
429Rate limitedBack off and retry
500Internal server errorRetry; contact support if it persists
503Service unavailableBack off and retry

Business error codes

codeHTTPMeaning
INVALID_PARAMETER400Parameter missing or malformed
UNAUTHORIZED401API key missing or invalid
FORBIDDEN403No permission for this operation
KB_NOT_FOUND404Knowledge Base not found
DOCUMENT_NOT_FOUND404Document not found
DATA_SOURCE_NOT_FOUND404Data source not found
KB_NAME_CONFLICT409Knowledge Base name already exists
QUOTA_EXCEEDED429Tenant quota exceeded
RATE_LIMITED429Endpoint rate limit hit
EMBEDDING_FAILED500Embedding service error
RETRIEVAL_TIMEOUT504Retrieval timed out — lower top_k or use a smaller Rerank model
SYNC_SOURCE_UNREACHABLE502Data source connection failed

Retry strategy

Error typeRetry?Interval
4xx (except rate limits)No—
429 rate limitedYesHonor the Retry-After header, or back off 1s / 2s / 4s
5xxYes1s / 2s / 4s, up to 3 retries
504 timeoutYesRetry immediately, up to 2 times

Troubleshooting

Every response includes a request_id. Include it when contacting support — it pinpoints the request in our logs.
Browse the endpoint reference, starting with List Knowledge Bases.
Managed Agent API
Flow Agent API
Sandbox API
RAG API
Long-term Memory
ParseX API
Security API
Framework Integration