extract_document
Extract text from PDFs and images as structured Markdown. Handles complex layouts, tables, handwriting, and math notation. Pay per page with Bitcoin Lightning.
Instructions
Extract text from PDFs and images as clean Markdown. Uses Mistral OCR — handles complex layouts, tables, handwriting, multi-column documents, and mathematical notation. Preserves document hierarchy in structured Markdown. 10 sats/page. Pay per request with Bitcoin Lightning — no API key or signup needed. Requires create_payment with toolName='extract_document' and quantity=pageCount for multi-page PDFs.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"paymentId": "<paymentId>",
"documentBase64": "<documentBase64>"
},
"name": "extract_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paymentId | Yes | Valid payment ID (must be paid) | |
| documentBase64 | Yes | Base64 encoded PDF or image | |
| modelId | No | Optional. Omit for default model. |