Errors and Troubleshooting
Common errors you may encounter while using the Birk API, what error codes mean, and how to resolve them.
01Error Format
When an error occurs, the API returns a standard JSON response. This lets you parse errors easily and reflect them meaningfully to the end user or your logging system.
{
"error": {
"code": "context_length_exceeded",
"message": "The text you sent exceeded the model's maximum token capacity.",
"param": "messages",
"type": "invalid_request_error"
}
}02Common HTTP Status Codes
Bad Request
The JSON you sent is invalid, includes missing parameters, or requests an unsupported model.
Unauthorized
Your API key is missing, malformed, or revoked by the system.
Too Many Requests
You reached the rate limit or token limits (RPM/TPM) assigned to your tier. Wait with exponential backoff and try again.
Internal Server Error
A temporary issue occurred on our side, on BriqMind servers. Our system engineers are notified automatically.
03AI-Specific Error Codes
In addition to the HTTP status codes above, these are specific error codes and fixes you may see in the error.code field of the API response:
context_length_exceeded
Reason: The total token count in the messages array (your text + expected response) exceeded the maximum capacity of the selected model, for example 128,000 tokens.
Solution: Shorten your text or move to a higher-capacity model, for example birk-agent-heavy-v1.
model_not_found
Reason: The requested model, for example birk-fast-v2, does not exist in the system or your API key is not authorized to access it.
Solution: Check the model name, for example birk-fast-v1, or verify your permissions from the panel.
content_policy_violation
Reason: Your prompt contains content that violates BriqMind safety and content policies, such as violence, hate speech, or harmful code generation. The model refused to process the request.
Solution: Revise the request so it complies with our policies. Repeated violations may restrict your account.