The Archetype AI APIs use conventional HTTP response codes to indicate success or failure, and return a structured JSON body for every error. This page describes the response shape, how to map HTTP status codes to outcomes, and patterns for retrying transient errors. For the canonical list of errorDocumentation Index
Fetch the complete documentation index at: https://docs.archetypeai.app/llms.txt
Use this file to discover all available pages before exploring further.
code values, see Error Codes.
Error response format
Most endpoints (Files, Batch Processing, Query, and the data-plane services) return errors in a pluralerrors array envelope:
Machine-readable error code for programmatic handling. See Error Codes for the canonical list. Codes are typically lowercase snake_case (e.g.
invalid_file_type, upload_not_found), though a few legacy endpoints emit uppercase (e.g. NOT_FOUND).Human-readable description of what went wrong.
Optional hint for how to resolve or mitigate the error.
Per-error UUID prefixed with
err-. Include this when reporting issues to support — it lets the platform team find the corresponding server logs.errors[0] exclusively.
Legacy envelope. A handful of older endpoints (notably some authentication failures) still return the FastAPI-style envelope
{"detail": "<message>"} with no errors array, error_uid, or suggestion. Treat any 4xx/5xx response with neither errors nor detail as an unknown shape and log the raw body.HTTP Status Codes
2xx Success
2xx Success
4xx Client Errors
4xx Client Errors
Invalid request parameters or malformed request body
Missing or invalid API key
Valid credentials but insufficient permissions
Requested resource does not exist
Request conflicts with current state (e.g. cancelling a job that already completed, completing an upload that’s already completed)
Request body exceeds size limits. For
POST /v0.5/files this is 512 MB; for larger uploads use the multipart presigned flow (up to 250 GB).Rate limit exceeded
Server temporarily at capacity — safe to retry with backoff
Error codes
The canonical list of error codes lives on Error Codes. Each entry there describes the code, the meaning, and which API surface (Files, Lens, Batch, etc.) emits it. Common patterns you’ll see in practice:invalid_*— request validation failed (invalid_file_type,invalid_upload_parts,invalid_request). Themessageandsuggestiontogether tell you which field is wrong.*_not_found— the resource doesn’t exist or has been deleted (upload_not_found,file_not_found,NOT_FOUNDfor some legacy batch endpoints). Verify the id and that the resource hasn’t been cleaned up.*_already_completed/ state conflicts — a 409 telling you the target is already in a terminal state. Often safe to treat as success in idempotent client code (e.g. cancelling an already-cancelled job).unauthorized_request— bad or missing bearer token. Verify theAuthorization: Bearer <key>header.capacity_reached,server_at_capacity— backpressure from the server. Retry with exponential backoff.
Retry Strategies
Retry transient failures (429, 500, 502, 503, 504) with exponential backoff plus jitter. Don’t retry other 4xx responses — they indicate a client-side problem (bad request, missing resource, conflict) that won’t change by waiting.
Rate limiting today is scoped to the login endpoint and returns the legacy
{"detail": "Too many login attempts. Please try again in N minutes."} envelope without a Retry-After header. Other Newton endpoints do not currently rate-limit at the API surface, so 429s on those paths are not expected.Error logging
When you log API errors, capture the status code, the primaryerror_uid, and the request URL — error_uid is the field that lets the platform team correlate your report to server logs.
- Iterate the full
errorsarray, not justerrors[0]— multi-error responses do occur. - Log the raw response body when JSON parsing fails (gateway / proxy errors can return HTML).
- Include the request method and URL so a single log line is enough context to reproduce.
Getting help
Check API Status
View current system status and incidents
Contact Support
Get help from our technical support team at [email protected]
- The
error_uidfrom the response body - The HTTP status code and the full
errorsarray - The request URL, method, and (sanitized) headers
- Timestamp of the failed request
- Your organization ID
- Minimal steps to reproduce