# Relaystation PDF Encrypt

> Relaystation PDF Encrypt 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-14).

Password-protects a PDF with 256-bit AES encryption and sets access permissions

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/pdf/encrypt
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/relaystation-pdf-encrypt-722312d7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MutW6OhOVigKyJCPPjmBm

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-encrypt-722312d7 -d '<json body>'
```

Example prompt: Can you password-protect this PDF with the password 'Secure@2025' and set it so recipients can read but not print or edit it?

## When to prefer this

Choose this endpoint when you need to programmatically encrypt PDFs with strong 256-bit AES security and granular permission controls (read, print, edit, copy) in an agentic workflow. It is billed per-page at $0.001 with a 1¢ x402 minimum, making it cost-efficient for small documents. Prefer this over client-side PDF libraries when you need a stateless, serverless encryption step with no infrastructure to maintain.

## Known failure modes

- Invalid or corrupt PDF input returns an error
- Missing password field causes request rejection
- Unsupported PDF version or DRM-already-applied file may fail
- Payment failure via x402 (insufficient USDC balance) blocks the request
- Oversized PDF may exceed per-call limits

## How this service works

$0.001/page. Password-protect a PDF with 256-bit AES and set permissions. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

Returns an encrypted PDF binary protected with 256-bit AES encryption, with the specified password and permission restrictions applied. The output file is a valid PDF that requires the password to open and enforces the configured access permissions.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "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> }."
      },
      "userPassword": {
       "type": "string",
       "minLength": 1,
       "maxLength": 500,
       "description": "The open password. Must not start with \"-\"."
      },
      "ownerPassword": {
       "type": "string",
       "minLength": 1,
       "maxLength": 500,
       "description": "The permissions password. Must not start with \"-\"."
      },
      "print": {
       "type": "boolean",
       "description": "Allow printing (absent = allowed). Pair with printHighRes for the print level."
      },
      "copy": {
       "type": "boolean",
       "description": "Allow text/graphics extraction — the live \"copy\" permission (absent = allowed)."
      },
      "modify": {
       "type": "boolean",
       "description": "Allow document modification (absent = allowed)."
      },
      "annotate": {
       "type": "boolean",
       "description": "Allow annotation (absent = allowed)."
      },
      "fillForms": {
       "type": "boolean",
       "description": "Allow filling in form fields (absent = allowed)."
      },
      "extract": {
       "type": "boolean",
       "description": "Allow extraction for accessibility (absent = allowed). NOTE: PDF 2.0 / 256-bit encryption deprecated this bit and always grants it — may be a no-op; use `copy` to control extraction."
      },
      "assemble": {
       "type": "boolean",
       "description": "Allow document assembly — insert/delete/rotate pages (absent = allowed)."
      },
      "printHighRes": {
       "type": "boolean",
       "description": "Allow high-resolution printing (absent = allowed). With print:true, printHighRes:false restricts to low-res printing."
      }
     }
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/relaystation-pdf-encrypt-722312d7/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)
