工具 API

文件解析(同步)

创建文件解析任务,支持多种文件格式和解析工具。见 文件解析服务。点击 Try it 按钮可快速试用。

post/paas/v4/files/parser/sync

Request

  • Base URL
    https://open.bigmodel.cn/api
  • Auth
    HTTP bearer

Request body multipart/form-data

filestring binary required

待解析文件

tool_type'prime-sync' required

使用的解析工具类型

file_type'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'

文件类型支持: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'processing' | 'succeeded' | 'failed' required

任务处理状态

messagestring required

结果状态描述

contentstring nullable

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

task_idstring required

文件解析任务ID

parsing_result_urlstring nullable

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

Example response

{
  "status": "succeeded",
  "message": "结果获取成功",
  "content": "这是解析后的文本内容...",
  "task_id": "task_123456789",
  "parsing_result_url": "https://example.com/download/result.zip"
}

Changes

No recorded changes to this operation across all 3 revisions of this API.