tencent cloud

CreateReconstructDocumentFlow
Last updated: 2025-10-30 21:49:04
CreateReconstructDocumentFlow
Last updated: 2025-10-30 21:49:04

1. API Description

Domain name for API request: lke.intl.tencentcloudapi.com.

This API is used to initiate requests for this asynchronous API, for initiating document parsing tasks.
Document parsing supports converting images or PDF files into Markdown format files, and can parse content elements including tables, formulas, images, headings, paragraphs, headers, and footers, and intelligently convert the content into reading order.
During the trial period, the QPS limit for a single account is only 1. If you need to access officially, please contact our R&D team.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateReconstructDocumentFlow.
Version Yes String Common Params. The value used for this API: 2023-11-30.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-guangzhou.
FileType No String File type. Supported file types: pdf, doc, docx, ppt, pptx, md, txt, xls, xlsx, csv, png, jpg, jpeg, bmp, gif, webp, heic, eps, icns, im, pcx, ppm, tiff, xbm, heif, jp2.
FileBase64 No String The base64 value of the file. File size limit: the downloaded file does not exceed 8m after base64 encoding. File download time does not exceed 3 seconds. Supported image pixels: the length of a single side is between 20-10000px. Either FileUrl or FileBase64 of the file must be provided. If both are provided, only the FileUrl is used.
FileUrl No String

File URL. The file download time does not exceed 15 seconds. Supported image pixels: the length of a single side is between 20-10000px. It is recommended to store the file in Tencent Cloud as the URL where the file is stored in Tencent Cloud can ensure higher download speed and stability. External URL may affect the speed and stability. The downloaded file shall not exceed the supported file size after Base64 encoding:

File Type Supported File Size
PDF 200M
DOC 200M
DOCX 200M
PPT 200M
PPTX 200M
MD 10M
TXT 10M
XLS 20M
XLSX 20M
CSV 20M
PNG 20M
JPG 20M
JPEG 20M
BMP 20M
GIF 20M
WEBP 20M
HEIC 20M
EPS 20M
ICNS 20M
IM 20M
PCX 20M
PPM 20M
TIFF 20M
XBM 20M
HEIF 20M
JP2 20M
FileStartPageNumber No Integer When type of the uploaded file is pdf, doc, docx, ppt, or pptx, it specifies the starting page number for file recognition, including the current value. The default is 1, indicating recognition starts from the first page of the file.
FileEndPageNumber No Integer When type of the uploaded file is pdf, doc, docx, orppt, pptx, it specifies the end page number for file recognition, including the current value. The default is 100, indicating recognition up to page 100 of the file. a single call supports recognition of up to 1000 pages, i.e., FileEndPageNumber-FileStartPageNumber should be no more than 1000.
Config No CreateReconstructDocumentFlowConfig Configuration information for creating a document parsing task.

3. Output Parameters

Parameter Name Type Description
TaskId String Unique task ID. The processing result corresponding to TaskId can be queried through the API GetReconstructDocumentResult within 30 days.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Successful API Request Example

Input Example

POST / HTTP/1.1
Host: lke.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateReconstructDocumentFlow
<Common request parameters>

{
    "FileStartPageNumber": 1,
    "FileEndPageNumber": 1,
    "Config": {
        "TableResultType": "1"
    },
    "FileBase64": "data:application/pdf;base64,JVBERi0xLjcKXXX..."
}

Output Example

{
    "Response": {
        "RequestId": "1d569fb4-4c9d-4141-bbd7-e1d8735bd1a9",
        "TaskId": "9e28e561e9a04ef096768d13deffe963"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.DownLoadError File download failure.
FailedOperation.FileDecodeFailed File decoding failure.
FailedOperation.ImageDecodeFailed Image decoding failed.
FailedOperation.UnKnowError Unknown error.
FailedOperation.UnKnowFileTypeError Unknown file type.
FailedOperation.UnOpenError The service is not activated.
InvalidParameterValue.InvalidParameterValueLimit Parameter value error.
LimitExceeded.TooLargeFileError The file size is too large.
ResourceUnavailable.InArrears The account is in arrears.
ResourceUnavailable.ResourcePackageRunOut The account resource package is exhausted.
ResourcesSoldOut.ChargeStatusException The billing status is abnormal.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback