API 文档
将文件转Markdown功能集成到您的工作流程中
认证
在每个请求的 X-Api-Key 标头中包含您的 API 密钥。
X-Api-Key: tmd_your_api_key_here获取 API 密钥
发送包含电子邮件的 POST 请求以获取 API 密钥。
curl -X POST https://api.tomdnow.com/api/v1/keys \
-H "Email: you@example.com"响应格式:
{
"api_key": "tmd_abc123...",
"tier": "free",
"daily_limit": 50
}转换文件
使用 API 密钥上传文件以获取 Markdown 输出。
curl -X POST https://api.tomdnow.com/api/v1/convert \
-H "X-Api-Key: tmd_your_api_key" \
-F "file=@document.pdf"响应格式
API 返回包含转换后的 Markdown 和元数据的 JSON 对象。
{
"markdown": "# Document Title\n\nConverted content...",
"metadata": {
"title": "document",
"type": "pdf",
"size": 102400
},
"api_usage": {
"tier": "free",
"daily_remaining": 47
}
}速率限制
API 请求有每日限制。
Free: 每天 50 次请求
支持的格式
PDF, DOCX, PPTX, XLSX, XLS, HTML, EPUB, CSV, JSON, XML, MSG, IPYNB, ZIP, HWP, HWPX, RTF, TXT, JPG, PNG, GIF, WebP