Convert a document to Markdown (MarkItDown)
job_doc_to_markdownConverts one document (PDF with a text layer, DOCX, PPTX, XLSX, XLS, HTML, CSV, JSON, XML, EPUB, TXT; sent as base64) to Markdown with Microsoft MarkItDown, keeping headings, lists and tables. Use it to feed a document's content to a model or search index as clean Markdown. Use job_ocr_tesseract instead for scanned PDFs or images without a text layer (they come back empty here, not charged). Use job_site_render instead for a live web page that needs JavaScript. Cost: at most $0.00006268 per call (measured CPU time), debited from your balance; an empty result or failed run is free. Auth: Authorization: Bearer (POST https://api.gaents.com/v1/accounts, $0.10 free credit); with no key the call returns a signed 402 quote payable in BSV or USDC via x402. Errors (isError, error.code): 400 missing_param/bad_param, 401 bad_api_key, 402 low balance, 429 busy (retry in seconds), 503 job_unavailable, 502 job_failed (refunded).
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": {
"file_b64": "<file_b64>",
"filename": "<filename>"
},
"name": "job_doc_to_markdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_b64 | Yes | The document file's bytes, base64-encoded, no data: prefix. (at most 3000000 bytes decoded) | |
| filename | Yes | The document's file name; its extension (pdf, docx, pptx, xlsx, xls, html, htm, csv, json, xml, epub, txt, md) picks the converter. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| empty | Yes | true = nothing found, not charged | |
| output | Yes | {markdown, chars, truncated, title} | |
| source | No | ||
| charged | No | ||
| measured | No | wall seconds of this run | |
| charged_usd | Yes | ||
| receipt_quote_id | Yes |