Convert or compress an image
convert_imageRe-encodes an image as jpeg, png, webp, avif at a chosen quality, to change format or shrink file size. JPEG flattens transparency to white. Without an API key: returns a free watermarked preview (≤700px) plus unlock_url, which a human opens to download the full-resolution file for site credits (then call get_result). With an API key (Authorization: Bearer stb_…): returns download_url for the full-resolution file directly and charges the key owner's credits when the job starts, refunded automatically if processing fails. Retrying a call creates and charges a new job — use get_result to fetch an earlier one.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "convert_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | jpeg | |
| quality | No | ||
| image_url | No | Public https:// URL of the image. Preferred over image_base64. | |
| image_base64 | No | The image as base64 (or a data: URL), max 2 MB. Use only when no public URL is available. |