# x402 Image Tools – Format Converter

> x402 Image Tools – Format Converter is a paid API for AI agents from image.kagurazaka.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Converts an image at a URL to a specified output format (WebP, AVIF, PNG, JPEG, GIF, or TIFF) with optional quality or lossless encoding settings

## Facts

- Endpoint: POST https://image.kagurazaka.dev/v1/convert?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-format-converter-60dc1a1c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_La298yUIS5maDvyfhxpY3

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-format-converter-60dc1a1c -d '<json body>'
```

Example prompt: Convert this PNG image at https://example.com/photo.png to WebP format with quality 85 and return a download link.

## When to prefer this

Choose this endpoint when you need to change an image's file format from one supported type to another, optionally controlling quality or lossless encoding. Ideal for preparing images for web delivery (WebP/AVIF), converting transparent PNGs to JPEG-compatible format, or reformatting for compatibility. Prefer other sibling endpoints on image.kagurazaka.dev for resizing, compression, cropping, or applying filters — this endpoint is specifically for format conversion only.

## Known failure modes

- Image URL unreachable or returns non-2xx — conversion fails with an error
- Image exceeds 20 MB or 40 megapixel limit — rejected with size error
- Unsupported input format (e.g. BMP, RAW) — rejected
- Invalid quality value outside 1–100 range — validation error
- Lossless flag used with a non-supporting format (e.g. JPEG) — may be ignored or error
- Network timeout fetching the source image — returns fetch error
- Payment not attached or insufficient — x402 payment required response

## How this service works

Convert an image at a URL to another format, with an optional quality or lossless encoding. JPEG output gets a white background where the image was transparent.

## Output

A JSON object containing: a temporary CDN URL to the converted image (expires in ~1 hour), the output file size in bytes, the image width and height in pixels, the output format name, the expiry duration in seconds, and the original input file size in bytes. Optionally includes the image as a base64 data URL if it is under 1 MB and inline was requested.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "https URL of a JPEG, PNG, WebP, AVIF, GIF, TIFF or SVG image (up to 20 MB, 40 megapixels)"
  },
  "format": {
   "enum": [
    "webp",
    "avif",
    "png",
    "jpeg",
    "gif",
    "tiff"
   ],
   "type": "string",
   "description": "the output format"
  },
  "inline": {
   "type": "boolean",
   "description": "also return the image as a data URL when it is at most 1 MB"
  },
  "quality": {
   "type": "integer",
   "description": "1-100"
  },
  "lossless": {
   "type": "boolean",
   "description": "lossless WebP or AVIF"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://dn8i8p8knpn68.cloudfront.net/results/images/3f1c2b9e.webp?Expires=...",
  "bytes": 48213,
  "width": 800,
  "format": "avif",
  "height": 600,
  "expires_in": 3600,
  "input_bytes": 912345
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-image-tools-format-converter-60dc1a1c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from image.kagurazaka.dev](https://www.zero.xyz/host/image.kagurazaka.dev/llms.txt)
