PDF to Office
Sync conversion
Upload a PDF and receive the Office file download URL after parsing and conversion finish
POST
Python
This endpoint parses the PDF, generates the Office file, and keeps the connection open until the task succeeds, fails, or times out. On success,
download_url is a short-lived download URL.
Conversion parameters
- Choose
target_typebased on the PDF’s original file type: selectwordfor a PDF exported from Word andpptfor a PDF exported from PowerPoint. The wrong choice may reduce content-structure and layout fidelity. - When
target_typeisppt,layout_modemust belayout; thepptandflowcombination is rejected. - Only PDF files are supported. Each file can be up to 200MB and 300 pages. Provide exactly one of
fileandfile_url; for long-running or batch conversions, use async conversion.
Body
multipart/form-data
API 密钥,格式 sk-***
Example:
"sk-***"
PDF 文件,与 file_url 二选一;最大 200MB、300 页
PDF 的公开或有效预签名下载链接,与 file 二选一
目标文件类型。请根据 PDF 的原始文件类型选择:由 Word 导出的 PDF 选择 word,由 PPT 导出的 PDF 选择 ppt。选择错误可能影响内容结构和版式还原效果
Available options:
word, ppt 排版模式。Word 未传时默认 flow;PPT 未传时默认 layout,且 PPT 仅支持 layout
Available options:
flow, layout 
