# NanoAPI Image Compress

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

Compresses an uploaded image (PNG, JPEG, WebP, AVIF) to a target quality level and returns the compressed JPEG binary

## Facts

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

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-compress-fc8bd7e1 -d '<json body>'
```

Example prompt: Compress this product photo for me — squeeze it down to quality 75 so it loads faster on the website, it's a JPEG under 10MB.

## When to prefer this

Use this endpoint when an AI agent needs to reduce image file size programmatically without requiring signup or API keys, paying only $0.01 USDC per call via x402 protocol on Base or Solana. Ideal for pay-per-use workflows where no subscription is desired and the agent handles micropayments natively.

## Known failure modes

- Image exceeds 10MB limit — request rejected
- Unsupported image format provided — only PNG, JPEG, WebP, AVIF accepted
- Quality parameter out of range (must be 1–100)
- Payment not completed via x402 protocol — 402 response returned
- Malformed or corrupted image binary — processing error
- Network timeout on large image upload

## 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

Raw binary JPEG data of the compressed image at the requested quality level, returned directly in the response body

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "image": {
   "type": "string",
   "format": "binary",
   "description": "Image file (PNG, JPEG, WebP, AVIF, max 10MB)"
  },
  "quality": {
   "type": "integer",
   "maximum": 100,
   "minimum": 1,
   "description": "Compression quality (1 = smallest file, 100 = best quality)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": "<binary JPEG data â compressed image at target quality>"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nanoapi-image-compress-fc8bd7e1/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)
