Tools / image.transform

Image resize and convert

image.transform

Resize an image and convert it to JPEG, PNG or WebP; metadata is stripped.

MediaLaunch set2 units per callnot cachedMCP: image_transformv1.0.0

When to use it

Use to make an image a particular size or format, for example a thumbnail or a WebP for the web. Output up to 1 MB is returned inline as base64.

Input

FieldTypeDescription
urlstring (≤ 2048 chars)Absolute http or https URL of the file. Use instead of base64.
base64string (≤ 14000000 chars)Base64-encoded file bytes, up to 10 MB once decoded. Use instead of url.
widthinteger (≥ 1, ≤ 4096)
heightinteger (≥ 1, ≤ 4096)
fitone of scale-down, contain, cover, crop, padDefault: "scale-down".
formatone of jpeg, png, webpDefault: "webp".
qualityinteger (≥ 1, ≤ 100)Default: 80.

Output

Returns data with: format, content_type, bytes, data_base64.

Request

curl -X POST https://agentops.tools/v1/image.transform \
  -H 'content-type: application/json' \
  -d '{"url":"https://www.w3.org/Icons/w3c_home.png","width":200,"format":"webp"}'

Over MCP the tool is named image_transform. Over A2A its skill id is image.transform. Same input, same envelope.

Try it

Counts against your rate limit.

Sources