{"uid":"cap_roGhP4Nyakfh2ghyUpsHq","slug":"tanod-docs-pdf-pipeline-0ef1cf4e","name":"Tanod Docs PDF Pipeline","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/pipeline?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."},"steps":{"type":"array","items":{"type":"object","required":["op"],"properties":{"op":{"enum":["rotate","remove-pages","extract-pages","reorder","crop","resize","set-outline","flatten","repair","inspect","outline"],"type":"string","description":"rotate, remove-pages, extract-pages, reorder, crop, resize, set-outline, flatten or repair (each takes the PDF the step before made and makes the next one); inspect or outline (a JSON report: last step only)."},"params":{"type":"object","description":"That operation's own parameters, exactly as its single route takes them (e.g. {\"angle\": 90, \"pages\": \"1-2\"} for rotate), without url or pdf_base64.","additionalProperties":true}},"additionalProperties":false},"maxItems":10,"minItems":1,"description":"The operations to run in order, 1 to 10 of {op, params}: the output of each is the input of the next. inspect and outline return a report and can only be last. The whole call has one 70 s time budget."},"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."}}},"responseSchema":{"type":"json","example":{"file":{"name":"bookmarked.pdf","bytes":53412,"pages":3,"data_base64":"JVBERi0xLjcKJb/3... (trimmed: 71,216 base64 characters in the reply)","content_type":"application/pdf"},"steps":[{"op":"extract-pages","step":1,"pages":3,"output_bytes":52010,"active_content_removed":{}},{"op":"resize","mode":"fit","size":"a4","step":2,"pages":3,"output_bytes":52960,"resized_pages":3,"sizes_truncated":false,"active_content_removed":{}},{"op":"set-outline","step":3,"pages":3,"replaced":false,"output_bytes":53412,"outline_depth":1,"outline_items":1,"active_content_removed":{}}],"operation":"pipeline","steps_run":3,"input_bytes":140815,"input_pages":6,"output_bytes":53412,"untrusted_content":true,"active_content_removed":{}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_hmKfi6bMRUsjSa8yc1KVw","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs a multi-step PDF processing pipeline (rotate, crop, resize, extract pages, set outlines, flatten, repair, inspect, etc.) on a PDF supplied by URL or base64.","exampleAgentPrompt":"Take this PDF (https://example.com/report.pdf), extract pages 1–3, resize them to A4, and then add a bookmark outline — return the final file as a base64-encoded PDF.","exampleUseCases":[{"title":"Trim and resize report for printing","prompt":"I have a 20-page PDF report at https://example.com/annual-report.pdf — can you extract just pages 5 through 12, resize them all to A4, and give me the resulting file as a download link?"},{"title":"Repair and flatten fillable form","prompt":"This PDF form at https://example.com/form.pdf seems corrupted and has interactive fields — please repair it and then flatten it so the field values are baked in, return it as base64."},{"title":"Inspect PDF outline and page structure","prompt":"Can you run a pipeline on https://example.com/manual.pdf to inspect its structure and give me a JSON report of its outline and page count — I just want the report, not a new file."}],"resultDescription":"Returns a JSON object containing the processed PDF (inline as base64 or as a 24-hour download URL with metadata), plus a per-step report including op name, step number, output bytes, page count, and any active content removed. Also includes totals for input pages, input bytes, output bytes, and number of steps run.","failureModes":["PDF URL is private, internal, or IP-literal — request refused","PDF exceeds 20 MB (URL) or 10 MB decoded (base64) — rejected","More than 10 steps specified — validation error","inspect or outline step is not the last step — rejected","Pipeline times out after 70 seconds — timeout error","Malformed or unreadable PDF — repair op required or error returned","Invalid op name in steps array — validation error","Both url and pdf_base64 omitted or both provided — ambiguous input error"],"whenToPreferThis":"Choose this endpoint when you need to chain multiple PDF operations (up to 10) in a single API call rather than making separate requests for each transformation. It is ideal for workflows like extract-then-resize-then-bookmark or repair-then-flatten. Prefer this over single-operation PDF endpoints when the task has two or more sequential steps, or when you want a unified step-by-step audit report of all operations applied.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T12:46:07.282Z","isFirstParty":false,"canonicalSlug":"tanod-docs-pdf-pipeline-0ef1cf4e"}