Skip to main content

Error Response Format

{
  "success": false,
  "message": "Error description"
}
Chat API errors (OpenAI-compatible):
{
  "error": {
    "message": "Error description",
    "type": "error_type",
    "code": "error_code"
  }
}

HTTP Status Codes

CodeMeaningDescription
200OKSuccess
400Bad RequestInvalid format, missing required fields
401UnauthorizedMissing, invalid, or expired API key
402Payment RequiredInsufficient credits
403ForbiddenOpen API disabled, insufficient scope
404Not FoundModel not found
409ConflictDuplicate resource
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error
502Bad GatewayRAG service unavailable

Common Errors

Authentication (401)

{"success": false, "message": "Invalid or expired API key"}
Resolution: Verify your API key is valid, not expired, and not revoked.

Permission (403)

{"success": false, "message": "Open API is not enabled for this tenant"}
Resolution: Contact your system administrator to enable Open API.

Credits (402)

{"error": {"message": "Insufficient credits.", "type": "insufficient_credits", "code": "payment_required"}}
Resolution: Contact your administrator to add credits.

Troubleshooting

  1. Check key status on the Open API page (active/expired/revoked)
  2. Verify Open API is enabled for your tenant
  3. Ensure Authorization: Bearer format is correct (space after Bearer)
  1. Verify an Open API type model exists for your tenant
  2. Check model name (case-sensitive)
  3. Confirm the model is active
  1. Include "stream": true in the request body
  2. Ensure your client supports SSE parsing
  3. Try adding Accept: text/event-stream header