REST API
Errors
Error format and status codes
Error Format
All errors return a JSON object:
{ "detail": "Error message describing what went wrong" }Status Codes
| Code | Meaning | What to do |
|---|---|---|
400 | Invalid input | Check your request body matches the expected schema |
401 | Missing or invalid API key | Verify your Authorization: Bearer header |
402 | Quota exceeded | Wait for daily reset (check Retry-After header) or upgrade your plan |
403 | Insufficient permissions | Your API key lacks the required scope for this endpoint |
404 | Not found | Check the endpoint URL or resource ID |
429 | Rate limited | Wait and retry (check Retry-After header) |
500 | Server error | Retry the request; if persistent, check the health endpoint |
Example Error Responses
Invalid input (400):
curl -X POST http://localhost:8000/api/v1/services/config_get \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{}'{ "detail": [{ "msg": "Field required", "type": "missing", "loc": ["body", "key"] }] }Missing authentication (401):
curl http://localhost:8000/api/v1/auth/me{ "detail": "Not authenticated" }Insufficient scope (403):
{ "detail": "Insufficient permissions for this operation." }Quota exceeded (402):
{ "detail": "Daily request limit exceeded (100/100). Resets in 14h 23m." }