API reference
Estimate credits
Price a conversion before running it: POST https://api.markitdown.ai/v1/convert/{name}/estimate takes the submit body and returns pages and credits per source without charging anything.
What an estimate does
Every convert endpoint has an estimate twin at the same path plus /estimate. It accepts exactly the request body the submit endpoint accepts, reads each source to count its pages, and returns the credits the conversion would cost. It never creates a conversion, never reserves or spends credits, and deletes anything it had to stage to read the source.
Markdown to HTML and Markdown to Text cost no credits, so their estimates always return 0; they exist so one client can price any conversion the same way.
Estimate endpoints
| Conversion | Estimate endpoint |
|---|---|
| Excel to Markdown | POST /v1/convert/excel/estimate |
| HTML to Markdown | POST /v1/convert/html/estimate |
| Image to Markdown | POST /v1/convert/image/estimate |
| Markdown to HTML | POST /v1/convert/markdown/html/estimate |
| Markdown to Text | POST /v1/convert/markdown/text/estimate |
| PDF to Markdown | POST /v1/convert/pdf/estimate |
| PowerPoint to Markdown | POST /v1/convert/powerpoint/estimate |
| Text to Markdown | POST /v1/convert/text/estimate |
| URL to Markdown | POST /v1/convert/url/estimate |
| Word to Markdown | POST /v1/convert/word/estimate |
Request
Send the body you would send to the submit endpoint: a multipart file or files, JSON url/urls, text/texts, or references to earlier files and completed uploads. Options such as pages or ocr change the estimate the same way they change the conversion.
curl -X POST https://api.markitdown.ai/v1/convert/pdf/estimate \
-H "x-api-key: $MARKITDOWN_API_KEY" \
-F file=@report.pdfResponse
sources[]required | array | One entry per source, in request order: name, pages and credits. |
credits_totalrequired | integer | Sum of credits across all sources. |
balancerequired | integer | The account's current credit balance, so you can compare it with credits_total. |
{
"sources": [
{
"name": "report.pdf",
"pages": 12,
"credits": 12
}
],
"credits_total": 12,
"balance": 1500
}What an estimate does not check
Plan limits. The per-file size limit, the page cap, the monthly file allowance and storage are checked only when you submit, so an estimate can succeed for a file the submit endpoint then rejects.
Your balance. The estimate returns
balancebut does not fail whencredits_totalis higher; the submit endpoint returns402 insufficient_creditsin that case.Scope and subscription do apply: an estimate needs the
readscope (a read-only key can price conversions) and an active Lite, Pro or Max subscription; otherwise it returns403 scope_missingor403 subscription_required.
Sources and specs: RFC 9110: HTTP Semantics · RFC 7763: The text/markdown Media Type