# MiniFrame PDF Compressor

> MiniFrame PDF Compressor is a paid API for AI agents from tools.miniframe.com.br, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-16).

Compresses a PDF file using selectable compression modes and returns the compressed file as base64-encoded JSON

## Facts

- Endpoint: POST https://tools.miniframe.com.br/compress-pdf
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/miniframe-pdf-compressor-cb63a9f6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7ZiHtW4NZBr5r24nvNdaO

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 miniframe-pdf-compressor-cb63a9f6 -d '<json body>'
```

Example prompt: Can you compress this PDF for me using max compression? It's about 15 MB and I need to reduce it as much as possible.

## When to prefer this

Use this endpoint when you need to reduce the file size of an existing PDF without converting it to another format. Ideal when you want configurable compression levels (light/balanced/max) and need the compressed file returned inline as base64 JSON. Best for PDFs up to 30 MB where a reduction percentage report is also useful.

## Known failure modes

- PDF exceeds 30 MB limit — returns error indicating file is too large
- Invalid or corrupted PDF binary — returns parse/format error
- Unsupported mode value — returns validation error for invalid enum
- Empty request body — returns missing body error
- Timeout on very complex or image-heavy PDFs near the size limit

## How this service works

Use when a PDF is too large to email, upload or attach — Ghostscript compression an agent sandbox cannot run on its own. Send it either as JSON {pdf_base64} or as the raw PDF body (Content-Type: application/pdf), up to 30 MB. Optional query param mode=light|balanced|max (default balanced). Returns JSON with original_size, compressed_size, reduction_percent, warnings and pdf_base64 (the compressed file).

## Output

A JSON object containing: original_size (bytes), compressed_size (bytes), reduction_percent (float), warnings (array of strings), and pdf_base64 (the full compressed PDF as a base64 string ready for decoding and saving).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mode": {
   "enum": [
    "light",
    "balanced",
    "max"
   ],
   "type": "string",
   "description": "Compression mode (query param, optional, default balanced)."
  },
  "pdf_base64": {
   "type": "string",
   "description": "The PDF file encoded in base64 (JSON body). Max 30 MB decoded."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "balanced",
  "warnings": [],
  "pdf_base64": "JVBERi0xLjUK...",
  "original_size": 500000,
  "compressed_size": 210000,
  "reduction_percent": 58
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/miniframe-pdf-compressor-cb63a9f6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tools.miniframe.com.br](https://www.zero.xyz/host/tools.miniframe.com.br/llms.txt)
