Skip to content
Keenpix docs
API reference

Responses & errors

Headers and status codes you can expect.

Success headers

HeaderValue
Content-Typeimage/avif · image/webp · image/jpeg · image/png · image/svg+xml
Cache-Controlpublic, max-age=31536000, immutable
Accept-CHSec-CH-DPR, Sec-CH-Width, Sec-CH-Viewport-Width
VaryAccept plus current and legacy image Client Hint headers
Content-DPRResolved DPR when dpr=auto (legacy client compatibility)

Status codes

StatusMeaning
200Optimized image returned
400Missing project or source URL
402Cloud only: the project's workspace has no active plan
403Source host is not on the allowlist, resolves to a private/SSRF target, or the project requires signed URLs and sig is missing/invalid
404Unknown project
413Origin image exceeds the size cap (KEENPIX_MAX_ORIGIN_BYTES)
502Origin fetch failed
503A proxy admission limit or an unhealthy service dependency refused the request; inspect Retry-After and private readiness checks
504Origin request timed out (KEENPIX_ORIGIN_TIMEOUT_MS)

A 403 almost always means the source host isn't on the project's allowlist — add it under Settings → Security → Allowed hosts. If the project requires signed URLs, a 403 also fires for a missing or invalid sig parameter.

On this page