tencent cloud

APIs

GetTextEmbedding

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

1. API Description

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

Embedding is a technology that maps high-dimensional data to a low-dimensional space, usually used for converting unstructured data such as text, images, or audio into vector representation, making it easier to input into machine models for processing, and the distance between vectors can reflect the similarity between objects.
This API has a model dimensional call limit. Each model has a qps limit of 20. 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 1000 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: GetTextEmbedding.
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.
ModelName Yes String Model name, selectable model list: bge-base-zh-v1.5, bge-large-zh-v1.5, Conan-embedding-v1, bge-m3, KaLM-embedding-multilingual-mini-v1, Qwen3-Embedding-0.6B.
Texts.N Yes Array of String Text set to be vectorized.

3. Output Parameters

Parameter Name Type Description
Data Array of EmbeddingData Result set.
Usage Usage token consumption for vectorization.
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 Retrieving a feature vector

Input Example

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

{
    "ModelName": "bge-large-zh-v1.5",
    "Texts": [
        "Hello"
    ]
}

Output Example

{
    "Response": {
        "Data": [
            {
                "Embedding": [
                    -0.007741480600088835,
                    -0.017921222373843193,
                    -0.04486401379108429,
                    -0.0073757413774728775,
                    0.014934351667761803,
                    -0.025723660364747047,
                    0.03559861704707146,
                    -0.034379489719867706,
                    0.027674268931150436,
                    0.04876523092389107,
                    -0.04266957566142082
                ],
                "Index": 0
            }
        ],
        "RequestId": "8750abd0-feab-4249-ba96-2df9a14c7202",
        "Usage": {
            "TotalTokens": 2
        }
    }
}

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.
InvalidParameterValue Parameter value error.
MissingParameter Parameters are missing.
RequestLimitExceeded Number of requests exceeds the frequency limit.
ResourceNotFound The resource does not exist.
UnauthorizedOperation Unauthorized operation.
UnknownParameter Unknown parameter error.
UnsupportedOperation The operation is not supported.

Ajuda e Suporte

Esta página foi útil?

comentários