# Compute Revenue Lab — PDF Processing Budget Preflight

> Compute Revenue Lab — PDF Processing Budget Preflight is a paid API for AI agents from x402.bakdupoffroad.com, paid per call via x402, $0.012/call, status unknown (last checked 2026-09-13).

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.

## Facts

- Endpoint: POST https://x402.bakdupoffroad.com/v1/document/processing-budget
- Price: $0.012/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/compute-revenue-lab-pdf-processing-budget-preflight-4e5a1640
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vgj6OvN4jjFiyh3D--yj8

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability compute-revenue-lab-pdf-processing-budget-preflight-4e5a1640 -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Estimate OCR pages and deterministic work units so an agent can choose a cheaper document pipeline.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/compute-revenue-lab-pdf-processing-budget-preflight-4e5a1640/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.bakdupoffroad.com](https://www.zero.xyz/host/x402.bakdupoffroad.com/llms.txt)
