# x402 Image Tools – Resize

> x402 Image Tools – Resize 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-30).

Resize an image from a URL to specified dimensions with configurable fit mode, optional format conversion, and quality control, returning a signed CDN URL valid for one hour.

## Facts

- Endpoint: POST https://7fg5bxb40m3f0v23.68r.lambda-web.us-east-1.on.aws/v1/resize?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-image-tools-resize-7c0534b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mN0xQ8aUHPovRP66aT-WM

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

Example prompt: Can you resize this image — https://example.com/photo.jpg — to 800 pixels wide, keeping the aspect ratio (inside fit), and convert it to WebP?

## When to prefer this

Use this endpoint when you need to resize a remotely-hosted image to specific dimensions with precise control over fit behavior (cover, contain, inside, outside, fill), optionally converting format in the same call. It's ideal for web optimization workflows, preparing images for specific layout slots, or generating display-ready variants from originals. Prefer this over a crop endpoint when you want aspect-ratio-aware scaling rather than a fixed cut.

## Known failure modes

- Image URL is not publicly accessible or returns a non-200 response
- Image exceeds 20 MB or 40 megapixel limits
- Invalid dimensions (outside 1–8192 range)
- Unsupported input format (non-JPEG/PNG/WebP/AVIF/GIF/TIFF/SVG)
- Both width and height omitted (no target size specified)
- Payment of $0.002 USDC not provided via x402 protocol
- Signed URL expires after 1 hour and result is no longer accessible

## How this service works

Resize an image at a URL to a width, a height or both, keeping the aspect ratio inside the box by default (cover, contain, inside, outside or fill), optionally converting it. Returns a signed URL of the result, valid for an hour.

## Output

A JSON object containing a signed CloudFront URL to the resized image (valid for 1 hour), the output width and height in pixels, the output format, the file size in bytes, the input file size in bytes, and an expires_in value of 3600 seconds. If inline was requested and the result is under 1 MB, a base64 data URL of the image is also included.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "fit": {
   "enum": [
    "cover",
    "contain",
    "inside",
    "outside",
    "fill"
   ],
   "type": "string",
   "description": "how to fit the box (default inside)"
  },
  "url": {
   "type": "string",
   "description": "https URL of a JPEG, PNG, WebP, AVIF, GIF, TIFF or SVG image (up to 20 MB, 40 megapixels)"
  },
  "width": {
   "type": "integer",
   "description": "target width (1-8192)"
  },
  "format": {
   "enum": [
    "webp",
    "avif",
    "png",
    "jpeg",
    "gif",
    "tiff"
   ],
   "type": "string",
   "description": "output format (default: the input's)"
  },
  "height": {
   "type": "integer",
   "description": "target height (1-8192)"
  },
  "inline": {
   "type": "boolean",
   "description": "also return the image as a data URL when it is at most 1 MB"
  },
  "enlarge": {
   "type": "boolean",
   "description": "allow making the image larger (default false)"
  },
  "quality": {
   "type": "integer",
   "description": "1-100"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://dn8i8p8knpn68.cloudfront.net/results/images/3f1c2b9e.webp?Expires=...",
  "bytes": 48213,
  "width": 800,
  "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-resize-7c0534b9/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)
