{"uid":"cap_IEydRUNr2otgghKfLhjse","slug":"tanod-docs-pdf-rasterize-21336993","name":"Tanod Docs PDF Rasterize","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/rasterize?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"dpi":{"type":"integer","default":150,"maximum":300,"minimum":36,"description":"36-300 (default 150)."},"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":{"anyOf":[{"type":"string","pattern":"^[0-9a-zA-Z ,\\-]+$","maxLength":200,"minLength":1},{"type":"null"}],"default":null,"description":"Pages to keep (default all; at most 20 per call). A closed selection of at most 5 pages is the lower price."},"format":{"enum":["jpeg","png"],"type":"string","default":"jpeg","description":"jpeg (default, smaller) or png (lossless)."},"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."},"grayscale":{"type":"boolean","default":false,"description":"Render in grayscale."},"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."},"jpeg_quality":{"type":"integer","default":85,"maximum":95,"minimum":30,"description":"JPEG quality (30-95, default 85)."}}},"responseSchema":{"type":"json","example":{"dpi":100,"file":{"name":"rasterized.pdf","bytes":10342,"pages":1,"data_base64":"JVBERi0xLjcKJb/3... (trimmed: 13,792 base64 characters in the reply)","content_type":"application/pdf"},"format":"jpeg","operation":"rasterize","rasterized":1,"input_bytes":13264,"input_pages":1,"output_bytes":10342,"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_fZPjrkU5fnNmBQjUjBMIB","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":"Converts PDF pages into raster images (JPEG or PNG) at a specified DPI, returning results as base64 or a temporary download URL","exampleAgentPrompt":"Rasterize page 1 of this PDF for me at 200 DPI as a PNG — here's the URL: https://example.com/report.pdf — and give it back as base64.","exampleUseCases":[{"title":"PDF thumbnail generation for preview","prompt":"Take this PDF at https://example.com/brochure.pdf and convert the first page to a JPEG image at 150 DPI so I can use it as a thumbnail preview on a website — return it as base64."},{"title":"Archiving scanned document as image","prompt":"I have a scanned legal document as a base64-encoded PDF — can you rasterize pages 1 through 5 at 300 DPI in PNG format and give me a download link so it stays out of my context window?"},{"title":"Grayscale render for email attachment","prompt":"Convert page 2 of my PDF report at https://example.com/quarterly.pdf into a grayscale JPEG at 100 DPI and 70 JPEG quality — I need the image inline as base64 for an email template."}],"resultDescription":"A JSON object containing the rasterized image either as a base64-encoded string or a temporary download URL (valid for 24 hours). The response includes metadata such as DPI used, format, number of pages rasterized, input and output byte sizes, and content type. When output mode is 'url', additional fields like expires_at, sha256, and file size are included instead of the base64 data.","failureModes":["PDF URL is private, internal, or IP-literal — request refused","PDF exceeds 20 MB via URL or 10 MB via base64 — rejected","More than 20 pages requested per call — rejected","DPI out of range (below 36 or above 300) — validation error","JPEG quality out of range (below 30 or above 95) — validation error","Malformed page selection string — validation error","PDF is corrupted or unreadable — processing error","URL is not publicly accessible or returns non-PDF content — error"],"whenToPreferThis":"Use this endpoint when you need to convert PDF pages into raster images (JPEG or PNG) at a controlled DPI, especially when you need the result inline as base64 or as a short-lived download URL. Prefer this over general-purpose document converters when you need fine-grained control over DPI, JPEG quality, grayscale rendering, and page selection. It is well-suited for generating PDF thumbnails, flattening PDFs for display, archiving documents as images, or preparing PDFs for OCR pipelines that require image input.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T12:45:45.204Z","isFirstParty":false,"canonicalSlug":"tanod-docs-pdf-rasterize-21336993"}