# Tanod Docs PDF Repair

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

Repairs and sanitizes a corrupt or malformed PDF, optionally linearizing it for fast web view, and returns the fixed file as base64 or a download URL.

## Facts

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

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-docs-pdf-repair-6c2b1a09 -d '<json body>'
```

Example prompt: This PDF is corrupted and won't open properly — can you repair it and send back the fixed version as a download link rather than inline data?

## When to prefer this

Use this endpoint when you need to fix a corrupt, malformed, or potentially unsafe PDF before further processing (OCR, conversion, storage, or display). It is also the right choice when you need to linearize a PDF for fast browser streaming, or sanitize a PDF by removing active/scripted content. Prefer it over generic conversion endpoints when the input is already a PDF and the goal is healing or hardening it rather than format conversion.

## Known failure modes

- PDF URL is private, internal, or IP-literal — returns error refusing the URL
- PDF exceeds 20 MB via URL or 10 MB via base64 — returns size limit error
- Neither url nor pdf_base64 provided — returns validation error
- PDF is so severely corrupted it cannot be reconstructed — may return error or reconstructed:false
- Network fetch of the provided URL fails or times out — returns fetch error

## How this service works

Documents: DOCX template fill, Office to PDF, any file to Markdown, PDF to Word, OCR, PDF pipeline.

## Output

Returns a JSON object with the repaired PDF file (name, byte count, page count, content type, and data as base64 or a 24-hour download URL), a boolean indicating whether repair was performed, a reconstructed flag, a list of warnings, counts of bytes before and after, and a report of any active content removed.

## 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."
  },
  "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."
  },
  "linearize": {
   "type": "boolean",
   "default": false,
   "description": "Also write the file for fast web view (linearized; default false)."
  },
  "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": "repaired.pdf",
   "bytes": 13730,
   "pages": 1,
   "data_base64": "JVBERi0xLjQKJb/3... (trimmed: 18,308 base64 characters in the reply)",
   "content_type": "application/pdf"
  },
  "repaired": false,
  "warnings": [],
  "operation": "repair",
  "linearized": true,
  "bytes_after": 13730,
  "input_bytes": 13264,
  "input_pages": 1,
  "bytes_before": 13264,
  "output_bytes": 13730,
  "reconstructed": false,
  "warning_count": 0,
  "untrusted_content": true,
  "active_content_removed": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tanod-docs-pdf-repair-6c2b1a09/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from docs.tanod.dev](https://www.zero.xyz/host/docs.tanod.dev/llms.txt)
