{"uid":"cap_vgj6OvN4jjFiyh3D--yj8","slug":"compute-revenue-lab-pdf-processing-budget-preflight-4e5a1640","name":"Compute Revenue Lab — PDF Processing Budget Preflight","description":"Estimate OCR pages and deterministic work units so an agent can choose a cheaper document pipeline.","url":"https://x402.bakdupoffroad.com/v1/document/processing-budget","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"pdfBase64":{"type":"string","description":"A base64-encoded PDF, up to the service's advertised decoded-size limit. Customer text is never returned or retained.","contentEncoding":"base64","contentMediaType":"application/pdf"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.012","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.012/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.012","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.012","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0WvmK-8jPSHFSVRAiwJ6Q","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.012","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes a base64-encoded PDF to produce a processing budget: page profiling, OCR cost estimation, and recommended extraction pipeline, paid per call via x402 USDC on Base.","exampleAgentPrompt":"Before I run full text extraction, can you preflight this PDF and tell me how many pages will need OCR, how many are already selectable, and what pipeline you'd recommend — here's the base64-encoded file.","exampleUseCases":[{"title":"Pre-extraction cost estimation for invoices","prompt":"I have a batch of invoice PDFs and want to know how many pages will need OCR before I commit to processing them — can you preflight this one and tell me the work units and recommended pipeline?"},{"title":"Classify document before routing to pipeline","prompt":"I need to figure out if this PDF is a scanned document or has selectable text so I can route it to the right extraction workflow — can you run a processing budget analysis on it?"},{"title":"Audit PDF fingerprint and page profile","prompt":"Can you analyze this PDF and give me a SHA-256 fingerprint along with a breakdown of sparse, selectable, and OCR-needed pages so I can log it before archiving?"}],"resultDescription":"Returns a JSON object with a job ID, document SHA-256 hash, page count, document family classification (e.g. selectable_pdf), and a detailed budget breakdown including work units, form fields, sparse pages, profiled pages, selectable pages, estimated OCR pages, avoided full-OCR pages, a truncation flag, and the recommended extraction pipeline. Also includes economics: net, energy, revenue, and platform fee in micro-USD.","failureModes":["Malformed or non-base64 input returns a 400 validation error","PDF exceeds the service's size limit, resulting in rejection","Payment not accepted or USDC balance insufficient, returning 402","Network timeout if the PDF is very large and profiling takes too long","Corrupt or password-protected PDF may cause processing failure with an error job status"],"whenToPreferThis":"Use this endpoint when you need a lightweight, cheap preflight analysis of a PDF before committing to a full OCR or extraction pipeline. It is ideal for cost estimation, pipeline routing decisions, and document fingerprinting. Prefer it over directly running full OCR when you want to avoid unnecessary compute costs on already-selectable documents.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:33:34.882Z","isFirstParty":false}