Loading...
Loading...
Guidance for building ImageKit image/video transformation URLs with the transformation_builder tool — how the tool works, how to write a good query, how to order multi-step chains, and a reference of every supported parameter. Use before calling transformation_builder. Covers resize/crop/focus, AI edits (change objects, colors, styles), background removal/replacement, generative fill, upscaling, retouching, drop shadows, variations, effects (blur/sharpen/rotate/border/color-replace/gradient), image/text/video overlays, and video transforms.
npx skill4agent add imagekit-developer/skills transformation-buildertransformation_buildertransformation_buildertransformation_builder(query, src?, previous_errors?)querysrcprevious_errorsquerycapabilitytransformation_builderquerysrc| User says | Weak query | Good query |
|---|---|---|
| "Make the red balls green" | "make red balls green" | "Apply an AI edit ( |
| "Clean it up and put it on white" | "clean up, white background" | "Apply |
| "Make it look like a painting" | "painting style" | "Apply |
| "Crop around the face" | "crop face" | "Resize with |
| "Text 'Hello' at the bottom" | "add hello text" | "Add a text overlay with text 'Hello', positioned at the bottom ( |
| "Fit a mobile banner" | "mobile banner" | "Resize to |
| "300px wide with a red border" | "resize and border" | "Resize to |
| "Higher resolution, it's blurry" | "fix quality" | "Apply |
| "Remove bg and add a shadow" | "remove bg shadow" | "Apply |
| "Make it wider without stretching" | "make wider" | "Extend the canvas horizontally using a padded crop ( |
| User intent | Use this vocabulary | Notes |
|---|---|---|
| Modify specific objects/regions ("enlarge the cat", "add sunglasses", "make it a painting") | | AI content edit driven by a text prompt |
| Replace the whole background scene ("put them on a beach") | | Keeps the subject, generates a new scene. Not for plain removal or color changes |
| Remove background → transparent | | ImageKit-native. For the external remove.bg engine use |
| Extend/outpaint the canvas ("add more sky", "make it panoramic") | padded crop + | Generative fill lives in the background param, not a standalone AI field. Takes no prompt |
| Increase resolution / fix low-res | | Boolean; no params |
| Clean up / remove blemishes | | Boolean; no params |
| Realistic shadow under a cut-out subject | | Transparent images only. Optional |
| Different version / remix | | Boolean; preserves structure |
| Resize / aspect ratio / crop | | See Resize & Crop table |
| Smart crop to face/object | | Object names are COCO classes ( |
| Swap one color across all pixels ("all red → blue") | | Global pixel color swap with |
| Filters/adjustments (B&W, blur, sharpen, rotate, border, round corners) | | See Effects table |
| Overlay a logo/watermark image | text/image overlay | Single |
| Write text on the image | text overlay with | See Overlays |
There is no "generate an image from scratch" step in this tool — it always transforms an existing. To generate images from scratch, use text-to-image generation in the ImageKit DAM (Digital Asset Manager), which is a separate feature fromsrc.transformation_builder
ai_editcolor_replaceai_change_backgroundai_editcolor_replaceai_change_backgroundai_editai_remove_backgroundai_change_backgroundai_upscale → ai_remove_backgroundai_remove_background → ai_upscaleai_retouchai_remove_backgroundwidthheightai_remove_backgroundai_change_backgroundai_remove_backgroundbackgroundprevious_errorssearch-docssearch_docssearch-docsbackgroundgenfillai_change_backgroundai_drop_shadowai_remove_backgroundN| Parameter | What it does |
|---|---|
| Output width. Integer px, decimal 0–1 (fraction of original), or an arithmetic expression. |
| Output height. Same formats as |
| Aspect ratio (e.g. |
| Resize strategy: |
| Pad/extract behavior: |
| Focal point: |
| Zoom factor around the focused area (with face/object focus). |
| Region coordinates for |
| Device pixel ratio (number or |
| Fill for padded areas — see Background modes. |
background| Value | Meaning |
|---|---|
| a color | Hex ( |
| Blurred version of the image (optionally |
| The image's dominant color. |
| AI generative fill of the padded area (outpainting). No prompt. |
| Gradient from dominant colors ( |
| Parameter | What it does |
|---|---|
| ImageKit-native background removal → transparent. |
| Background removal via external provider (remove.bg). |
| Prompt-based AI edit of image content. |
| Prompt-based replacement of the background scene (subject preserved). |
| AI drop shadow (transparent images only). Optional |
| AI super-resolution upscaling. No params. |
| AI quality enhancement / blemish removal. No params. |
| Generate a structural variation of the image. No params. |
| Parameter | What it does |
|---|---|
| Gaussian blur, 0–100. |
| Sharpen, 0–100. |
| Advanced sharpening ( |
| Convert to grayscale. |
| Auto-enhance contrast. |
| Drop shadow under non-transparent pixels (needs transparency). Optional |
| Linear gradient overlay ( |
| Replace a color and similar shades: |
| Tint the image: |
| Border of |
| Trim solid edges around the subject. |
| Rotate by degrees (or |
| |
| Round corners (integer, |
| Layer opacity, 0–100. |
| Perspective warp (4 coordinate pairs) or arc distortion (degrees). |
overlayoverlaypositionxyx_centery_centerfocusanchor_pointtimingstartenddurationlayer_modemultiplycuttercutoutdisplacetransformation| Overlay type | Key fields |
|---|---|
| Text | |
| Image | |
| Video | |
| Subtitle | |
| Solid color | |
| Parameter | What it does |
|---|---|
| Trim the clip (seconds or arithmetic expressions). |
| |
| |
| Adaptive-bitrate ladder, e.g. |
| Same as image effects, applied to the video frame. |
| Parameter | What it does |
|---|---|
| |
| 0–100. |
| Progressive JPEG. |
| Lossless WebP/PNG. |
| Apply a saved named transformation. |
| Fallback image if the source is missing. |
ifif-elseif-end