# x402 Image Tools – Crop

> x402 Image Tools – Crop is a paid API for AI agents from image.kagurazaka.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Crops a region from an image by explicit coordinates or smart-crops to the most visually interesting region using libvips attention strategy.

## Facts

- Endpoint: POST https://image.kagurazaka.dev/v1/crop?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-image-tools-crop-bed57ff8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_P08inPqKxGfrRBxarSkCP

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-image-tools-crop-bed57ff8 -d '<json body>'
```

Example prompt: Crop this product photo at https://example.com/product.jpg to a 600×600 square centered on the most interesting region and return it as a WebP.

## When to prefer this

Use this endpoint when you need to extract a specific rectangular region from an image by pixel coordinates, or when you want automatic subject-aware cropping using libvips attention strategy without needing to know where the subject is. Prefer it over generic resize endpoints when the goal is to reduce the frame of the image rather than scale it down, and over thumbnail endpoints when you need precise coordinate control or non-square output dimensions.

## Known failure modes

- Image URL unreachable or returns non-2xx — 4xx/5xx error response
- Image exceeds 20 MB or 40 megapixels limit — rejected with size error
- Unsupported image format (e.g. BMP, HEIC) — format error
- Crop coordinates out of bounds for the image dimensions — geometry error
- left/top provided without width/height or vice versa — parameter validation error
- Network timeout fetching remote image — timeout error

## How this service works

Cut a region out of an image (left, top, width, height), or, without left and top, crop it to the given size around its most interesting region (libvips attention strategy).

## Output

Returns a JSON object containing a temporary CDN URL to the cropped image (valid for 1 hour), the output dimensions (width, height), file size in bytes, and the output format. Optionally includes the image as a base64 data URL if it is 1 MB or smaller and the inline flag is set.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "top": {
   "type": "integer",
   "description": "top edge"
  },
  "url": {
   "type": "string",
   "description": "https URL of a JPEG, PNG, WebP, AVIF, GIF, TIFF or SVG image (up to 20 MB, 40 megapixels)"
  },
  "left": {
   "type": "integer",
   "description": "left edge; leave out with top for a smart crop"
  },
  "width": {
   "type": "integer",
   "description": "crop width"
  },
  "format": {
   "enum": [
    "webp",
    "avif",
    "png",
    "jpeg",
    "gif",
    "tiff"
   ],
   "type": "string",
   "description": "output format (default: the input's)"
  },
  "height": {
   "type": "integer",
   "description": "crop height"
  },
  "inline": {
   "type": "boolean",
   "description": "also return the image as a data URL when it is at most 1 MB"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://dn8i8p8knpn68.cloudfront.net/results/images/3f1c2b9e.webp?Expires=...",
  "bytes": 48213,
  "width": 600,
  "format": "webp",
  "height": 600,
  "expires_in": 3600,
  "input_bytes": 912345
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-image-tools-crop-bed57ff8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from image.kagurazaka.dev](https://www.zero.xyz/host/image.kagurazaka.dev/llms.txt)
