Carrot LabsCarrot Docs

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

TypeCodeDescription
authentication_error401Missing or invalid API key
invalid_request400Malformed request body or invalid parameters
model_not_found404Model not registered for your account
upstream_error502Inference provider temporarily unavailable
internal_error500Unexpected 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

  1. Check the exact model name in the Models page
  2. Model names are case-sensitive
  3. The model field 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 traces array
  • Too many traces (max 100 per request)
  • Invalid UUID format in id field
  • Invalid ISO 8601 format in timestamps

On this page