{"uid":"cap_VcUv32MTJoFslvudZ3rjs","slug":"tanod-docs-pdf-reorder-f2dad6ee","name":"Tanod Docs PDF Reorder","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/reorder?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."},"order":{"type":"array","items":{"type":"integer","maximum":500,"minimum":1},"maxItems":500,"minItems":1,"description":"The new page order as 1-based page numbers (at most 500), e.g. [3, 1, 2]. A page may be listed more than once (it is copied); a page that is not listed is left out. A number the document does not have is a 422 page_out_of_range."},"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":"reordered.pdf","bytes":73724,"pages":6,"data_base64":"JVBERi0xLjcKJb/3... (trimmed: 98,300 base64 characters in the reply)","content_type":"application/pdf"},"operation":"reorder","input_bytes":140815,"input_pages":6,"output_bytes":73724,"result_pages":6,"omitted_count":0,"omitted_pages":[],"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_LzIi5_Kt14P_2xzlQv-cP","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":"Rearranges, duplicates, or removes pages in a PDF by specifying a new 1-based page order array","exampleAgentPrompt":"Can you reorder the pages of this PDF so they go 3, 1, 2 — here's the file as a URL: https://example.com/mydoc.pdf — and give me back a download link instead of the raw base64?","exampleUseCases":[{"title":"Reverse page order for print","prompt":"I have a scanned PDF at https://example.com/scanned-report.pdf with 6 pages and I need the pages in reverse order — so 6, 5, 4, 3, 2, 1. Can you reorder them and send back a download link?"},{"title":"Remove cover page from report","prompt":"This 10-page PDF at https://example.com/annual-report.pdf has a blank cover page as page 1. Can you give me back just pages 2 through 10 in order, as a base64 PDF?"},{"title":"Duplicate a page for a booklet","prompt":"I need page 3 of this PDF to appear twice — once in its normal position and once at the end — so the new order should be 1, 2, 3, 4, 3. The file is at https://example.com/booklet.pdf. Return a download link please."}],"resultDescription":"Returns a JSON object containing the reordered PDF either as inline base64 data or a 24-hour download URL, plus metadata: file name, byte size, page counts (input and output), list of any omitted pages, and a flag indicating whether untrusted/active content was removed from the PDF.","failureModes":["422 page_out_of_range — a page number in the order array exceeds the document's actual page count","PDF exceeds 20 MB (URL) or 10 MB decoded (base64) — request rejected","Private, internal, or IP-literal host URLs are refused","Malformed or password-protected PDFs may fail to process","Neither url nor pdf_base64 provided — request invalid","order array is empty or exceeds 500 items"],"whenToPreferThis":"Use this endpoint when you need to programmatically rearrange, remove, or duplicate pages within an existing PDF without re-generating content. It is the right choice when the input is already a PDF and the goal is purely structural reorganization. It handles large files (up to 20 MB via URL) and strips active/untrusted content as a safety measure, making it suitable for processing PDFs from untrusted sources.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T12:39:14.179Z","isFirstParty":false,"canonicalSlug":"tanod-docs-pdf-reorder-f2dad6ee"}