Image converter
image_convertConvert and resize images between PNG, JPEG, WEBP, GIF, BMP, TIFF and ICO, with quality, fit modes, transparency handling and optional metadata stripping. Cost: 1 credit per call. File input (file): base64 string, data: URI or {"url": "https://..."}. Output: a file (image/png | image/jpeg | image/webp | image/gif | image/bmp | image/tiff | image/x-icon) returned inline, at most 1 MiB. The converted image
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target format | |
| fit | No | inside | |
| file | Yes | The image: base64 (or data: URI) string, or {"url": "https://..."}; up to 10 MB | |
| width | No | Target width in px | |
| height | No | Target height in px | |
| quality | No | jpeg / webp quality (webp 100 = lossless) | |
| background | No | Colour for transparent areas when the target has no alpha, and for contain padding (default white / transparent) | |
| strip_metadata | No | Drop EXIF / XMP / ICC (colours are converted to sRGB first) |