Reference
API Documentation
Convert PDF, Office, HTML, and image files to clean Markdown over a single REST endpoint. Use the official Python or TypeScriptSDK, or call the endpoint directly — authenticate with an API key and you're converting in one call.
Quickstart
#- 1Create an API key in your dashboard. The raw key (
sk_…) is shown once — store it securely. - 2Install an SDK (
pip install emdi/npm install emdi) or call the convert endpoint directly with your key as a Bearer token. - 3Read the Markdown from the JSON response. That's it.
Authentication
#Every request is authenticated with an API key passed as a Bearer token. Keys carry the permissions and monthly allowance of the account that created them.
Keep secret keys server-side. Treat a leaked key like a password — revoke it in the dashboard and issue a new one.
Convert a file
#Send multipart/form-data with a single file field. Files are converted and discarded immediately — never stored.
curl -X POST https://api.emdi.pw/api/v1/convert \ -H "Authorization: Bearer sk_your_key" \ -F "file=@document.pdf"
Response
{
"markdown": "# Title\n\nConverted content…",
"credits_used": 1,
"filename": "document.pdf",
"credits_remaining": 1862,
"credits_limit": 2000
}Supported file types
Maximum file size: 50 MB.
Check your usage
#Returns your current plan and allowance usage for the period.
curl https://api.emdi.pw/api/v1/me/usage \ -H "Authorization: Bearer sk_your_key"
Errors & rate limits
#Errors return a standard HTTP status with a JSON detail field. Allowance limits return 429 with a machine-readable code.
Ready to start?
Get an API key →