DeckFlow Logo 开发者 DeckFlow 文档
开发者指南API 参考MCPCLI

文件转换器

文件转换器 (File Converter) 后端接口及具体任务参数规范,支持 HTML、Image、Keynote、Markdown、PDF、PPT/PPTX, Word 等格式之间的转换。

API 接口

文件转换任务是异步处理的。使用以下两个接口来创建和查询任务。点击右侧的“调试接口”打开交互式控制台。

POST /tools/tasks

创建一个异步转换任务。表单参数中 type 值对应相应的工具 ID。

GET /tools/tasks/:id

查询转换任务的执行状态,并在此任务完成后通过 result.url 获取最终输出的下载链接。

请求头

请求头 类型 是否必填 描述
Authorization String 是 Bearer <YOUR_API_KEY> — 您的开发者 API 密钥。
Content-Type String 是 (POST) 必须为 multipart/form-data。

POST 请求体参数 (Form Data)

参数名 类型 是否必填 描述
files File 是 要处理的源文件。支持上传多个文件。
type String 是 任务类型标识符。例如:convertor.ppt2pdf。
params String (JSON) 否 工具特定参数的 JSON 字符串。默认为空 JSON 字符串 "{}"。
notifyURL String 否 Webhook 回调 URL,用于接收任务状态更新通知。

任务参数说明

文件转换器分类下的具体任务类型标识、格式与大小限制、以及特定请求参数 (params) 如下:

工具名称 (UI 展示)Tool IDBackend Task 类型 (type)接受的格式扩展名 (accept)单个文件大小上限Special 参数名s (params)
HTML to PNGhtml2pngconvertor.html2png.html, .htm50 MB{}
*支持直接粘贴 HTML 代码作为文件输入*
HTML to PPTXhtml2pptxconvertor.html2pptx.html, .htm50 MB{"needEmbedFonts": boolean}
*是否在生成的 PPTX 中嵌入字体。支持粘贴 HTML*
Image to WebPimage-convert-webpimage.convertWebpimage/*100 MB{}
Keynote to HTMLkeynote2htmlconvertor.keynote2html.key300 MB{}
Keynote to Imagekeynote2imageconvertor.keynote2image.key300 MB{}
Keynote to PDFkeynote2pdfconvertor.keynote2pdf.key300 MB{}
Markdown to Imagemarkdown2pngconvertor.markdown2png.md, .markdown10 MB{}
*支持直接粘贴 Markdown 文本作为文件输入*
PDF to Imagepdf2imageconvertor.pdf2image.pdf300 MB{}
PPT to PPTXppt2pptxconvertor.ppt2pptx.ppt300 MB{}
PowerPoint to PDFppt2pdfconvertor.ppt2pdf.ppt, .pptx300 MB{}
PowerPoint to Imageppt2imageconvertor.ppt2image.ppt, .pptx300 MB{}
PowerPoint to Videoppt2videoconvertor.ppt2video.ppt, .pptx300 MB{}
Word to PDFdoc2pdfconvertor.doc2pdf.doc, .docx300 MB{}