# Relaystation PDF Compress & Linearize

> Relaystation PDF Compress & Linearize is a paid API for AI agents from api.relaystation.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Recompresses and linearizes a PDF to reduce file size and enable fast web viewing (progressive rendering)

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/pdf/compress
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/relaystation-pdf-compress-linearize-42971bba
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7XnPp6XtADcBtHArerUHx

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 relaystation-pdf-compress-linearize-42971bba -d '<json body>'
```

Example prompt: Can you compress and linearize this PDF so it's smaller and loads progressively in the browser? Here's the file.

## When to prefer this

Choose this endpoint when you need to reduce PDF file size and/or enable fast progressive web rendering in a single step. Ideal for automating pre-upload optimization pipelines, reducing email attachment sizes, or preparing PDFs for web portals. Priced per page at $0.001 with a 1¢ minimum, making it cost-effective for both small and large documents.

## Known failure modes

- Invalid or corrupt PDF input returns an error
- Non-PDF file type submitted causes rejection
- File too large may exceed processing limits
- Network timeout on very large documents
- Insufficient USDC balance (x402 payment failure) blocks the request

## How this service works

$0.001/page. Recompress and linearize a PDF — smaller files, fast web view. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

A recompressed and linearized PDF file returned as binary output. The resulting PDF is smaller in size and structured for byte-serving so browsers can render the first page before the full file downloads (fast web view / progressive load).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "file": {
       "type": "object",
       "description": "cputools input-source: { inline: <base64 ≤ 4 MiB> } or { inputKey: <scratch key from /v1/cputools/upload-url, ≤ 50 MB> }."
      },
      "linearize": {
       "type": "boolean",
       "description": "Web-optimize (linearize) the output for byte-range \"fast view\" streaming (default false)."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/relaystation-pdf-compress-linearize-42971bba/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.relaystation.ai](https://www.zero.xyz/host/api.relaystation.ai/llms.txt)
