ParseAPI

A pay-per-request API that turns documents into token-compressed JSON structure for AI agents. Agents pay fractions of a cent in USDC over the x402 protocol. Raw document content is never stored.

When to use it

Use it when you need the shape of a document (headings, tables, fields, transcript timestamps) without sending the whole file through a large language model. It saves tokens and keeps the raw content off disk.

Supported formats and pricing

FormatPriceExtracted structure
pdf$0.001headings, tables, paragraphs, page count
docx$0.001headings[level], tables, paragraphs, comments/footnotes flags
pptx$0.001slides, speaker notes, per-slide tables/images/alt
xlsx$0.001sheet_names, per-sheet columns/rows, formulas vs values
csv$0.001columns, rows, delimiters
html$0.001headings, links, tables, cleaned content (nav/script stripped)
eml$0.001from, to, cc, date, subject, messages (thread-deduped), attachments
msg$0.001same as eml (Outlook .msg)
log$0.001lines, timestamps, stack_traces, severity counts, grouped events
image$0.002OCR words, confidence, blocks, text coordinates (tesseract)
zip$0.002file inventory, total_bytes, recursive parse of inner files
audio$0.005 / minwhisper transcript segments + timestamps (duration-priced)
video$0.01 / minwhisper transcript of the AUDIO TRACK + timestamps (duration-priced)

Reads (/search, /memory) = $0.001. Max upload 200 MB. Audio/video are priced by actual decoded duration, not file size.

Choose the endpoint by type (each is its own x402 resource with its own advertised price): POST /parse/document ($0.001), POST /parse/image ($0.002), POST /parse/audio ($0.005/min), POST /parse/video ($0.01/min), POST /parse/archive ($0.002). A legacy POST /parse auto-detects the type.

Payment: x402 v2 (HTTP 402 transport)

  1. 1. Send the request WITHOUT an X-PAYMENT header.
  2. 2. Server replies HTTP 402 with a base64-encoded PAYMENT-REQUIRED RESPONSE header (PaymentRequired: scheme, network, amount, asset, payTo, maxTimeoutSeconds).
  3. 3. Client signs a USDC micropayment to payTo and retries with an X-PAYMENT request header.
  4. 4. Server verifies and settles via the authenticated Coinbase CDP facilitator; the settlement result is returned in an X-PAYMENT-RESPONSE header.

Client SDK: @x402/fetch (wrapFetchWithPaymentFromConfig) with @x402/evm ExactEvmScheme and a viem account. The private key lives ONLY in the client, never in this service or its documentation.

Network: eip155:8453 (Base mainnet), asset USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913.

Example: parse a PDF

curl -s -X POST https://parseapi.info/parse \
  -H "Authorization: Bearer <tenant_secret>" \
  -H "X-Filename: invoice.pdf" \
  --data-binary @invoice.pdf

First call returns HTTP 402 with a base64 PAYMENT-REQUIRED header. Decoded:

{
 "x402Version": 2,
 "error": "Payment required",
 "resource": {
  "url": "https://parseapi.info/parse",
  "description": "Parse document to structure"
 },
 "accepts": [
  {
   "scheme": "exact",
   "network": "eip155:8453",
   "amount": "1000",
   "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
   "payTo": "0x9952522E50C9cE639254939153595142b2024c2E",
   "maxTimeoutSeconds": 300,
   "extra": {
    "name": "USDC",
    "version": "2"
   }
  }
 ]
}

After paying, the response is:

{
 "ok": true,
 "format": "pdf",
 "doc_kind": "invoice_like",
 "fields": [
  "currency",
  "invoice_terms",
  "totals",
  "dates"
 ],
 "tokens": 120,
 "content": "Invoice #A-1042 Total: $1,250.00 Due: 2026-02-01",
 "structure": {
  "pages": 1,
  "fields": [
   "currency",
   "totals",
   "dates"
  ]
 },
 "x402": {
  "paid": true,
  "format": "pdf",
  "price": 0.001
 }
}

Example: extract an email thread (no repeated quoted text)

Quoted replies are deduplicated; messages counts the distinct messages.

{
 "ok": true,
 "format": "eml",
 "doc_kind": "invoice_like",
 "fields": [
  "currency",
  "invoice_terms"
 ],
 "tokens": 19,
 "content": "Hi Bob, please find attached the Q3 invoice totaling $1,250.00 due Feb 1.",
 "structure": {
  "subject": "Q3 invoice follow-up",
  "from": "Alice <[email protected]>",
  "to": "Bob <[email protected]>",
  "cc": "Carol <[email protected]>",
  "date": "2026-10-06T09:12:00Z",
  "messages": 2,
  "attachments": []
 },
 "meta": {
  "engine": "mailparser",
  "has_attachments": false
 },
 "x402": {
  "paid": true,
  "format": "eml",
  "price": 0.001
 }
}

Example: transcribe a video

Video transcription extracts the audio track and returns timestamped transcript segments. It is not visual understanding: it does not analyze image content, objects, or on-screen text in frames (for that, use an image/OCR or vision model; screenshots go through the image OCR path).

{
 "ok": true,
 "format": "video",
 "doc_kind": "document_like",
 "tokens": 6,
 "content": "Welcome back to the quarterly earnings call.",
 "structure": {
  "segments": 1,
  "duration": 38,
  "timestamps": [
   {
    "start": 0,
    "end": 38
   }
  ]
 },
 "meta": {
  "engine": "faster-whisper",
  "transcript": true
 },
 "x402": {
  "paid": true,
  "format": "video",
  "price": 0.01,
  "duration_min": 1
 }
}

