Markdown Anything
Convert files to clean, structured Markdown using the Markdown Anything API. Supports PDF, DOCX, XLSX, PPTX, images, audio, and 25+ formats.
Setup
Set your API token as an environment variable. Get one from Settings > API Tokens in your Markdown Anything workspace.
CODEBLOCK0
When to Use
Use the mda-convert tool when the user asks to:
- - Convert a file to Markdown
- Extract text from a PDF, document, image, or audio file
- Turn a document into Markdown for use in a prompt or workflow
Tools
mda-convert
Converts a file to Markdown. Run scripts/convert.sh with the file path as the first argument.
Arguments:
- -
$1 — Path to the file to convert
Optional environment variables:
- -
MDA_ENHANCED_AI=true — Use Enhanced AI for scanned documents, images, and audio (costs extra credits) - INLINECODE4 — Include document metadata in the response
- INLINECODE5 — Optimize output for LLM token efficiency
Example:
CODEBLOCK1
The tool outputs the converted Markdown to stdout.
mda-credits
Check your remaining credit balance. Run scripts/credits.sh with no arguments.
Example:
CODEBLOCK2
Security & Privacy
- - Files are sent to
https://markdownanything.com/api/v1/convert for processing - Your API token is sent via the
Authorization header - No data is stored locally beyond the conversion result
- See Markdown Anything Privacy Policy for data handling details
Markdown Anything
使用 Markdown Anything API 将文件转换为干净、结构化的 Markdown 格式。支持 PDF、DOCX、XLSX、PPTX、图片、音频以及 25 种以上格式。
设置
将您的 API 令牌设置为环境变量。请从您的 Markdown Anything 工作区 的 设置 > API 令牌 中获取。
MDAAPITOKEN=mdayourtoken_here
使用场景
当用户要求执行以下操作时,请使用 mda-convert 工具:
- - 将文件转换为 Markdown
- 从 PDF、文档、图片或音频文件中提取文本
- 将文档转换为 Markdown 以便在提示词或工作流中使用
工具
mda-convert
将文件转换为 Markdown。运行 scripts/convert.sh,并将文件路径作为第一个参数。
参数:
可选环境变量:
- - MDAENHANCEDAI=true — 对扫描文档、图片和音频使用增强型 AI(消耗额外积分)
- MDAINCLUDEMETADATA=true — 在响应中包含文档元数据
- MDAOPTIMIZETOKENS=true — 针对 LLM 令牌效率优化输出
示例:
scripts/convert.sh /path/to/document.pdf
该工具将转换后的 Markdown 输出到标准输出。
mda-credits
检查您的剩余积分余额。运行 scripts/credits.sh,无需任何参数。
示例:
scripts/credits.sh
安全与隐私
- - 文件将被发送至 https://markdownanything.com/api/v1/convert 进行处理
- 您的 API 令牌通过 Authorization 标头发送
- 除转换结果外,不会在本地存储任何数据
- 有关数据处理详情,请参阅 Markdown Anything 隐私政策