Errors
Error codes and troubleshooting.
Error format
Inference endpoints
{
"error": {
"message": "missing or invalid Authorization header",
"type": "authentication_error",
"code": 401
}
}Trace ingestion
{
"error": "traces must not be empty"
}Error types
| Type | Code | Description |
|---|---|---|
authentication_error | 401 | Missing or invalid API key |
invalid_request | 400 | Malformed request body or invalid parameters |
model_not_found | 404 | Model not registered for your account |
upstream_error | 502 | Inference provider temporarily unavailable |
internal_error | 500 | Unexpected server error |
Troubleshooting
401 — Authentication error
Ensure you're passing a valid sk- prefixed key:
client = OpenAI(
base_url="https://api.carrotlabs.ai/v1",
api_key="sk-...",
)404 — Model not found
- Check the exact model name in the Models page
- Model names are case-sensitive
- The
modelfield must use your Carrot model name
502 — Upstream error
The inference provider is temporarily unavailable. Retry after a brief delay.
400 — Trace validation
Common causes:
- Empty
tracesarray - Too many traces (max 100 per request)
- Invalid UUID format in
idfield - Invalid ISO 8601 format in timestamps