API Error Codes & Troubleshooting Guide
Diagnose HTTP status responses, understand machine-readable error codes, and implement deterministic remediation workflows.
Direct Error Handling Specification
All RSFlowHub error responses adhere to a uniform JSON error contract containing a machine-readable error.code string, human-friendly error.message, and an optional error.details object with actionable context. Zero credits are deducted when requests fail schema validation (422), authentication (401), or server-side execution (500).
Standard Error Envelope Contract
Your client applications can rely on a consistent JSON structure across all endpoints whenever a non-200 HTTP code is received:
{
"success": false,
"request_id": "req_7f3a9c2d1e4b8a6f",
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Your account does not have enough credits to perform this request. Upgrade your plan.",
"details": {
"required_credits": 4
}
},
"meta": {
"version": "v1",
"timestamp": "2026-09-27T12:34:56+00:00"
}
}
Search Error Directory
Filter by HTTP status (e.g. 401), error type (e.g. rate_limit), or keywords.
API_KEY_MISSING
401 Unauthorized - API_KEY_MISSING
No API key was sent.
Sample JSON Response:
{
"success": false,
"request_id": "req_7f3a9c2d1e4b8a6f",
"error": {
"code": "API_KEY_MISSING",
"message": "No API key was provided in the Request Header or Body.",
"details": {}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-18T12:34:56+00:00"
}
}
INVALID_API_KEY
401 Unauthorized - INVALID_API_KEY
The API key is wrong or no longer valid.
Sample JSON Response:
{
"success": false,
"request_id": "req_7f3a9c2d1e4b8a6f",
"error": {
"code": "INVALID_API_KEY",
"message": "The provided key doesn't exist, is inactive, expired, or revoked.",
"details": {}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-18T12:34:56+00:00"
}
}
INSUFFICIENT_CREDITS
402 Payment Required - INSUFFICIENT_CREDITS
Your balance cannot cover this call.
Sample JSON Response:
{
"success": false,
"request_id": "req_7f3a9c2d1e4b8a6f",
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Your account does not have enough credits to perform this request. Upgrade your plan.",
"details": {}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-18T12:34:56+00:00"
}
}
SPENDING_LIMIT_REACHED
403 Forbidden - SPENDING_LIMIT_REACHED
This call would go over the monthly spending limit you set.
Sample JSON Response:
{
"success": false,
"request_id": "req_7f3a9c2d1e4b8a6f",
"error": {
"code": "SPENDING_LIMIT_REACHED",
"message": "Your monthly spending limit has been reached. Raise or remove the limit in your dashboard under Billing.",
"details": {}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-18T12:34:56+00:00"
}
}
INSUFFICIENT_SCOPE
403 Forbidden - INSUFFICIENT_SCOPE
This API key is not allowed to call this endpoint.
Sample JSON Response:
{
"success": false,
"request_id": "req_7f3a9c2d1e4b8a6f",
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "Your API key does not have permission for this endpoint.",
"details": {
"required_scope": "knowledge",
"key_scopes": [
"ai"
]
}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-18T12:34:56+00:00"
}
}
USER_INACTIVE
403 Forbidden - USER_INACTIVE
The account is suspended or inactive.
Sample JSON Response:
{
"success": false,
"request_id": "req_7f3a9c2d1e4b8a6f",
"error": {
"code": "USER_INACTIVE",
"message": "Your account has been suspended or marked inactive. Contact support.",
"details": {}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-18T12:34:56+00:00"
}
}
ENDPOINT_NOT_FOUND
404 Not Found - ENDPOINT_NOT_FOUND
The endpoint does not exist.
Sample JSON Response:
{
"success": false,
"request_id": "req_7f3a9c2d1e4b8a6f",
"error": {
"code": "ENDPOINT_NOT_FOUND",
"message": "The requested API endpoint does not exist.",
"details": {}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-18T12:34:56+00:00"
}
}
VALIDATION_ERROR
422 Unprocessable Content - VALIDATION_ERROR
The request body failed validation.
Sample JSON Response:
{
"success": false,
"request_id": "req_7f3a9c2d1e4b8a6f",
"error": {
"code": "VALIDATION_ERROR",
"message": "Request payload failed validation. Check error.details for field-specific errors.",
"details": {
"text": [
"The text field is required."
]
}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-18T12:34:56+00:00"
}
}
RATE_LIMIT_EXCEEDED
429 Too Many Requests - RATE_LIMIT_EXCEEDED
Too many requests in the current minute.
Sample JSON Response:
{
"success": false,
"request_id": "req_7f3a9c2d1e4b8a6f",
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests within a 1-minute window for your API key.",
"details": {
"retry_after_seconds": 12
}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-18T12:34:56+00:00"
}
}
INTERNAL_SERVER_ERROR
500 Internal Server Error - INTERNAL_SERVER_ERROR
Something went wrong on our side.
Sample JSON Response:
{
"success": false,
"request_id": "req_7f3a9c2d1e4b8a6f",
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "Unexpected server error. Safe to retry with exponential backoff.",
"details": {}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-18T12:34:56+00:00"
}
}
AI_PROVIDER_ERROR
502 Bad Gateway - AI_PROVIDER_ERROR
The AI model failed, including its backup.
Sample JSON Response:
{
"success": false,
"request_id": "req_7f3a9c2d1e4b8a6f",
"error": {
"code": "AI_PROVIDER_ERROR",
"message": "The AI model failed, including its backup.",
"details": {}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-18T12:34:56+00:00"
}
}
PROVIDER_UNAVAILABLE
503 Service Unavailable - PROVIDER_UNAVAILABLE
The AI provider is temporarily unavailable.
Sample JSON Response:
{
"success": false,
"request_id": "req_7f3a9c2d1e4b8a6f",
"error": {
"code": "PROVIDER_UNAVAILABLE",
"message": "The upstream AI provider is temporarily unavailable. Retry after a short delay.",
"details": {}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-18T12:34:56+00:00"
}
}