pixo.tools
x402 · HTTP 402USDC on Base + SolanaFiles never stored

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.

Base URLhttps://api.pixo.toolsDiscovery catalog

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.

01

Request

Your agent POSTs a file to an endpoint with no payment header.

02

Get a price

The server replies 402 with the exact price — for PDFs, computed from the page count — on both chains.

03

Pay

The wallet signs a USDC payment and retries the same request with an X-PAYMENT header.

04

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
EndpointDoesPrivacyPrice
POST /v1/image/compressCompress or convert (JPEG · PNG · WebP)in-process$0.005
POST /v1/image/resizeResize — contain · cover · fillin-process$0.005
POST /v1/image/cropCrop to an exact rectanglein-process$0.005
POST /v1/image/rotateRotate 90° · 180° · 270°in-process$0.005
POST /v1/image/flipMirror horizontally or verticallyin-process$0.005
POST /v1/image/ocrExtract text (JPEG · PNG · WebP — no GIF)→ Gemini$0.02

PDFs

Priced per page of the input · both chains
EndpointDoesPrivacyPrice
POST /v1/pdf/compressShrink — lossless · balanced · maxin-process$0.005 / page
POST /v1/pdf/splitSplit into page ranges → ZIPin-process$0.005 / page
POST /v1/pdf/mergeMerge 2–20 PDFs → onein-process$0.005 / page
POST /v1/pdf/merge-compressMerge then compress in one call — bundlein-process$0.008 / page
POST /v1/pdf/pagesSelect · reorder · delete · rotate pagesin-process$0.005 / page
POST /v1/pdf/protectPassword-protect with AES-256in-process$0.005 / page
POST /v1/pdf/unlockRemove a password you supply — flatin-process$0.02 flat
POST /v1/pdf/extractText → JSON with a likelyScanned flagin-process$0.01 / page
POST /v1/pdf/imagesPull embedded images → ZIP of PNGsin-process$0.01 / page
POST /v1/pdf/markdownConvert to Markdown for LLM / RAGin-process$0.02 / page
POST /v1/pdf/renderRender pages to PNG images → ZIP (36–300 dpi)in-process$0.01 / page
POST /v1/pdf/from-markdownTurn Markdown into a PDF — flatin-process$0.01 flat
POST /v1/pdf/ocrOCR a scanned PDF → text→ Gemini$0.03 / page
POST /v1/pdf/tablesEvery table → structured JSON→ Gemini$0.03 / page
POST /v1/pdf/structuredYour 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

402Payment required — the body lists the exact price on each chain. Pay and retry with X-PAYMENT.
400Bad parameters — invalid option, too many merge files or split ranges, or a PDF over a page cap.
413File too large (50 MB per file; 95 MB per merge request).
422Unprocessable input — not a valid PDF/image, corrupt, or password-protected. Rejected before payment.
503Document-AI not enabled on this deployment (the Gemini-backed endpoints only).
504Processing 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.

Frequently asked