{"uid":"cap_dDutri23ErfNo8touB3xH","slug":"tanod-docs-pdf-attachments-08013cf2","name":"Tanod Docs PDF Attachments","description":"Documents: DOCX template fill, Office to PDF, any file to Markdown, PDF to Word, OCR, PDF pipeline.","url":"https://docs.tanod.dev/v1/pdf/attachments?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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)."}}},"responseSchema":{"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}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_cTJctjv0WNNaWQr7zxeHf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"List, extract, or add embedded file attachments within a PDF document.","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"Audit embedded files in legal PDF","prompt":"I've got this PDF contract at https://example.com/legal-bundle.pdf and I need to see all the files that are embedded inside it — list their names, sizes, and media types for me."},{"title":"Extract attached spreadsheet from PDF","prompt":"There's an attachment called 'data.xlsx' inside the PDF I'm sending you as base64. Can you extract it and give me the file back as base64 so I can open it?"},{"title":"Attach supporting document to PDF","prompt":"I need to add a file called 'notes.txt' to this PDF — here's the PDF as base64, and here's the notes file as base64. Please attach it with the description 'reviewer notes' and give me back a download link."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-15T02:14:33.641Z","isFirstParty":false,"canonicalSlug":"tanod-docs-pdf-attachments-08013cf2"}