# 402utils Image Resize & Convert

> 402utils Image Resize & Convert is a paid API for AI agents from 402utils.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-13).

Resizes and converts an image (PNG, JPEG, or WebP) to a target width/height and output format with optional JPEG quality control

## Facts

- Endpoint: POST https://402utils.com/v1/image-optimize
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/402utils-image-resize-convert-95ce26df
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DvwnH03rGS-hX3FrvGuBB

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 402utils-image-resize-convert-95ce26df -d '<json body>'
```

Example prompt: Can you resize this product photo to 800×600 pixels, convert it to WebP format using cover fit so it fills the frame, and give me back the optimized image bytes?

## When to prefer this

Use this endpoint when you need a lightweight, pay-per-call image resize and format conversion without setting up a full image CDN or processing pipeline. Ideal for agents that occasionally need to prepare images for web use, thumbnail generation, or format normalization. Best when input is PNG, JPEG, or WebP under 10 MB and output is one of those three formats.

## Known failure modes

- Image exceeds 10 MB size limit — request rejected
- Invalid dimensions (width or height outside 1–4096 range) — validation error
- Unsupported input image format (e.g. GIF, AVIF, TIFF) — unsupported format error
- AVIF output format requested — out of scope, not supported
- Malformed image bytes in request body — parsing error
- Quality parameter provided for WebP/PNG — silently ignored, no error
- Payment of 0.004 USDC not provided — 402 Payment Required response

## How this service works

Resize and convert an image (PNG, JPEG or WebP, up to 10 MB). Send the image bytes as the body and set options in the query: width, height, fit (contain or cover), format (webp/jpeg/png) and quality (JPEG). Returns the converted image bytes. WebP has no quality knob and AVIF is not supported (out of scope).

## Output

Returns the raw converted image bytes in the requested format (WebP, JPEG, or PNG), resized to the specified dimensions using the chosen fit mode (contain or cover), with JPEG quality applied if applicable.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "fit": {
   "enum": [
    "contain",
    "cover"
   ],
   "type": "string",
   "default": "contain"
  },
  "width": {
   "type": "integer",
   "maximum": 4096,
   "minimum": 1
  },
  "format": {
   "enum": [
    "webp",
    "jpeg",
    "png"
   ],
   "type": "string",
   "default": "webp"
  },
  "height": {
   "type": "integer",
   "maximum": 4096,
   "minimum": 1
  },
  "quality": {
   "type": "integer",
   "maximum": 100,
   "minimum": 1,
   "description": "JPEG quality (ignored for webp/png)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": "<binary image stream>"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/402utils-image-resize-convert-95ce26df/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 402utils.com](https://www.zero.xyz/host/402utils.com/llms.txt)
