Overview
Every error response from the API is an RFC 9457 problem document, served withContent-Type: application/problem+json.
Branch your error handling on
code, not on detail or title. code is
a stable public contract — new codes may be added, but existing ones are never
renamed or repurposed. detail is human-facing prose and can change at any
time.Fields
Field-level violations
Each entry inerrors describes one offending field:
pointer is set for body fields and parameter for query/header parameters —
an entry carries whichever one applies.Error codes
Legacy fields
Problem documents also carry three deprecated keys for backwards compatibility with integrations written before RFC 9457 responses were introduced:Handling errors
Retrying safely
Retrying safely
429 and 500 are safe to retry. On 429, wait retryAfter seconds; for
500, back off exponentially. Send an
Idempotency-Key on write endpoints so a retry
cannot apply the same change twice.Do not retry
Do not retry
400, 401, 403, 404, and 422 describe a problem with the request
itself. Retrying without changing anything returns the same error.Reporting a problem
Reporting a problem
Include the
requestId and code when contacting
support@file.ai — requestId correlates your call
to our server-side logs.