Create a Knowledge Base Task.
Debugging
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 Resourcesis 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.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| pailangstudio:CreateKnowledgeBaseJob | create | *All Resources * |
| none |
Request syntax
POST /api/v1/langstudio/knowledgebases/{KnowledgeBaseId}/knowledgebasejobs HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| KnowledgeBaseId | string | No | The ID of the Knowledge Base. | d-ksicx823d |
| body | object | No | The request body. | |
| WorkspaceId | string | Yes | 478** | |
| Accessibility | string | No | Workspace visibility. Possible values are:
| PUBLIC |
| Description | string | No | Knowledge base task description. | This is a description of the knowledge base job. |
| JobAction | string | No | The type of the task operation.
| SyncIndex |
| MaxRunningTimeInSeconds | integer | No | The maximum running time for the task, in seconds. | 86400 |
| ResourceId | string | No | The resource group ID. This field being empty or public-cluster indicates a public resource. | public-cluster |
| EcsSpecs | array<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. | |
| EcsSpecElem | object | No | ||
| Type | string | No | The type of the node. Possible values are Head and Worker. | Worker |
| InstanceType | string | No | The name of the instance type. Use of public resources must be filled in. | ecs.c6.large |
| PodCount | integer | No | The number of replicas. | 1 |
| CPU | integer | No | The number of CPU cores. You must specify the resource quota to use. | 2 |
| GPU | integer | No | The number of GPU cards. You must specify the resource quota to use. | 1 |
| Memory | integer | No | The memory size, in GB. You must specify the resource quota to use. | 8 |
| SharedMemory | integer | No | The Shared Memory Capacity. Unit: GB. You must specify the resource quota to use. | |
| GPUType | string | No | GPU Class | 16 |
| Driver | string | No | The version of the GPU driver. | 535.161.08 |
| UserVpc | object | No | Task Run VPC Info. | |
| VpcId | string | No | VPC ID | vpc-wz90****5v23 |
| VSwitchId | string | No | The vSwitch IDs. | vsw-wz9r****ng10 |
| SecurityGroupId | string | No | The ID of a security group. | sg-wz9i****1129 |
| EmbeddingConfig | object | No | Index Configuration. | |
| BatchSize | integer | No | Index batch size. The knowledge base for documentation and structured data types is effective. | 8 |
| Concurrency | integer | No | Index concurrency. Image and video type knowledge base is valid. | 1 |
Response parameters
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 time | Summary of changes | Operation |
|---|---|---|
| 2026-01-08 | The response structure of the API has changed | View Change Details |
