Errors

One error shape for every endpoint. It says whether you were charged and whether to retry.

codeHTTPChargedRetryMeaningWhat to do
unauthorized401noafter a fixThe key is missing, malformed or revoked.Send Authorization: Bearer <key> with a live key.
invalid_params400noafter a fixA parameter is missing, has the wrong type, or an Idempotency-Key was reused for a different request.Read message, fix the request, send it again.
unknown_endpoint404nonoNo endpoint lives at that path.Check the id against the catalog; the path is the id with dots turned into slashes under /v1.
insufficient_balance402noafter a fixThe balance cannot cover the most this call could cost.Top up, then retry.
not_found404nonoThe post, account or page does not exist or is not public.Final answer; retrying will not change it.
rate_limited429noyesToo many requests from this key right now.Wait retry_after_seconds, then send the same request.
upstream_busy503noyesEvery data source for this endpoint is saturated.Retry with backoff.
upstream_failed502noyesEvery data source for this endpoint failed on this request.Retry with backoff; check the status page if it persists.
timeout504unknown until looked upwith the same Idempotency-KeyNo answer in time. Whether it was charged is not known yet.Look it up at /v1/calls/{request_id}, or resend with the same Idempotency-Key so it cannot be charged twice.

Retrying safely

Send an Idempotency-Key with every call. The same key with the same request within 24 hours returns the stored result with meta.replayed: true and no new charge, so a retry after a timeout can never bill you twice. The same key with a different request is invalid_params.