# NanoAPI Image Resize

> NanoAPI Image Resize is a paid API for AI agents from nanoapi.org, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-10).

Resizes an uploaded image (PNG, JPEG, WebP, or AVIF) to specified pixel dimensions, returning a binary PNG

## Facts

- Endpoint: POST https://nanoapi.org/image/resize?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nanoapi-image-resize-96c1efe3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hD-pH4l3ybM7RFClXh1pZ

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 nanoapi-image-resize-96c1efe3 -d '<json body>'
```

Example prompt: Can you resize this product photo to 400 pixels wide by 300 pixels tall? It's a JPEG file I'm about to upload.

## When to prefer this

Choose this endpoint when you need a simple, pay-per-use image resize without signing up for an API key, especially inside an AI agent workflow that can handle x402 micropayments. At $0.01 USDC per call it is cost-effective for low-to-moderate volume resizing. Prefer alternatives if you need batch processing, complex transformations (crop, filter, compress), or want to avoid per-call payment overhead.

## Known failure modes

- Image file exceeds 10MB limit — upload rejected
- Width or height exceeds 4096 pixels — validation error
- Unsupported image format provided — only PNG, JPEG, WebP, AVIF accepted
- Payment not provided or insufficient — 402 Payment Required returned
- Network or processing timeout for very large images within limit

## How this service works

Pay-per-use APIs for AI agents: image processing and Solana data endpoints. $0.001-$0.01 USDC per call on Base or Solana via x402 protocol. No signup or API keys required.

## Output

A binary PNG file containing the input image resized to exactly the specified width and height in pixels.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "image": {
   "type": "string",
   "format": "binary",
   "description": "Image file (PNG, JPEG, WebP, AVIF, max 10MB)"
  },
  "width": {
   "type": "integer",
   "maximum": 4096,
   "minimum": 1,
   "description": "Target width in pixels"
  },
  "height": {
   "type": "integer",
   "maximum": 4096,
   "minimum": 1,
   "description": "Target height in pixels"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": "<binary PNG data â resized image at target dimensions>"
}
```

## More

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