The file API that agents pay per call — no account, no keys.
Compress, convert, resize, extract, and OCR images and PDFs over plain HTTP. Payment is per request via the x402 protocol — USDC on Base or Solana. An agent gets a price, pays, and gets the result. No sign-up, no API key, no subscription.
How payment works
One request, one micropayment
x402 turns HTTP's dormant 402 Payment Requiredstatus into a real payment step. No account to create, no key to manage — the agent's wallet is the identity.
Request
Your agent POSTs a file to an endpoint with no payment header.
Get a price
The server replies 402 with the exact price — for PDFs, computed from the page count — on both chains.
Pay
The wallet signs a USDC payment and retries the same request with an X-PAYMENT header.
Get the result
The server verifies, processes, settles on-chain, and returns the output plus a receipt.
Standard x402 client libraries (x402-fetch, the x402 SDKs for JS/Python/Rust) handle steps 2–4 automatically — your agent just makes the request. Pricing is tamper-proof in both directions: the server re-reads the file and re-computes the price on the paid retry, so a payment for a 1-page quote can never be replayed against a 300-page file — and you're never charged more than the quote you paid.
Endpoints
Twenty-one operations across images and PDFs
Every endpoint takes multipart/form-data with a file field. The in-process chip means the file is decoded in memory and deleted the moment the response is sent. → Gemini marks the document-AI endpoints, which forward content to Google for model-based reading.
Images
Flat price per call · both chains| Endpoint | Does | Privacy | Price |
|---|---|---|---|
| POST /v1/image/compress | Compress or convert (JPEG · PNG · WebP) | in-process | $0.005 |
| POST /v1/image/resize | Resize — contain · cover · fill | in-process | $0.005 |
| POST /v1/image/crop | Crop to an exact rectangle | in-process | $0.005 |
| POST /v1/image/rotate | Rotate 90° · 180° · 270° | in-process | $0.005 |
| POST /v1/image/flip | Mirror horizontally or vertically | in-process | $0.005 |
| POST /v1/image/ocr | Extract text (JPEG · PNG · WebP — no GIF) | → Gemini | $0.02 |
PDFs
Priced per page of the input · both chains| Endpoint | Does | Privacy | Price |
|---|---|---|---|
| POST /v1/pdf/compress | Shrink — lossless · balanced · max | in-process | $0.005 / page |
| POST /v1/pdf/split | Split into page ranges → ZIP | in-process | $0.005 / page |
| POST /v1/pdf/merge | Merge 2–20 PDFs → one | in-process | $0.005 / page |
| POST /v1/pdf/merge-compress | Merge then compress in one call — bundle | in-process | $0.008 / page |
| POST /v1/pdf/pages | Select · reorder · delete · rotate pages | in-process | $0.005 / page |
| POST /v1/pdf/protect | Password-protect with AES-256 | in-process | $0.005 / page |
| POST /v1/pdf/unlock | Remove a password you supply — flat | in-process | $0.02 flat |
| POST /v1/pdf/extract | Text → JSON with a likelyScanned flag | in-process | $0.01 / page |
| POST /v1/pdf/images | Pull embedded images → ZIP of PNGs | in-process | $0.01 / page |
| POST /v1/pdf/markdown | Convert to Markdown for LLM / RAG | in-process | $0.02 / page |
| POST /v1/pdf/render | Render pages to PNG images → ZIP (36–300 dpi) | in-process | $0.01 / page |
| POST /v1/pdf/from-markdown | Turn Markdown into a PDF — flat | in-process | $0.01 flat |
| POST /v1/pdf/ocr | OCR a scanned PDF → text | → Gemini | $0.03 / page |
| POST /v1/pdf/tables | Every table → structured JSON | → Gemini | $0.03 / page |
| POST /v1/pdf/structured | Your JSON schema → typed JSON | → Gemini | $0.04 / page |
Free, no payment: GET /v1/health · /v1/openapi.json · /v1/discovery · /metrics. Every image endpoint also takes optional format/quality/colors fields, so one paid call can transform, convert, and compress together. Limits:files up to 50 MB; images up to 40 megapixels; merge up to 20 files / 95 MB total; the Gemini PDF endpoints (ocr/tables/structured) up to 30 pages; render up to 50 pages; structured schemas up to 16 KB.
The 402 handshake
What a request actually looks like
An unpaid request to a PDF endpoint returns the exact per-page price on both chains. A standard x402 client pays and retries automatically.
# Unpaid — ask a 3-page PDF what it costs curl -X POST https://api.pixo.tools/v1/pdf/extract \ -F "file=@report.pdf"
HTTP/1.1 402 Payment Required
// abridged — the real response also carries
// scheme, payTo, resource, and the USDC asset
{
"x402Version": 1,
"accepts": [
{ "scheme": "exact", "network": "base",
"maxAmountRequired": "30000" },
{ "scheme": "exact", "network": "solana",
"maxAmountRequired": "30000" }
]
}↳ 3 pages × $0.01 = $0.03, quoted on Base and Solana.
Privacy
Files are processed in memory and deleted on response
The same promise as the pixo.tools web app, applied to the API: uploads live only in RAM-backed scratch space, are erased the instant the response is sent, and are never written to disk or logged.
In-process by default
Compression, conversion, resize, and every deterministic PDF text / Markdown / image operation runs entirely on our server. Content never leaves the box.
Document AI is the disclosed exception
Four endpoints — image/ocr, pdf/ocr, pdf/tables, pdf/structured — send content to Google Gemini for model-based reading. Each is labeled, flagged in discovery, and priced accordingly.
Nothing to sign up for
No account means no stored profile, no email, no history. The only identifier in a request is the payment itself.
Status codes
What your agent branches on
| 402 | Payment required — the body lists the exact price on each chain. Pay and retry with X-PAYMENT. |
| 400 | Bad parameters — invalid option, too many merge files or split ranges, or a PDF over a page cap. |
| 413 | File too large (50 MB per file; 95 MB per merge request). |
| 422 | Unprocessable input — not a valid PDF/image, corrupt, or password-protected. Rejected before payment. |
| 503 | Document-AI not enabled on this deployment (the Gemini-backed endpoints only). |
| 504 | Processing timed out (60 s budget). Failed work is not charged. |
Discovery
Built for agents to find on their own
Agents don't need this page — they read the service directly. Every endpoint, price, and input/output schema is published in machine-readable form.