# Tanod Docs PDF Attachments

> Tanod Docs PDF Attachments 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-15).

List, extract, or add embedded file attachments within a PDF document.

## Facts

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

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-attachments-08013cf2 -d '<json body>'
```

Example prompt: I have a PDF at https://example.com/contract.pdf — can you list all the files embedded in it as attachments, including their names, sizes, and types?

## When to prefer this

Use this endpoint when you need to inspect, retrieve, or embed file attachments within a PDF — especially when dealing with PDF portfolios, legal bundles, or documents that carry embedded spreadsheets, images, or text files. Prefer this over general PDF tools when the specific goal is attachment management (list/extract/add) rather than conversion, OCR, or text extraction.

## Known failure modes

- URL points to a private, internal, or IP-literal host — rejected with an error
- PDF URL exceeds 20 MB size limit
- base64-encoded PDF exceeds 10 MB decoded limit
- File to attach exceeds 5 MB decoded limit
- Combined inline PDF and attached file exceed 10 MB
- Attachment name not found when action is 'extract'
- Attachment name contains invalid characters (/ or \)
- Invalid or malformed base64 input
- PDF is password-protected or corrupted

## 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 indicating the action performed, the number of attachments, and details per attachment (name, filename, size, mime_type, description). For 'extract', returns the file as base64 or a temporary download URL valid 24 hours. For 'add', returns the modified PDF with the new attachment included. Also includes input_bytes, input_pages, and a flag indicating untrusted content.

## 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."
  },
  "name": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 255,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "extract / add: the attachment's name (add: a new one; no / or \\)."
  },
  "action": {
   "enum": [
    "list",
    "extract",
    "add"
   ],
   "type": "string",
   "default": "list",
   "description": "list (default): names, sizes and media types; extract: one attachment by `name`, base64; add: attach `file_base64` as `name` (the attachments the PDF has are kept)."
  },
  "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."
  },
  "mime_type": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 127,
     "minLength": 3
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "add: its media type (default: guessed from the name)."
  },
  "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."
  },
  "description": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 300,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "add: a short description stored with the attachment."
  },
  "file_base64": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 6666684,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "add: the file to attach as base64 (at most 5 MB decoded; with an inline PDF the two together at most 10 MB)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "action": "list",
  "operation": "attachments",
  "truncated": false,
  "attachments": [
   {
    "name": "notes.txt",
    "size": 40,
    "filename": "notes.txt",
    "mime_type": "text/plain",
    "description": "Sample attachment"
   }
  ],
  "input_bytes": 1480,
  "input_pages": 1,
  "untrusted_content": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tanod-docs-pdf-attachments-08013cf2/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)
