Error Codes

Complete reference of 33 error codes across 10 categories returned by the AIBrain Service.

Error response formatjson
{
  "error": {
    "code": "AIBRAIN_1000",
    "message": "Prompt is empty, exceeds token limit, or contains forbidden content",
    "http": 400
  }
}

OrchestrationAIBRAIN_1000-1099

CodeHTTPNameDescriptionResolution
AIBRAIN_1000400INVALID_PROMPTPrompt is empty, exceeds token limit, or contains forbidden contentCheck prompt length and content against model limits
AIBRAIN_1001400INVALID_MODEOrchestration mode not recognized (must be single or zar)Use mode: "single" or mode: "zar"
AIBRAIN_1002502PROVIDER_ERRORUpstream LLM provider returned an error during orchestrationRetry; the provider may be temporarily unavailable
AIBRAIN_1003504ORCHESTRATION_TIMEOUTAI orchestration timed out before completionReduce maxTokens or prompt complexity, then retry
AIBRAIN_1004400CONTEXT_TOO_LARGEContext string exceeds maximum allowed lengthTrim context to under 10,000 characters

ZAR EnsembleAIBRAIN_1100-1199

CodeHTTPNameDescriptionResolution
AIBRAIN_1100422CONSENSUS_FAILEDZAR ensemble failed to reach consensus across 3 modelsRetry or fall back to single mode
AIBRAIN_1101403ZAR_TIER_REQUIREDZAR ensemble requires Pro tier or higherUpgrade subscription to Pro or Enterprise
AIBRAIN_1102402ZAR_INSUFFICIENT_CREDITSZAR requires 60 credits but wallet balance is insufficientPurchase additional credits or use single mode (5-25 credits)

ConversationsAIBRAIN_1200-1299

CodeHTTPNameDescriptionResolution
AIBRAIN_1200404CONVERSATION_NOT_FOUNDConversation ID does not exist or belongs to a different tenantVerify conversation ID and tenant context
AIBRAIN_1201409CONVERSATION_LOCKEDConversation is locked or archivedCreate a new conversation or unlock the existing one
AIBRAIN_1202400MAX_TURNS_EXCEEDEDConversation has reached maximum turn limitStart a new conversation

VoiceAIBRAIN_1300-1399

CodeHTTPNameDescriptionResolution
AIBRAIN_1300400INVALID_AUDIO_URLAudio URL is invalid or not accessibleProvide a valid, publicly accessible audio URL
AIBRAIN_1301400UNSUPPORTED_AUDIO_FORMATAudio format not supported (must be m4a, mp3, wav, ogg, or webm)Convert audio to a supported format
AIBRAIN_1302502STT_ERRORSpeech-to-text service (studio-svc) returned an errorRetry; studio-svc may be temporarily unavailable
AIBRAIN_1303502TTS_ERRORText-to-speech service returned an errorRetry or set ttsResponse: false to skip TTS

Social AIAIBRAIN_1400-1499

CodeHTTPNameDescriptionResolution
AIBRAIN_1400404USER_NOT_FOUNDUser ID not found for social AI operationVerify the user ID exists in user-svc
AIBRAIN_1401400INVALID_CONTENT_LISTContent list for ranking is empty or malformedProvide at least one content item with required fields

Fraud DetectionAIBRAIN_1500-1599

CodeHTTPNameDescriptionResolution
AIBRAIN_1500400INVALID_FRAUD_INPUTFraud detection input data is missing required fieldsInclude all required fields: userId, action, metadata
AIBRAIN_1501502FRAUD_MODEL_ERRORFraud detection model returned an errorRetry; the ML model may be loading

AdminAIBRAIN_1600-1699

CodeHTTPNameDescriptionResolution
AIBRAIN_1600403ADMIN_REQUIREDAdmin role required for this operationUse an account with admin role
AIBRAIN_1601404MODEL_CONFIG_NOT_FOUNDModel configuration not foundUse GET /admin/models to list available configurations
AIBRAIN_1602404TENANT_CONFIG_NOT_FOUNDTenant-specific configuration not foundCreate tenant config via PUT /admin/tenant-config

Quota & CreditsAIBRAIN_1700-1799

CodeHTTPNameDescriptionResolution
AIBRAIN_1700429RATE_LIMIT_EXCEEDEDRate limit exceeded for this tenant or userImplement exponential backoff; check Retry-After header
AIBRAIN_1701402INSUFFICIENT_CREDITSInsufficient AI credits in walletPurchase additional credits or upgrade subscription tier
AIBRAIN_1702402BUDGET_EXCEEDEDRequest cost exceeds x-budget-max-usd header limitIncrease budget header or reduce request complexity
AIBRAIN_1703429QUOTA_EXCEEDEDMonthly quota exceeded for this subscription tierUpgrade subscription tier or wait for quota reset

AuthenticationAIBRAIN_1800-1899

CodeHTTPNameDescriptionResolution
AIBRAIN_1800401UNAUTHORIZEDAuthentication requiredProvide a valid JWT token in Authorization header
AIBRAIN_1801403FORBIDDENInsufficient permissions for this operationRequest required role from admin
AIBRAIN_1802401INVALID_TOKENInvalid or expired authentication tokenObtain a fresh JWT token via auth-svc

GeneralAIBRAIN_1900-1999

CodeHTTPNameDescriptionResolution
AIBRAIN_1900500INTERNAL_SERVER_ERRORInternal server errorRetry; if persistent, contact support with request_id
AIBRAIN_1901503SERVICE_UNAVAILABLEService temporarily unavailableRetry with exponential backoff
AIBRAIN_1902504TIMEOUTRequest timeoutReduce request complexity or retry
AIBRAIN_1903500DATABASE_ERRORDatabase operation failedRetry; Aurora Serverless may be scaling up