# Tanod imagepeek Image Compression

> Tanod imagepeek Image Compression is a paid API for AI agents from tanod.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-11).

Compresses an image (JPEG, PNG, WebP, AVIF) to a target quality level or byte-size budget via a pay-per-call API.

## Facts

- Endpoint: POST https://tanod.dev/v1/image/compress?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tanod-imagepeek-image-compression-885787c5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DZHH_v8M9lYhDDE3fLelI

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 tanod-imagepeek-image-compression-885787c5 -d '<json body>'
```

Example prompt: Can you compress this image (https://example.com/photo.jpg) to WebP format at quality 75, making sure the result stays under 200 KB?

## When to prefer this

Choose this endpoint when you need server-side image compression with fine-grained control over quality or byte-size targets, and when you want format conversion (e.g., to WebP or AVIF) as part of the same operation. It is ideal for agents handling media pipelines, upload preprocessing, or web performance optimization where a pay-per-call model is acceptable and no self-hosted infrastructure is desired.

## Known failure modes

- Image URL not publicly accessible or returns non-2xx status
- Input image exceeds 10 MB limit
- Unsupported image format or corrupt image data
- max_bytes target is too low to produce a valid image
- Both url and image_base64 provided or neither provided
- quality and max_bytes conflict resolution edge cases
- Payment not received or x402 protocol failure

## How this service works

One MCP server and HTTP API with 193 pay-per-call tools for AI agents (security checks, chain data, finance, aviation, documents), plus free uptime and MikroTik monitoring and 130+ free browser tools. No signup; free daily tier. Operated by an AI.

## Output

Returns a compressed image in the requested format (JPEG, PNG, WebP, or AVIF), optimized to either a specified quality level (1–100) or the highest quality that fits within a given byte budget (max_bytes). The response includes the resulting image data along with metadata such as output size and format.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 2048
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "Public http(s) URL of the image (at most 10 MB; private, internal and IP-literal hosts are refused); or use image_base64."
  },
  "colors": {
   "anyOf": [
    {
     "type": "integer",
     "maximum": 256,
     "minimum": 2
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "png: quantise to this many colours."
  },
  "format": {
   "anyOf": [
    {
     "enum": [
      "jpeg",
      "png",
      "webp",
      "avif"
     ],
     "type": "string"
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "Output format: jpeg, png, webp or avif (default: the input's)."
  },
  "output": {
   "enum": [
    "base64",
    "url"
   ],
   "type": "string",
   "default": "base64",
   "description": "base64 (default): the file comes back inline as base64. url: the file is stored for 24 hours and the reply carries a download link (url, expires_at, bytes, content_type, sha256) instead of the base64, which keeps the file out of your context window."
  },
  "quality": {
   "anyOf": [
    {
     "type": "integer",
     "maximum": 100,
     "minimum": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "Target (or, with max_bytes, highest) quality."
  },
  "keep_icc": {
   "type": "boolean",
   "default": true,
   "description": "Keep the ICC colour profile (default true)."
  },
  "lossless": {
   "type": "boolean",
   "default": false,
   "description": "webp only: lossless encoding (default false)."
  },
  "max_bytes": {
   "anyOf": [
    {
     "type": "integer",
     "maximum": 15000000,
     "minimum": 1000
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "Size target: the highest quality that fits."
  },
  "auto_orient": {
   "type": "boolean",
   "default": true,
   "description": "Apply the EXIF orientation first (default true)."
  },
  "progressive": {
   "type": "boolean",
   "default": false,
   "description": "jpeg only: progressive encoding (default false)."
  },
  "image_base64": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 13333464
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "The image as standard or url-safe base64 (at most 10 MB decoded; a data:image/...;base64, prefix is fine); or
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bytes": 132092,
  "input": {
   "bytes": 161713,
   "width": 640,
   "format": "jpeg",
   "frames": 1,
   "height": 480,
   "animated": false,
   "has_alpha": false
  },
  "notes": [],
  "width": 640,
  "format": "jpeg",
  "height": 480,
  "source": {
   "url": "https://python-pillow.org",
   "library": "Pillow",
   "license": "MIT-CMU (HPND)"
  },
  "encodes": 1,
  "final_url": "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg",
  "operation": "compress",
  "source_url": "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg",
  "target_met": true,
  "after_bytes": 132092,
  "data_base64": "/9j/4AAQSkZJRgAB... (trimmed: 176,124 base64 characters in the reply)",
  "saved_bytes": 29621,
  "saved_ratio": 0.1832,
  "before_bytes": 161713,
  "content_type": "image/jpeg",
  "quality_used": 85,
  "returned_original": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tanod-imagepeek-image-compression-885787c5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tanod.dev](https://www.zero.xyz/host/tanod.dev/llms.txt)
