FastPic

Errors

How FastPic returns errors and what to expect from each status.

All FastPic API endpoints use standard HTTP status codes. Successful requests return 2xx. Failed requests return 4xx or 5xx with a JSON body containing statusCode, message, and errorStatusCode (a machine-readable enum your code can switch on).

Error response format

Every error response follows the same envelope:

error response
{
"statusCode": 401,
"message": "Invalid API key",
"errorStatusCode": "unauthorized"
}

Error codes

FastPic uses these errorStatusCode values across the API:

CodeStatusDescription
unauthorized401Missing or invalid API key.
rate_limit_exceeded429Per-key rate limit hit.
storage_quota_exceeded402Plan storage quota would be exceeded.
validation_error422Request body or query parameter invalid.
invalid_image_content422File is not a valid image.
unsupported_media_type415File format not in JPEG/PNG/WebP/AVIF.
file_too_large413File exceeds 10 MB.
not_found_error404Resource not found or not owned by this key.