transform_image
Generate a CDN-cached image variant for a file stored in UploadKit Cloud. Requires a paid plan, a live API key in the MCP process environment as UPLOADKIT_API_KEY, and an image key returned by UploadKit. BYOS files are not supported. Use signed delivery for private or temporary content and public delivery for stable URLs in websites, apps, srcset, CSS, or stored application data. Explicit formats consume 1 transformation unit; auto consumes 3 units.
When to use: after an image is uploaded and the user wants a resized, cropped, optimized, or converted delivery URL. The returned URL is safe to send to browsers; the API key remains server-side.
Returns: JSON { url, expiresAt, delivery, transform, usage }. Has the side effect of reserving monthly transformation units for a new unique variant.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | scale-down | |
| key | Yes | Exact UploadKit Cloud storage key returned by upload or listFiles. Not a public CDN URL. | |
| width | No | Output width in pixels. Width or height is required. | |
| format | No | auto | |
| height | No | Output height in pixels. Width or height is required. | |
| quality | No | ||
| delivery | No | signed expires and suits private content; public is stable and suits permanent public assets. | signed |