{"slug":"agent402-tools-api-image-crop-f062ee","title":"Crop an image to a pixel box, and/or rotate (90/180/270) and flip it","host":"agent402.tools","method":"POST","resource":"https://agent402.tools/api/image-crop","category":"image","description":"Crop an image to a pixel box, and/or rotate (90/180/270) and flip it - applied in that order. Send a public image URL or a base64 image. Returns the result as binary, or as a JSON data URI with dataUri:true. Deterministic.","price_listed":0.002,"price_asked":null,"state":"effects","state_label":"Not tested: has real-world effects","checks_7d":0,"answered_7d":0,"latency_ms_median":null,"reported_calls_30d":5,"reported_payers_30d":2,"networks":["algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=","eip155:10","eip155:1329","eip155:137","eip155:143","eip155:42161","eip155:42220","eip155:43114","eip155:4663","eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","stellar:pubnet"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"dataUri":true,"height":40,"left":10,"top":10,"url":"https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/Canon_40D.jpg","width":60},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"dataUri":{"description":"return JSON {dataUri, width, height, bytes} instead of binary","type":"boolean"},"flip":{"description":"horizontal | vertical | both","type":"string"},"format":{"description":"output format: png (default), jpeg, bmp","type":"string"},"height":{"description":"crop box height in px","type":"number"},"image":{"description":"alternative: base64 image, optionally a data: URL","type":"string"},"left":{"description":"crop box left edge in px (default 0)","type":"number"},"quality":{"description":"jpeg quality 1-100 (default 80)","type":"number"},"rotate":{"description":"rotate by 90, 180, or 270 degrees","type":"number"},"top":{"description":"crop box top edge in px (default 0)","type":"number"},"url":{"description":"public http(s) image URL (fetched server-side, 5MB cap)","type":"string"},"width":{"description":"crop box width in px (required with height for a crop)","type":"number"}}},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"properties":{"bytes":{"type":"integer"},"dataUri":{"type":"string"},"height":{"type":"integer"},"width":{"type":"integer"}},"required":["dataUri","width","height","bytes"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[],"description_full":"Crop an image to a pixel box, and/or rotate (90/180/270) and flip it - applied in that order. Send a public image URL or a base64 image. Returns the result as binary, or as a JSON data URI with dataUri:true. Deterministic.","last_updated":"2026-09-11T22:00:53.473Z","schemes":["exact","upto"]}