Skip to main content
POST
Python
This endpoint immediately returns a task_id. PDF parsing and Office conversion continue in the background.
  1. Submit the PDF through this endpoint.
  2. Save the task_id from the response.
  3. Pass the task_id to Async result query.
  4. Poll every 3–5 seconds until the status becomes succeeded or failed.
The target_type and layout_mode rules are the same as for sync conversion.
The initial status is usually parsing. The submit endpoint does not return the Office file download URL.

Body

multipart/form-data
api_key
string
required

API 密钥,格式 sk-***

Example:

"sk-***"

file
file

PDF 文件,与 file_url 二选一;最大 200MB、300 页

file_url
string<uri>

PDF 的公开或有效预签名下载链接,与 file 二选一

target_type
enum<string>
default:word

目标文件类型。请根据 PDF 的原始文件类型选择:由 Word 导出的 PDF 选择 word,由 PPT 导出的 PDF 选择 ppt。选择错误可能影响内容结构和版式还原效果

Available options:
word,
ppt
layout_mode
enum<string> | null

排版模式。Word 未传时默认 flow;PPT 未传时默认 layout,且 PPT 仅支持 layout

Available options:
flow,
layout

Response

202 - application/json

任务提交成功

code
integer

状态码,0 为成功,非 0 见错误码说明

Example:

0

message
string
Example:

"查询成功"

data
object