# agent402.tools Image Format Converter

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

Converts a base64-encoded image from one format to another (PNG, JPEG, or BMP) with optional JPEG quality control

## Facts

- Endpoint: POST https://agent402.tools/api/image-convert
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-image-format-converter-25ad86b1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mS4QPXVgTpJxfmOZxiZEK

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-format-converter-25ad86b1 -d '<json body>'
```

Example prompt: Convert this base64 PNG image to JPEG format with a quality of 75: [base64string]

## When to prefer this

Use this endpoint when you need a fast, deterministic, offline image format conversion between PNG, JPEG, and BMP — especially when you want to avoid external network dependencies or control JPEG compression quality precisely. Prefer this over general image editing APIs when the only transformation needed is format conversion.

## Known failure modes

- Invalid base64 string causes decoding error
- Unsupported format value (not png, jpeg, or bmp) returns validation error
- Quality value out of range (not 1-100) causes parameter rejection
- Malformed data URL prefix causes parsing failure
- Missing required fields (image or format) returns bad request error

## How this service works

Convert an image between formats (PNG, JPEG, BMP). Send a base64 image and the target format; returns the converted image. Optional jpeg quality (1-100). Deterministic, no network.

## Output

Returns the converted image in the requested format (PNG, JPEG, or BMP) as binary or base64 data, produced locally without any network calls

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "image": {
   "type": "string",
   "description": "base64 image, optionally a data: URL"
  },
  "format": {
   "type": "string",
   "description": "png | jpeg | bmp"
  },
  "quality": {
   "type": "number",
   "description": "jpeg quality 1-100 (default 80)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "__note": "returns the converted image as binary"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-image-format-converter-25ad86b1/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)
