{"uid":"cap_7ZiHtW4NZBr5r24nvNdaO","slug":"miniframe-pdf-compressor-cb63a9f6","name":"MiniFrame PDF Compressor","description":"Use when a PDF is too large to email, upload or attach — Ghostscript compression an agent sandbox cannot run on its own. Send it either as JSON {pdf_base64} or as the raw PDF body (Content-Type: application/pdf), up to 30 MB. Optional query param mode=light|balanced|max (default balanced). Returns JSON with original_size, compressed_size, reduction_percent, warnings and pdf_base64 (the compressed file).","url":"https://tools.miniframe.com.br/compress-pdf","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"mode":{"enum":["light","balanced","max"],"type":"string","description":"Compression mode (query param, optional, default balanced)."},"pdf_base64":{"type":"string","description":"The PDF file encoded in base64 (JSON body). Max 30 MB decoded."}}},"responseSchema":{"type":"json","example":{"mode":"balanced","warnings":[],"pdf_base64":"JVBERi0xLjUK...","original_size":500000,"compressed_size":210000,"reduction_percent":58}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_vA2UndsLBcIbXL6NZA-Y9","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compresses a PDF file using selectable compression modes and returns the compressed file as base64-encoded JSON","exampleAgentPrompt":"Can you compress this PDF for me using max compression? It's about 15 MB and I need to reduce it as much as possible.","exampleUseCases":null,"resultDescription":"A JSON object containing: original_size (bytes), compressed_size (bytes), reduction_percent (float), warnings (array of strings), and pdf_base64 (the full compressed PDF as a base64 string ready for decoding and saving).","failureModes":["PDF exceeds 30 MB limit — returns error indicating file is too large","Invalid or corrupted PDF binary — returns parse/format error","Unsupported mode value — returns validation error for invalid enum","Empty request body — returns missing body error","Timeout on very complex or image-heavy PDFs near the size limit"],"whenToPreferThis":"Use this endpoint when you need to reduce the file size of an existing PDF without converting it to another format. Ideal when you want configurable compression levels (light/balanced/max) and need the compressed file returned inline as base64 JSON. Best for PDFs up to 30 MB where a reduction percentage report is also useful.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:32:13.773Z","isFirstParty":false}