All errors return a JSON body following the OpenAI error schema:
{
"error": {
"message": "Insufficient credit balance",
"type": "insufficient_funds",
"code": "balance_exceeded"
}
}
| Status | Meaning | What to do |
|---|---|---|
400 | Bad request | Check your request body for malformed JSON or missing fields. |
401 | Unauthorized | Verify your API key is correct and starts with tr-. |
402 | Insufficient balance | Add credits or enable auto-recharge in your API Dashboard. |
404 | Model not found | Check the model ID against available models. |
429 | Rate limited | Wait for Retry-After seconds before retrying. |
500 | Internal server error | Retry after a brief delay. Contact support if persistent. |
502 | Provider error | Retry — the router will try an alternative provider if available. |