Errors
All errors share one JSON shape:
{ "message": "human readable message", "code": "MACHINE_CODE", "detail": "optional detail" }
Common codes
| HTTP | Code | Meaning | Fix |
|---|---|---|---|
| 400 | (varies) | Business failure | Handle by the code field (extraction codes below) — these calls are not charged |
| 401 | INVALID_API_KEY | Missing, malformed or deleted key | Check the Authorization: Bearer sk_snapany_xxx header and the key status in Console → API Keys |
| 402 | INSUFFICIENT_CREDITS | Balance too low | Top up in the Console, or enable auto top-up |
| 404 | — | Resource not found (e.g. an invalid job id) | Check the resource id returned by the API |
| 422 | — | Invalid request parameters | The detail field says which parameter failed and why |
| 429 | RATE_LIMITED | Over 1200 requests/min | Back off and retry after a delay |
| 500 | — | Server error | Retry later; contact us if it persists |
Extraction error codes
Extraction failures return HTTP 400 with a code from the extraction engine. These are business failures — no credits are charged.
| Code | Common cause | What to do |
|---|---|---|
InvalidURL | Not a supported post URL | Check that the URL is a direct link to a post |
ContentDeleted | The post has been removed by its platform | Nothing to extract |
PrivateContent | Login-gated or private content | Not extractable |
ExtractFailed | Platform changes or a temporary upstream error | Retry later; if it keeps failing for one site, contact us |
Transcription failures
A failed job shows "status": "failed" with an error field when polling, and the reserved credits are refunded automatically.