tencent cloud

ReconstructDocumentSSE
Last updated:2025-12-24 20:14:52
ReconstructDocumentSSE
Last updated: 2025-12-24 20:14:52

1. API Description

Domain name for API request: lkeap.ai.intl.tencentcloudapi.com.

This API is used for quasi-real-time document parsing, using HTTP SSE protocol for communication.

A maximum of 20 requests can be initiated per second for this API.

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: ReconstructDocumentSSE.
Version Yes String Common Params. The value used for this API: 2024-05-22.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-jakarta.
FileType Yes 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.
Supported file sizes:
- Max 100 MB for PDF, DOC, DOCX, PPT, and PPTX .
- Max 10 MB for MD, TXT, XLS, XLSX, and CSV.
- Max20 MB for others.
FileUrl No String File URL. 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. Refer to: Tencent Cloud COS Documentation
FileBase64 No String The base64 value of the file. File size limit: the downloaded file shall not exceed 8MB 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.
FileStartPageNumber No Integer The starting page number of the file. When type of the uploaded file is pdf, doc, docx, ppt, or pptx, it specifies the starting page number for recognition, including the current value.
FileEndPageNumber No Integer The end page number of the file. When type of the uploaded file is pdf, doc, docx, ppt, or pptx, it specifies the end page number for recognition, including the current value.
Config No ReconstructDocumentSSEConfig Document parsing configuration information.

3. Output Parameters

Parameter Name Type Description
TaskId String Task ID. The unique identifier of the current request.
ResponseType String Response type. 1: return progress information; 2: return parsing result.
Progress String Progress. Value range: 0 to 100.
ProgressMessage String Progress information.
DocumentRecognizeResultUrl String Temporary download URL for the document parsing result. The file is a zip compressed package, and the URL is valid for 30 minutes. The compressed package contains the following folders: *.md, *.jsonl, *mllm.json, images.
FailedPages Array of ReconstructDocumentFailedPage Page number where document parsing fails.
FailPageNum Integer
SuccessPageNum Integer
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. As a streaming response API, when the request is successfully completed, the RequestId will be placed in the Header "X-TC-RequestId" of the HTTP response.

4. Example

Example1 ReconstructDocumentSSE in Processing Response Sample

Input Example

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

{}

Output Example

{
  "RequestId": "0c7bbfbc-641a-4321-bee2-56b1e1e046e9",
  "TaskId": "0c7bbfbc-641a-4321-bee2-56b1e1e046e9",
  "ResponseType": "PROGRESS",
  "Progress": "0",
  "ProgressMessage": "Start document parsing",
  "DocumentRecognizeResultUrl": "",
  "FailedPages": []
}

Example2 ReconstructDocumentSSE Processing Completed Response Example

Input Example

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

{}

Output Example

{
  "RequestId": "0c7cabfbc-641a-4321-bee2-56b1e1adwq6e9",
  "TaskId": "0c7bbfbc-641a-4321-bee2-5dds1e1e04fe9",
  "ResponseType": "TASK_RSP",
  "Progress": "100",
"ProgressMessage": "Document parsing completed"
  "DocumentRecognizeResultUrl": "https://lkeap-reconstruct-sse-prod-intl-1251316161.cos.ap-jakarta.myqcloud.com/output_files/atom_v3/2025-10-21/200042064731_200042064731/64873e5b-082b-482c-9d98-42c4994696c9_parse.zip?q-sign-algorithm=sha1&q-ak=XXXXXXX&q-sign-time=1761035122%3B1761036922&q-key-time=1761035122%3B1761036922&q-header-list=host&q-url-param-list=&q-signature=XXXXXXX",
  "FailedPages": []
}

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.NonsupportParse Currently, it is not supported to parse this file.
FailedOperation.OcrFailed FailedOperation.OcrFailed
FailedOperation.UnKnowError Internal unknown error.
FailedOperation.UnOpenError The service is not activated.
FailedOperation.UploadResultFileFailed Failed to access to the URL of genetated file of recognition result. Please retry later.
InvalidParameterValue.InvalidParameterValueLimit Parameter value error.
LimitExceeded.ExceededMaxPagesError Exceeds the maximum file page limit.
LimitExceeded.TooLargeFileError File 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