tencent cloud

APIs

ChunkDocumentAsync

Download
Modo Foco
Tamanho da Fonte
Última atualização: 2026-07-22 18:06:50

1. API Description

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

Text segmentation is a technology that splits long text into short clips for adapting to model input, improving processing efficiency, or information retrieval. It balances clip length and semantic consistency, suitable for NLP and data analysis scenarios.
This API is an async API with a model dimensional call limit. Each model has a qps limit of 5. If you need to increase the concurrent limit, please contact us (https://www.tencentcloud.com/act/event/Online_service?from_cn_redirect=1).

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: ChunkDocumentAsync.
Version Yes String Common Params. The value used for this API: 2025-01-01.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Document Yes Document File information.
ModelName Yes String Model name, selectable model list: doc-tree-chunk.
Config No ChunkConfigAsync File slice configuration.

3. Output Parameters

Parameter Name Type Description
TaskId String Task ID
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 Document Slicing Async

Input Example

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

{
    "Document": {
        "FileType": "TXT",
        "FileUrl": "",
        "FileContent": "data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==",
        "FileName": "test.txt",
        "FileStartPageNumber": 1,
        "FileEndPageNumber": 1
    },
    "Config": {
        "MaxChunkSize": 10000
    },
    "ModelName": "doc-tree-chunk"
}

Output Example

{
    "Response": {
        "RequestId": "e3a1a515-e53c-473f-9114-6d05a19d1c0c",
        "TaskId": "acf20b7e-47b2-4cfd-8aba-d170dee34cfc"
    }
}

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
InternalError Internal error.
InvalidParameter Parameter error.
LimitExceeded The quota limit is exceeded.

Ajuda e Suporte

Esta página foi útil?

comentários