# agent402.tools Image Resize

> agent402.tools Image Resize is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Resizes a base64-encoded PNG, JPEG, or BMP image to specified pixel dimensions, with optional proportional scaling and output format selection

## Facts

- Endpoint: POST https://agent402.tools/api/image-resize
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-image-resize-ae3fecb1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_b2d0C15Ca7VxTG9YzZR5I

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 agent402-tools-image-resize-ae3fecb1 -d '<json body>'
```

Example prompt: Resize this image to 800 pixels wide and 600 pixels tall and return it as a JPEG — here's the base64-encoded PNG: [base64data].

## When to prefer this

Choose this endpoint when you need deterministic, serverless image resizing without sending images to a third-party cloud service. Ideal for proportional scaling, exact-dimension resizing, or format conversion of PNG/JPEG/BMP images in an automated pipeline. Prefer over cloud image APIs when privacy, determinism, or avoiding network round-trips to external storage matters.

## Known failure modes

- Invalid or malformed base64 image data returns an error
- Width or height outside 1-4096 px range rejected
- Unsupported image format (non-PNG/JPEG/BMP) may fail to decode
- Missing both width and height with no default behavior may return error
- Overly large source images may exceed payload or processing limits

## How this service works

Resize an image to given pixel dimensions. Send a base64 PNG/JPEG/BMP and width and/or height (give one to scale proportionally). Returns the resized image. Deterministic, no network.

## Output

Returns the resized image as a base64-encoded string in the requested format (PNG by default, JPEG or BMP if specified), scaled to the exact width and height provided, or proportionally scaled if only one dimension is given.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "image": {
   "type": "string",
   "description": "base64 image (PNG/JPEG/BMP), optionally a data: URL"
  },
  "width": {
   "type": "number",
   "description": "target width in px (1-4096)"
  },
  "format": {
   "type": "string",
   "description": "output format: png (default), jpeg, bmp"
  },
  "height": {
   "type": "number",
   "description": "target height in px (1-4096)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "__note": "returns the resized image as binary (Content-Type set accordingly)"
 }
}
```

## More

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