Error Code Reference
All error responses share a consistent JSON envelope. Every error includes a machine-readable code so you can handle each failure case precisely, independent of HTTP status.
Error envelope
Standard (JSON) error envelope:
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable description"
}
}Streaming errors arrive as SSE events:
data: {"type": "error", "code": "ERROR_CODE", "message": "..."}Authentication errors
MISSING_API_KEY401AuthNot retryableWhy it happens
Resolution
X-Api-Key: sk-so-xxxxxxxxxxxxxxxxINVALID_API_KEY401AuthNot retryableWhy it happens
Resolution
.env or secrets store. Log in to the dashboard and verify your API key under Settings → API Key. Generate a new key if the old one was rotated or revoked.Plan & quota errors
QUOTA_EXCEEDED429QuotaNot retryableused, limit, upgrade_urlWhy it happens
Resolution
upgrade_url.RATE_LIMIT_EXCEEDED429Rate LimitRetryableretry_afterWhy it happens
rate_limit_rpm). Both /v1/chat and /v1/chat/stream share the same per-agent counter. Starter plans default to 30 req/min, Pro plans to 50 req/min.Resolution
X-RateLimit-Reset response header. Reduce request concurrency and cache responses where possible. See Rate Limits for full detail.SUBSCRIPTION_CANCELED403PlanNot retryableWhy it happens
Resolution
PLAN_RESTRICTED403PlanNot retryableupgrade_urlWhy it happens
Resolution
upgrade_url, or use the non-streaming /v1/chat endpoint which is available on all plans.Request validation errors
MISSING_AGENT_ID400ValidationNot retryableWhy it happens
X-Agent-Id request header.Resolution
Pass the agent UUID in the request header:
X-Agent-Id: 736c5015-f67e-4fe5-9932-590d9048b014MISSING_MESSAGE400ValidationNot retryableWhy it happens
message field in the request body was empty or missing.Resolution
{ "message": "Your question here" }VALIDATION_ERROR422ValidationNot retryabledetails (array of field-level errors)Why it happens
Content-Type, wrong field types (e.g. a number where a string is expected), or a completely empty body when fields are required.Resolution
details array in the error response — it lists each invalid field and the reason. Ensure you are sending Content-Type: application/json.Agent errors
AGENT_NOT_FOUND404AgentNot retryableWhy it happens
Resolution
AGENT_INACTIVE403AgentNot retryableWhy it happens
is_active = false). An is_active check is always performed against the database on every request — even if the agent config is otherwise cached.Resolution
LLM provider errors
These errors originate from the underlying AI provider (Anthropic, OpenAI, Gemini, Groq) configured on the agent, not from the SentientOne platform itself.
LLM_AUTH_ERROR502LLM ProviderNot retryableWhy it happens
Resolution
LLM_RATE_LIMITED429LLM ProviderRetryableWhy it happens
Resolution
LLM_UNAVAILABLE503LLM ProviderRetryableWhy it happens
Resolution
LLM_ERROR502LLM ProviderMaybe retryableWhy it happens
Resolution
conversation_id so the underlying provider error can be investigated.Server errors
INTERNAL_ERROR500ServerRetryableWhy it happens
Resolution
conversation_id from a previous successful response, the full request payload, and the timestamp of the failing request.Quick reference
| Code | HTTP | Category | Retryable |
|---|---|---|---|
MISSING_API_KEY | 401 | Auth | No— Fix the request |
INVALID_API_KEY | 401 | Auth | No— Fix the key |
QUOTA_EXCEEDED | 429 | Quota | No— Upgrade or wait for reset |
RATE_LIMIT_EXCEEDED | 429 | Rate Limit | Yes— Back off and retry |
SUBSCRIPTION_CANCELED | 403 | Plan | No— Reactivate subscription |
PLAN_RESTRICTED | 403 | Plan | No— Upgrade plan |
MISSING_AGENT_ID | 400 | Validation | No— Fix the request |
MISSING_MESSAGE | 400 | Validation | No— Fix the request |
VALIDATION_ERROR | 422 | Validation | No— Fix the request |
AGENT_NOT_FOUND | 404 | Agent | No— Verify agent ID |
AGENT_INACTIVE | 403 | Agent | No— Re-enable agent |
LLM_AUTH_ERROR | 502 | LLM Provider | No— Fix provider key |
LLM_RATE_LIMITED | 429 | LLM Provider | Yes— Retry with backoff |
LLM_UNAVAILABLE | 503 | LLM Provider | Yes— Retry with backoff |
LLM_ERROR | 502 | LLM Provider | Maybe— Contact support |
INTERNAL_ERROR | 500 | Server | Yes— Retry, then contact support |
Always read X-Trace-Id
X-Trace-Id header. Paste it into Tracing or a support ticket to find the full request timeline in seconds.