Image Crop API - crop to ratio, box or trim borders
image_cropCrop images to a ratio (1:1, 4:5, 16:9, 9:16, 3:2), to a pixel box, or trim uniform borders automatically. Runs on our server, files are deleted right after the call, nothing stored. Free: 25 calls/day per IP. Paid: $0.002 per call via x402 at https://radarbg.com/x402/image-crop.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mode": "ratio",
"ratio": "1:1",
"fileName": "sample.png",
"fileContent": "iVBORw0KGgoAAAANSUhEUgAAAHgAAABQCAIAAABd+SbeAAAA6klEQVR4nO3cQQ2DABAAwdKgg1cFVQIykIOEyqiIisFDKdsQZv6XXDb3vmFa3jeOd//3AlchdEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6Mi4Z/jznH+0xmk8Xut3gy46InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ZPIFtuOiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNCRDexBBl0OjJSaAAAAAElFTkSuQmCC"
},
"name": "image_crop"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Left px (mode=box) | |
| y | No | Top px (mode=box) | |
| mode | No | ratio, box or trim | ratio |
| files | No | Or several files: [{fileName, fileContent (base64)}] | |
| ratio | No | Ratio for mode=ratio | 1:1 |
| width | No | Width px (mode=box) | |
| height | No | Height px (mode=box) | |
| fileName | No | File name with extension, e.g. report.pdf | |
| fileContent | No | The file as base64 (a data: URI is fine) |