# x402 Image Tools – Crop

> x402 Image Tools – Crop is a paid API for AI agents from 7fg5bxb40m3f0v23.68r.lambda-web.us-east-1.on.aws, 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 a given size around the most visually interesting area using libvips attention strategy.

## Facts

- Endpoint: POST https://7fg5bxb40m3f0v23.68r.lambda-web.us-east-1.on.aws/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-cb5973a5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lCDwBR-1nNDl5B9-SDhcD

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-cb5973a5 -d '<json body>'
```

Example prompt: Crop this image (https://example.com/photo.jpg) to 800×600 pixels starting from the top-left corner at coordinates (100, 50), and return it as a WebP.

## When to prefer this

Choose this endpoint when you need to extract a specific rectangular region from an image by pixel coordinates, or when you want intelligent subject-aware cropping to a target size without manually specifying coordinates. It is ideal for generating thumbnails, focusing on subjects, or preparing images for fixed-dimension displays. Prefer it over a generic resize endpoint when spatial cropping (not just scaling) is required, and over a thumbnail endpoint when you need full control over output dimensions or coordinate-based extraction.

## Known failure modes

- Image URL not reachable or not returning a valid image — HTTP error or invalid format response
- Image exceeds 20 MB or 40 megapixel limit — request rejected
- Crop coordinates out of bounds for the source image — likely error or clamped result
- Unsupported image format — only JPEG, PNG, WebP, AVIF, GIF, TIFF, SVG accepted
- Payment failure via x402 protocol — 402 Payment Required if USDC not provided
- Result URL expires after 3600 seconds — subsequent access will fail

## 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

A JSON object containing a temporary CDN URL to the cropped image, its width and height in pixels, file format, size in bytes, and expiry time in seconds. If 'inline' is true and the result is under 1 MB, a base64 data URL is also included.

## 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-cb5973a5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 7fg5bxb40m3f0v23.68r.lambda-web.us-east-1.on.aws](https://www.zero.xyz/host/7fg5bxb40m3f0v23.68r.lambda-web.us-east-1.on.aws/llms.txt)
