Delete chunks in batch — up to 10 per call.
Prerequisites
Configure the endpoint and authentication first. See API overview and Authentication.
Endpoint
POST /api/v1/indices/rag/index/chunk/delete
Delete chunks from a specified knowledge base in batch, up to 10 per call.
Request body
| Field | Required | Type | Description |
|---|---|---|---|
pipelineId | Yes | string | Knowledge base ID. |
chunkIds | Yes | array<string> | List of chunk IDs to delete, up to 10 per call. |
Request example
BASE_URL is https://{workspace_id}.cn-beijing.maas.aliyuncs.com ({workspace_id} is the workspace ID), and BAILIAN_API_KEY is your Alibaba Cloud Model Studio API key.
Response example
Returns 200 on success.
Response fields
| Field | Type | Description |
|---|---|---|
code | string | Response code. Success on success. |
status_code | integer | HTTP status code. |
request_id | string | Unique request identifier. Provide this ID when troubleshooting. |
data | object | Returned as an empty object when the operation succeeds. |
success | boolean | Whether the operation succeeded. |
message | string | Response message. success on success. |
status | string | Request status: SUCCESS or FAILED. |
Error codes
| HTTP status code | Error code | Message | Description |
|---|---|---|---|
| 400 | Index.InvalidParameter | Required parameter missing or invalid. | Invalid request parameters. |
| 401 | InvalidApiKey | Invalid API-key provided. | Authentication failed. The API key is invalid or missing. |