Skip to content
Keenpix docs
API reference

Parameters

Every query parameter the transform endpoint accepts.

All transform parameters are optional; out-of-range values are clamped, not rejected.

ParamTypeRange / valuesDefaultDescription
projectstringrequiredProject id (allowlist gates access)
urlURLabsolute http/https URLSource image URL when not using the /img/<source-url> path form
w / hint1–5000bounded originalTarget width/height (px)
resize / sstringWIDTHxHEIGHT, WIDTH, xHEIGHTCompact size alias; explicit w/h win
qint30–100project defaultOutput quality
fmtenumauto avif webp jpeg png gif heif tiff svgautoOutput format (auto negotiates AVIF/WebP/JPEG)
fitenumcover contain fill inside outsidecoverHow to fit the w×h box
position / pos / gravityenumedges, corners, compass gravities, entropy, attentioncentreCrop anchor for cover/contain
dprint1–31Device pixel ratio (multiplies w/h)
enlargebool1 true yes onfalseAllow upscaling past source dimensions
kernelenumnearest linear cubic mitchell lanczos2 lanczos3 mks2013 mks2021lanczos3Resize kernel
background / bgcolorSharp color stringFill color for contain, flatten, extend, and arbitrary rotate
flattenbool1 true yes onfalseMerge alpha onto background
extract / cropstringleft,top,width,heightCrop an exact source rectangle before resize
trimbool/inttrue or 0–255falseTrim matching edges; number is threshold
extendstringall, y,x, top,right,bottom,leftAdd output padding after resize
extendWithenumbackground copy repeat mirrorbackgroundFill mode for extend
rotate / rfloat-360–360Rotate by degrees after EXIF auto-orient
flip / flopbool1 true yes onfalseVertical / horizontal mirror
blurint0–10000Gaussian blur sigma
sharpenbool/floattrue or 0.000001–10falseApply mild or sigma-based sharpening
medianint1–25Median filter size
gamma / gammaOutfloat1–3Gamma correction
negatebool1 true yes onfalseInvert colors
normalize / normalisebool1 true yes onfalseContrast normalization
thresholdint0–255Convert to black/white threshold
brightness / saturationfloat0–10Modulate brightness/saturation
hueint-360–360Hue rotation
lightnessfloat-100–100Lightness adjustment
tintcolorSharp color stringApply a tint
grayscale / greyscalebool1 true yes onfalseConvert to grayscale
animated / abool1 true yes onfalsePreserve animated GIF/WebP frames when output supports it

Notes

  • No upscaling by default. Keenpix never enlarges past the source resolution unless enlarge=1 is set.
  • Source URL. Put the absolute source URL after /img/, for example /img/https://cdn.example.com/hero.jpg?project=ID&w=1200, or send it as /img/?url=https%3A%2F%2Fcdn.example.com%2Fhero.jpg&project=ID&w=1200.
  • dpr multiplies the target dimensions — w=400&dpr=2 renders at 800px.
  • fmt=auto depends on the project's Auto-format setting; when off, auto serves JPEG. Omitting fmt is treated as auto. It is raster negotiation only: SVG origins are rasterized and returned as AVIF, WebP, or JPEG rather than preserved as SVG. An explicit fmt is always honoured and disables browser negotiation for that request. Use explicit fmt values when your CDN cannot cache separate variants by Accept.
  • Framework format props. Image frameworks often map format="avif" or format="webp" directly to fmt=avif or fmt=webp. Leave those props unset when you want Keenpix to return AVIF or WebP based on browser support.
  • fmt=svg is explicit only. It returns image/svg+xml only for SVG origins, optimizes them through SVGO, and strips active content. Raster transform modifiers do not apply to SVG output.
  • q defaults to the project's Default quality (Settings → Pipeline).

On this page