Audio example (a 145s clip, priced $0.015 for 3 minutes):

{
 "ok": true,
 "format": "audio",
 "doc_kind": "document_like",
 "tokens": 9,
 "content": "Your total for this billing period is one thousand two hundred fifty dollars.",
 "structure": {
  "segments": 8,
  "duration": 143,
  "timestamps": [
   {
    "start": 120,
    "end": 122
   }
  ]
 },
 "meta": {
  "engine": "faster-whisper",
  "transcript": true
 },
 "x402": {
  "paid": true,
  "format": "audio",
  "price": 0.015,
  "duration_min": 3,
  "duration_sec": 146
 }
}

Example: OCR an image

Returns recognized words with confidence and text coordinates. For on-screen text in a screenshot, use this endpoint (not video).

{
 "ok": true,
 "format": "image",
 "doc_kind": "document_like",
 "tokens": 128,
 "content": "RECEIPT TOTAL $42.99 THANK YOU",
 "structure": {
  "words": 128,
  "confidence": 0.82,
  "blocks": 7,
  "coordinates": [
   {
    "t": "RECEIPT",
    "x": 40,
    "y": 12
   },
   {
    "t": "TOTAL",
    "x": 40,
    "y": 210
   }
  ]
 },
 "meta": {
  "engine": "tesseract",
  "ocr": true
 },
 "x402": {
  "paid": true,
  "format": "image",
  "price": 0.002
 }
}

Example: parse a ZIP archive

Returns a file inventory and recursively parses supported files inside.

{
 "ok": true,
 "format": "zip",
 "doc_kind": "document_like",
 "tokens": 340,
 "content": "Invoice #A-1042 Total: $1,250.00",
 "structure": {
  "files": 12,
  "total_bytes": 20480,
  "inventory": [
   "invoice.pdf",
   "data.csv",
   "notes.txt"
  ],
  "parsed": [
   "invoice.pdf",
   "data.csv"
  ]
 },
 "meta": {
  "engine": "adm-zip",
  "recursive": true
 },
 "x402": {
  "paid": true,
  "format": "zip",
  "price": 0.002
 }
}

Example: search and memory (reads)

POST /search parses the uploaded bytes and returns the top-5 most similar structures you have stored. GET /memory lists your tenant’s last 20 stored structures (fingerprints + doc-kind only, never raw content).

{
 "ok": true,
 "format": "pdf",
 "matches": [
  {
   "id": 7,
   "doc_kind": "invoice_like",
   "similarity": 0.98,
   "confirmations": 3,
   "source": "private"
  }
 ]
}
{
 "ok": true,
 "tenant": "acme",
 "authed": true,
 "items": [
  {
   "id": 7,
   "doc_kind": "invoice_like",
   "schema_hint": {
    "format": "pdf"
   },
   "confirmations": 3,
   "created_at": "2026-10-06T09:12:00Z"
  }
 ]
}

Client example (x402 fetch, no keys in this doc)

import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

// Provide the private key from your OWN environment (e.g. process.env), never hard-coded.
const account = privateKeyToAccount(process.env.CLIENT_PRIVATE_KEY);
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }]
});

const res = await fetchWithPayment("https://parseapi.info/parse", {
  method: "POST",
  headers: { Authorization: "Bearer " + process.env.TENANT_SECRET, "X-Filename": "invoice.pdf" },
  body: await new Response(file).arrayBuffer()
});
const data = await res.json();

Privacy behavior

x402 Bazaar discovery

Each paid endpoint returns an extensions.bazaar block in its HTTP 402 response (method, body type, input, and a representative output example with JSON schema) so x402 Bazaar crawlers can index it. Endpoints are served through the authenticated Coinbase CDP facilitator, which powers Bazaar discovery.

Status: the endpoints pass Coinbase x402 validation (reachable, return 402, advertise a valid extensions.bazaar, accepted by the CDP facilitator). Validation is NOT indexing: a resource is indexed into the Bazaar only after at least one settled payment; featured status is a separate step.

Validate: curl -X POST https://api.cdp.coinbase.com/platform/v2/x402/validate -H "Content-Type: application/json" -d '{"resource":"https://parseapi.info/parse","method":"POST"}'

Discovery

This service publishes /llms.txt, /openapi.json, and an MCP server to help agents discover and use it. Each paid endpoint also advertises x402 Bazaar discovery metadata (an extensions.bazaar block in its HTTP 402 response) describing its method, input, output schema and example, served through the authenticated Coinbase CDP facilitator. Presence on a domain does NOT automatically connect AI clients: discovery depends on agents using search engines or compatible registries (e.g. the x402 Bazaar, MCP Registry). The endpoints pass Coinbase x402 validation, but Bazaar indexing requires at least one settled payment and is not guaranteed by this service alone.

Machine-readable

/openapi.json (OpenAPI 3.1) and /llms.txt (concise agent index).

MCP server

A stdio MCP server wraps the API as three tools: parse_file, search_structures, list_memory. Add it to any MCP client (Claude Desktop, Agent Zero, etc.):

{
 "mcpServers": {
  "parseapi": {
   "command": "node",
   "args": [
    "mcp-server.js"
   ],
   "env": {
    "X402_API_URL": "https://parseapi.info",
    "X402_TENANT_ID": "your-tenant",
    "X402_PAYMENT": ""
   }
  }
 }
}

Uploads and payments are handled by the client under its own configured permissions and budget; the file can be passed as base64 or a URL. The server is not yet published to the official MCP Registry.

Home