Skip to content
smallPict
Start Free

Standard Error Codes & Envelopes

Error response format, error codes, and HTTP status codes of the SmallPict API.

Every error response uses the same JSON structure with a machine-readable error code.


Error response format

JSON
{  "error": {    "code": "QUOTA_EXCEEDED",    "message": "Monthly image processing quota limit reached for your plan.",    "details": {      "current_bytes": 10737418240,      "quota_bytes": 10737418240,      "reset_at": "2026-09-01T00:00:00Z"    }  }}

Error codes

HTTP StatusErrorCode EnumException TypeDescription
400VALIDATION_FAILEDValidationErrorRequest payload failed schema validation or missing required fields.
400FILE_TOO_LARGEFileTooLargeErrorUploaded image exceeds single-file upload size limit for current plan tier.
400UNSUPPORTED_FORMATUnsupportedFormatErrorThe provided file is not a supported image format.
401UNAUTHORIZEDAuthenticationErrorMissing or invalid API key, timestamp, or HMAC-SHA256 signature.
401ERR_TIMESTAMP_DRIFTAuthenticationErrorClient timestamp drifted beyond the allowed ±300s window.
402QUOTA_EXCEEDEDQuotaExceededErrorMonthly account processing quota exhausted.
402OVERAGE_EXCEEDEDQuotaExceededErrorPlan overage buffer limit exceeded.
403FORBIDDENPermissionDeniedErrorThe API key is revoked or account is suspended.
403KEY_SCOPE_MISMATCHScopeMismatchErrorUsing a WordPress scoped key (sp_wp_...) on an SDK endpoint or vice versa.
404NOT_FOUNDNotFoundErrorThe requested resource or conversion job_id does not exist.
429RATE_LIMIT_EXCEEDEDRateLimitErrorToo many requests in a short duration. Follow the Retry-After header.
500INTERNAL_ERRORServerErrorAn unhandled error occurred on the server. Details are logged securely.
502CDN_UPSTREAM_ERRORCdnErrorSmallPict CDN cache purge or origin sync failure. Retry the request.

Error handling in the SDKs

The SDKs turn these errors into typed exceptions for each language and retry 429 and 5xx responses with exponential backoff and jitter.