Skip to main content
When a Specter API request fails, the response uses a standard HTTP status and a JSON body containing a machine-readable error code. Use the code, not the message text, to decide how to handle the failure.

Error format

Error codes

Retrying requests

1

Check the status code

Only retry 429, 503, and 504 responses. Other errors need a change to the request or key.
2

Honor Retry-After

When the response includes a Retry-After header, wait at least that many seconds before trying again.
3

Back off exponentially

If there is no Retry-After header, wait progressively longer between attempts and cap the total number of retries.
Successful responses from GET /api/v1/platform-health include an X-Request-Id header. Log it so you can reference specific requests when you contact support.