Create Async Document Parsing Task

Create a document parsing task, supporting multiple file formats, and outputting Markdown and JSON.

POST/v1/files/parser/tasks

Authorization

AuthorizationstringheaderRequired
HTTP: Bearer Auth
  • Security Scheme Type: http
  • HTTP Authorization Scheme: Bearer API_key,Used to verify account information, can be viewed in Project Management > API Key .

Request Header

Content-Typeenum<string>Default:application/jsonRequired

The media type of the request body, please set it toapplication/jsonto ensure the correct format of the requested data.

Available options:application/json

Request Bodyapplication/json

file_id string Required

The file_id of the document to be processed, obtained through the file upload API.

  • Uploaded file format must be: md,docx,doc,pdf,txt,html,htm,csv,xls,xlsx,ppt,pptx,jpeg,png,jpg
  • The file size limit is 300 MB for PDF files and 50 MB for all other formats.

model enum<string> Required

Model code. Available options: u1-ocr-parser.

start_page_id integer

Start page number, effective when passing PDF, defaults to the first page.

end_page_id integer

End page number, effective when passing PDF, defaults to processing to the last page.

Response Body Structure

task_idstring

The ID of the current task

base_respobject

Status code and details of this request

base_resp.status_codeinteger

Status code (0=normal; 100001=parameter error; 100101=authentication failed; 100501=triggered RPM rate limit; 100999=internal system error)

base_resp.status_msgstring

Status details