Skip to main content
The Metal API uses conventional HTTP status codes to signal success or failure. Codes in the 2xx range indicate success, 4xx indicate a problem with the request, and 5xx indicate a server-side error.

Response format

Successful responses wrap their payload in a data field:
Errors return a JSON body with an error message:
Some validation errors return additional detail describing the offending field. Endpoints that also check your role return a different body with code, message, and details fields. See Admin-only endpoints.

Status codes

Handling errors

Always check the status code before reading the body. Treat 429 and 5xx as retryable with exponential backoff; treat 4xx (other than 429) as a problem to fix in your request.
When contacting support@metal.ai about an error, include the request method, path, status code, and the full error body. This is the fastest way to get a resolution.