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.
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:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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. |
| 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. |
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..."
}{
"Response": {
"RequestId": "1d569fb4-4c9d-4141-bbd7-e1d8735bd1a9",
"TaskId": "9e28e561e9a04ef096768d13deffe963"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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. |
Feedback