{"uid":"cap_HJpzlUC_05BpGL-bMFzu3","slug":"tanod-docs-pdf-remove-pages-a8bb5f8e","name":"Tanod Docs – PDF Remove Pages","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/remove-pages?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."},"pages":{"type":"string","pattern":"^[0-9a-zA-Z ,\\-]+$","maxLength":200,"minLength":1,"description":"1-based pages to remove: N, N-M, N- (to the end), -M, last; comma separated."},"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":"removed.pdf","bytes":51782,"pages":1,"data_base64":"JVBERi0xLjcKJb/3... (trimmed: 69,044 base64 characters in the reply)","content_type":"application/pdf"},"operation":"remove-pages","input_bytes":140815,"input_pages":6,"output_bytes":51782,"untrusted_content":true,"active_content_removed":{}}},"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_VcD_Ns1ds9C63lmETmTRk","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":"Removes specified pages from a PDF document and returns the modified PDF as base64 or a download URL","exampleAgentPrompt":"Can you remove pages 1, 3, and 5-7 from this PDF at https://example.com/report.pdf and give me the result as a download link?","exampleUseCases":[{"title":"Strip cover page from report PDF","prompt":"Take this PDF at https://files.example.com/annual-report.pdf and remove the first page — it's just a cover I don't need — and return a download link for the stripped version."},{"title":"Delete confidential appendix pages","prompt":"I need to remove pages 8 through the end of this PDF (here's the base64) before I share it with clients — can you do that and give me the cleaned file back as base64?"},{"title":"Remove blank filler pages from scanned document","prompt":"This scanned PDF at https://storage.example.com/contract-scan.pdf has blank pages at positions 2, 4, and 6. Please remove those and send back a download link so I can share just the content pages."}],"resultDescription":"Returns a JSON object containing the modified PDF either as inline base64 (file.data_base64) or a 24-hour download URL, along with metadata including the output file name, byte size, page count, and content type. Also includes input_bytes, input_pages, output_bytes, and a flag indicating whether active/untrusted content was removed.","failureModes":["PDF URL is private, internal, or uses an IP-literal host — request refused","PDF exceeds 20 MB (URL) or 10 MB decoded (base64) — size limit error","Invalid page range syntax in 'pages' field — validation error","URL is unreachable or returns a non-PDF — fetch error","PDF is password-protected or encrypted — processing failure","Page numbers out of range for the actual document — error or no-op"],"whenToPreferThis":"Use this endpoint when you need to programmatically remove specific pages from a PDF — by number, range, or keywords like 'last' — without converting the document to another format. It is well-suited for automation pipelines where PDFs need to be sanitized, trimmed, or prepared before sharing. Prefer this over general PDF editing tools when you need a lightweight, API-driven solution that returns the result inline or as a temporary download link, especially when operating within an AI agent workflow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T12:46:02.478Z","isFirstParty":false,"canonicalSlug":"tanod-docs-pdf-remove-pages-a8bb5f8e"}