code, a human-readable message, and a trace_id for debugging.
Error Response Format
| Field | Type | Description |
|---|---|---|
code | string | Machine-readable error code (e.g., unauthorized, forbidden, not_found) |
message | string | Human-readable description of the error |
trace_id | string | Unique identifier for this request — include this when contacting support |
HTTP Status Codes
Success
| Status | Description |
|---|---|
200 OK | Request succeeded. Response body contains the data. |
Client Errors
| Status | Code | Description |
|---|---|---|
400 Bad Request | bad_request | The request is malformed or has invalid parameters |
401 Unauthorized | unauthorized | Missing or invalid API key |
403 Forbidden | forbidden | Valid API key but insufficient scope for this endpoint |
404 Not Found | not_found | The requested resource doesn’t exist or isn’t accessible to your organization |
Server Errors
| Status | Code | Description |
|---|---|---|
500 Internal Server Error | internal_error | Something went wrong on our side. Retry the request or contact support. |
Error Examples
401 — Invalid API Key
403 — Insufficient Scope
404 — Resource Not Found
Handling Errors in Code
Debugging
If you encounter an unexpected error:- Check the
trace_idin the error response - Verify your API key and Organization ID are correct
- Confirm your app has the required scopes for the endpoint
- Contact the Max AI team with the
trace_idfor further investigation
