tencent cloud

Tencent Cloud Agent Development Platform

DokumentasiTencent Cloud Agent Development Platform

CreateKB

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-11-04 21:50:19

1. API Description

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

This API is used to create a knowledge base.

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: CreateKB.
Version Yes String Common Params. The value used for this API: 2026-05-20.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
KbType Yes Integer

Knowledge base type (0 not allowed. Parameter Value: 1=default knowledge base, 2=shared knowledge base)

Enumeration itemEnumeration valueDescription
KB_TYPE_UNKNOWN0
KB_TYPE_DEFAULT1Default knowledge base
KB_TYPE_SHARED2Shared knowledge base

SpaceId Yes String

Workspace ID

Spec Yes KBSpec

Writable attribute

SharedSubType No Integer

Share sub-type: 1=ordinary, 2=wechat official account

Enumeration itemEnumeration valueDescription
SHARED_KB_SUB_TYPE_UNKNOWN0
SHARED_KB_SUB_TYPE_NORMAL1Ordinary
SHARED_KB_SUB_TYPE_PUBLIC_ACCOUNT2WeChat Official Account

3. Output Parameters

Parameter Name Type Description
KbId String

Knowledge base ID after creation

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 Create a knowledge base

Create a knowledge base

Input Example

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

{
    "KbType": 2,
    "SharedSubType": 1,
    "SpaceId": "default_space",
    "Spec": {
"Name": "Shared knowledge base_Effective scope comprehensive query_adp_qta_YFTOka"
"Description": "Standard mode shared knowledge base test"
    }
}

Output Example

{
    "Response": {
        "KbId": "2097704030430616192",
        "RequestId": "d162e414-3a60-45e5-bf87-a8fb10019f4b"
    }
}

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

There is no error code related to the API business logic. For other error codes, please see Common Error Codes.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan