Build transform URL
transform_imageGenerate a CDN transform URL for PixelVault images to apply resize, crop, AI background removal, format/quality, and effects like blur, sharpen, rotate, flip, brightness/contrast/saturation, or watermark tiling.
Instructions
Build an on-the-fly transform URL for a PixelVault image (resize, crop, format/quality, AI background removal, blur/sharpen/rotate/flip, brightness/contrast/saturation, and same-project watermark tiling). Provide exactly one of url (a PixelVault CDN URL) or id (resolved via the API), plus one or more transform params. See https://pixelvault.dev/docs#transforms.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | PixelVault image id (e.g. img_abc123); its CDN URL is resolved via the API. Provide this OR url. | |
| fit | No | Resize mode. scale-down (default) never enlarges; others may upscale. Only with width/height. | |
| url | No | Absolute PixelVault CDN URL (as returned by upload_image / get_image / list_images). Provide this OR id. | |
| blur | No | Gaussian blur (0-250). | |
| flip | No | Mirror horizontally (h), vertically (v), or both (hv). | |
| size | No | Named size preset: s=256px, m=640px, l=1280px, social=1200x630 OG card. Wins over width/height. | |
| tile | No | Filename of another image in the SAME project to tile as a watermark. | |
| zoom | No | Face-crop tightness 0.0-1.0, only with gravity=face. | |
| width | No | Target width in px (1..4000). | |
| format | No | Output format. auto negotiates WebP/AVIF. | |
| height | No | Target height in px (1..4000). | |
| rotate | No | Rotate clockwise; rounded to the nearest right angle. | |
| gravity | No | Crop anchor with fit=cover|crop: face, left, right, top, bottom, auto, or 'XxY'. | |
| quality | No | Output quality. auto lets Cloudflare choose. | |
| segment | No | AI background removal: foreground keeps the subject, background becomes transparent (PNG output). | |
| sharpen | No | Sharpen strength (0-10). | |
| contrast | No | Contrast multiplier 0-2 (1=no change). | |
| background | No | Fill color behind a removed/padded background: hex, rgb(), or CSS name. | |
| brightness | No | Brightness multiplier 0-2 (1=no change). | |
| saturation | No | Saturation multiplier 0-2 (1=no change, 0=grayscale). |