Skip to main content
POST
/
paas
/
v4
/
files
/
parser
/
sync
文件解析(同步)
curl --request POST \
  --url https://open.bigmodel.cn/api/paas/v4/files/parser/sync \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form tool_type=prime-sync \
  --form file_type=WPS
{
  "status": "succeeded",
  "message": "结果获取成功",
  "task_id": "task_123456789",
  "content": "这是解析后的文本内容...",
  "parsing_result_url": "https://example.com/download/result.zip"
}

Authorizations

Authorization
string
header
required

使用以下格式进行身份验证:Bearer

Body

multipart/form-data
file
file
required

待解析文件

tool_type
enum<string>
required

使用的解析工具类型

Available options:
prime-sync
file_type
enum<string>

文件类型支持:pdf,docx,doc,xls,xlsx,ppt,pptx,png,jpg,jpeg,csv,txt,md,html,bmp,gif,webp,heic,eps,icns,im,pcx,ppm,tiff,xbm,heif,jp2

Available options:
WPS,
PDF,
DOCX,
DOC,
XLS,
XLSX,
PPT,
PPTX,
PNG,
JPG,
JPEG,
CSV,
TXT,
MD,
HTML,
BMP,
GIF,
WEBP,
HEIC,
EPS,
ICNS,
IM,
PCX,
PPM,
TIFF,
XBM,
HEIF,
JP2

Response

结果获取成功

status
enum<string>
required

任务处理状态

Available options:
processing,
succeeded,
failed
Example:

"succeeded"

message
string
required

结果状态描述

Example:

"结果获取成功"

task_id
string
required

文件解析任务ID

Example:

"task_123456789"

content
string | null

format_type=text时返回的解析文本内容

Example:

"这是解析后的文本内容..."

parsing_result_url
string | null

format_type=download_link时返回的结果下载链接

Example:

"https://example.com/download/result.zip"