# Tanod PDF Flatten

> Tanod PDF Flatten is a paid API for AI agents from tanod.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-10).

Flattens PDF annotations, form fields, and interactive elements into static content, removing active content like JavaScript

## Facts

- Endpoint: POST https://tanod.dev/v1/pdf/flatten?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tanod-pdf-flatten-85bbb0a5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__db8OuR0NufL3iKWD9g8z

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-pdf-flatten-85bbb0a5 -d '<json body>'
```

Example prompt: Can you flatten this PDF so all the form fields and annotations are permanently baked in and any JavaScript is removed? Here's the URL: https://example.com/myform.pdf — use 'all' mode so everything visible gets flattened.

## When to prefer this

Choose this endpoint when you need to permanently embed PDF annotations, form data, and widget appearances into static page content, especially when security sanitization (removing JavaScript or active content) is also required. It is particularly useful for archiving filled forms, preparing PDFs for sharing with untrusted recipients, or producing print-ready static documents. Prefer it over generic PDF conversion tools when you need granular control over which annotation layers to flatten (all, screen, or print modes).

## Known failure modes

- PDF URL is not publicly accessible or resolves to a private/internal host — request refused
- PDF exceeds 20 MB (URL) or 10 MB decoded (base64) — size limit error
- Malformed or password-protected PDF — processing failure
- Neither url nor pdf_base64 provided — validation error
- Invalid base64 encoding in pdf_base64 — parse error
- Invalid mode enum value — validation error

## 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 JSON object containing the flattened PDF as a base64-encoded string, along with metadata including file name, byte size, page count, flatten mode used, number of annotations before and after, number of dropped widgets, number of appearances drawn, whether untrusted content was detected, and any active content (e.g. JavaScript) that was removed, plus any warnings encountered during processing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 2048,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "Public http(s) URL of the PDF (at most 20 MB; private, internal and IP-literal hosts are refused); or use pdf_base64."
  },
  "mode": {
   "enum": [
    "all",
    "screen",
    "print"
   ],
   "type": "string",
   "default": "all",
   "description": "all (default): every visible annotation and form field; screen: what a viewer shows; print: what is marked for printing. Annotations the mode does not flatten are removed."
  },
  "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."
  },
  "pdf_base64": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 13398872,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "The PDF as base64 (at most 10 MB decoded per request); or use url."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "file": {
   "name": "flattened.pdf",
   "bytes": 89021,
   "pages": 6,
   "data_base64": "JVBERi0xLjcKJb/3... (trimmed: 118,696 base64 characters in the reply)",
   "content_type": "application/pdf"
  },
  "mode": "all",
  "warnings": [],
  "operation": "flatten",
  "input_bytes": 140815,
  "input_pages": 6,
  "output_bytes": 89021,
  "dropped_widgets": 15,
  "annotations_after": 0,
  "appearances_drawn": 0,
  "untrusted_content": true,
  "annotations_before": 23,
  "flattened_annotations": 8,
  "active_content_removed": {
   "javascript": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tanod-pdf-flatten-85bbb0a5/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)
