Skip to content
clusters: prooflayer · edgemarket · edgefinance · synthforge · mediakit · wordmint · webprobe · locale · comppoint
$ man ocr

/ocr(1)

PRICE / CALL
$0.20
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
mediakit
CATEGORY
uncategorized
STATUS
live
NAME
ocr ocr / optical character recognition / scanned document extractor / image-pdf to text
synonym alias of pdf-to-markdown — reuses the canonical handler.
SYNOPSIS
POST https://x402.org/v1/ocr
     Content-Type: application/json
     X-PAYMENT:    <signed-transferWithAuthorization>

     { ... }
↳ first call → 402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.
DESCRIPTION

OCR / optical character recognition / scanned document extractor / image-PDF to text. Run OCR on scanned PDFs and image-based documents. Datalab Marker engine — preserves layout, tables, math. Returns clean Markdown or plain text. 30 pages max.

INPUTrequest schema
propertytypedescriptionreq?
pdf_urlstringPublic URL of a PDF file (http or https). Must be directly fetchable, not behind auth or a viewer redirect. Max 30 pages.required
output_formatstring'markdown' (default — best for LLM downstream), 'html' (preserves more layout structure), or 'json' (per-page blocks with type + bbox).
enum: markdown · html · json
optional
OUTPUTresponse shape
fieldtypedescription
markdownstringExtracted text from the document in Markdown format, preserving headings, tables, and math layout.
page_countstringNumber of pages processed from the input PDF or image document.
source_urlstringURL of the source PDF or image file that was passed in for OCR processing.
EXAMPLEStwo ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.org/v1/ocr \
  -H 'Content-Type: application/json' \
  -d '{ }'
first response = 402 Payment Required with payment requirements; sign + retry with X-PAYMENT.
EXAMPLE 2 · mcp
# install once
claude mcp add x402 --command "npx x402-deployer-mcp"

# then ask Claude Code:
# "use the ocr tool to ..."
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
tags
ocrmediakitpdf-extractionscanned-documentsimage-to-textmarkdown-extractiontable-extractiondatalab-marker
methods
POST
cluster
mediakit
price
$0.20 USDC per call
ADJACENTother endpoints in mediakit
endpointdescriptionprice
convert-pdfConvert PDF to Markdown, HTML, JSON, or structured text via Datalab Marker.$0.20
pdf-to-markdownAI PDF extractor: PDF to Markdown / HTML / structured JSON via Datalab Marker.$0.20
pdf-to-textPDF to text / extract text from PDF.$0.20
pdf2mdPDF to Markdown converter.$0.20
extract-tablesExtract tables from PDF / table extractor / PDF to CSV / spreadsheet from PDF.$0.10
mp4-to-mp3MP4 → MP3 audio extractor.$0.10
pdf-extract-tablesPDF table extractor / table from PDF / scanned-table parsing / financial-table OCR / multi-page table consolidator / Datalab Marker tables.$0.10
pdf-to-jpgPDF to JPG / PNG / WEBP image converter.$0.10
SEE ALSO
agentutility(7) · mediakit(7) · x402(7) · mcp(7) · llms.txt · registry.json · bazaar.x402.org