All Products
Search
Document Center

Platform For AI:CreateKnowledgeBaseJob

Last Updated:Mar 14, 2026

Create a Knowledge Base Task.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
pailangstudio:CreateKnowledgeBaseJobcreate
*All Resources
*
    none
none

Request syntax

POST /api/v1/langstudio/knowledgebases/{KnowledgeBaseId}/knowledgebasejobs HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
KnowledgeBaseIdstringNo

The ID of the Knowledge Base.

d-ksicx823d
bodyobjectNo

The request body.

WorkspaceIdstringYes

The ID of the workspace. For information on how to obtain the workspace ID, see ListWorkspaces.

478**
AccessibilitystringNo

Workspace visibility. Possible values are:

  • PRIVATE: In this workspace, it is visible only to you and the administrator.
  • PUBLIC: This workspace is visible to all users.
PUBLIC
DescriptionstringNo

Knowledge base task description.

This is a description of the knowledge base job.
JobActionstringNo

The type of the task operation.

  • SyncIndex: updates the knowledge base index
SyncIndex
MaxRunningTimeInSecondsintegerNo

The maximum running time for the task, in seconds.

86400
ResourceIdstringNo

The resource group ID. This field being empty or public-cluster indicates a public resource.

public-cluster
EcsSpecsarray<object>No

Task Run Resource Configuration List Documentation and structured Knowledge Base contain only one Element and the Type is Worker. Images and Videos Knowledge Base contain two Elements and the Types are Head and Worker.

EcsSpecElemobjectNo
TypestringNo

The type of the node. Possible values are Head and Worker.

Worker
InstanceTypestringNo

The name of the instance type. Use of public resources must be filled in.

ecs.c6.large
PodCountintegerNo

The number of replicas.

1
CPUintegerNo

The number of CPU cores. You must specify the resource quota to use.

2
GPUintegerNo

The number of GPU cards. You must specify the resource quota to use.

1
MemoryintegerNo

The memory size, in GB. You must specify the resource quota to use.

8
SharedMemoryintegerNo

The Shared Memory Capacity. Unit: GB. You must specify the resource quota to use.

16
GPUTypestringNo

GPU Class

16
DriverstringNo

The version of the GPU driver.

535.161.08
UserVpcobjectNo

Task Run VPC Info.

VpcIdstringNo

VPC ID

vpc-wz90****5v23
VSwitchIdstringNo

The vSwitch IDs.

vsw-wz9r****ng10
SecurityGroupIdstringNo

The ID of a security group.

sg-wz9i****1129
EmbeddingConfigobjectNo

Index Configuration.

BatchSizeintegerNo

Index batch size. The knowledge base for documentation and structured data types is effective.

8
ConcurrencyintegerNo

Index concurrency. Image and video type knowledge base is valid.

1

Response parameters

ParameterTypeDescriptionExample
object
KnowledgeBaseJobIdstring

Knowledge Base Task ID.

kbjob-9mn******1z54
RequestIdstring

Request ID.

963BD7F9-0C02-5594-9550-BCC6DD43E3C0

Examples

Sample success responses

JSONformat

{
  "KnowledgeBaseJobId": "kbjob-9mn******1z54",
  "RequestId": "963BD7F9-0C02-5594-9550-BCC6DD43E3C0"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2026-01-08The response structure of the API has changedView Change Details