Others

L016 Document Parsing

Run layout detection and OCR on the uploaded file. The file type is inferred from the filename extension. Supported types: png, jpg, jpeg, pdf, doc, docx, ppt, pptx, xls, and xlsx. Each file must not exceed 20 MB or 200 pages; a request times out if processing exceeds 300 seconds and returns the image link is a signed link with a validity period of 7 days. output_format is optional and defaults to markdown.

post/rd-llm/v1/documents/doc_parsing

Request

Request body multipart/form-data

filestring required

File to parse. Supported types: png, jpg, jpeg, pdf, doc, docx, ppt, pptx, xls, and xlsx. Each file must not exceed 20 MB or 200 pages.

output_formatstring

Output format: both returns structured JSONL data and Markdown; jsonl returns structured JSONL data only; markdown returns Markdown only. The returned image link is a signed link with a validity period of 7 days. Defaults to markdown if not specified.

Example request

{
  "file": "maximum 20MB",
  "output_format": "markdown"
}

Response

Successful l016 document parsing response.

statusstring required

The request completed successfully.

error_msgstring required

Always success on success.

error_codeinteger required

Always 0 on success.

Example response

{
  "data": {
    "state": "success",
    "results": [
      {
        "url": "https://oss.example.com/doc/0_2.png?sign=...",
        "bbox": [
          0.16,
          0.18,
          0.37,
          0.2,
          0.9
        ],
        "type": "text"
      }
    ],
    "markdown": "TECHNICAL FIELD\n\nThe present disclosure relates to...",
    "file_type": "pdf",
    "total_pages": 12
  },
  "status": "success",
  "error_msg": "success"
}

Changes

No recorded changes to this operation across all 1 revision of this API.