$ man doc-to-json
/doc-to-json
PRICE / CALL
$0.10
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
mediakitCATEGORY
uncategorized
STATUS
● live
NAME
doc-to-json — converts any document (pdf, docx, ppt, xlsx, or image) into structured json matching a caller-supplied schema
SYNOPSIS
POST https://x402.agentutility.ai/doc-to-json
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
Converts any document (PDF, DOCX, PPT, XLSX, or image) into structured JSON matching a caller-supplied schema. The file is converted to plain text via CloudConvert, then Morpheus mistral-31-24b runs with strict json_schema response_format to force the output shape. OCR-aware for images and scanned PDFs. Use it as a file parser with schema, invoice extractor, resume parser, contract extractor, RFP parser, receipt extractor, or form data extraction tool.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| file_url | string | Public URL of the file. Max 25MB. Supports PDF, DOCX, DOC, PPT, PPTX, XLSX, XLS, ODT, RTF, TXT, HTML, MD, JPG, PNG, GIF, TIFF, WEBP. | required |
| schema | object | JSON schema describing expected output. Must include 'properties'. | required |
| instructions | string | Optional extra extraction guidance. | optional |
| ocr | boolean | Force OCR. Defaults to true for images, false for text-native formats. | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| file_url | string | — |
| source_format | string | — |
| text_chars | string | — |
| extracted | string | — |
| model | string | — |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.agentutility.ai/doc-to-json \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# Install the MCP package for this endpoint's cluster npx -y @agentutility/mcp-<cluster> # Required: EVM private key with USDC on Base export X402_PRIVATE_KEY=0x... # Then call the doc-to-json tool from your MCP-aware agent.
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- mediakitdoctojsondoc-to-json
- methods
- POST
- cluster
- mediakit
- price
- $0.10 USDC per call
ADJACENT — other endpoints in mediakit
| endpoint | description | price |
|---|---|---|
| extract-tables | Detects and extracts every table from a PDF document, returning structured JSON or CSV per table. | $0.10 |
| pdf-extract-tables | Extracts every table from a PDF, digital or scanned, and returns row-by-column text matrices page-by-page. | $0.10 |
| pdf-table-extract | Extracts tables from digital or scanned PDFs, returning row/column matrices, CSV output, page numbers, and optional cell boxes. | $0.10 |
| pdf-table-extractor | Finds tables in digital or scanned PDFs and returns row-by-column matrices, page numbers, and optional cell bounding boxes. | $0.10 |
| pdf-to-jpg | Converts a PDF to JPG, PNG, or WEBP images, rendering every page at configurable DPI (36-600) and returning one image URL per page. | $0.10 |
| speaker-diarize | Speaker diarization / who-said-what transcription. | $0.10 |
| transcribe | Transcribe video to text. | $0.10 |
| video-summarize | Summarizes videos, podcasts, and lectures in one call: Whisper v3 transcribes, then Mistral summarizes. | $0.10 |
SEE ALSO