cURL
Supports document search-type (document), data query-type (table), and image Q&A-type (image) knowledge bases; does not support multimedia search-type (multimedia) knowledge bases. Data query-type and image Q&A-type knowledge bases support only Excel table datasets as data sources. This API is idempotent; frequent calls will be rate-limited—do not exceed 10 requests per second.
field structure
Chunk content is passed as key-value pairs; the structure varies by knowledge base type.
Document search-type (document) uses fixed keys:
| key | Type | Required | Description |
|---|---|---|---|
content | String | Yes | Chunk body, max 6000 characters |
title | String | No | Chunk title, max 50 characters |
image_urls | Array | No | Image links for the chunk, up to 10 |
| Type | Requirement |
|---|---|
| String | Max 6000 characters |
| Time | 13-digit timestamp (milliseconds) |
| Long | Integer, max 2147483647 |
| Double | Decimals supported |
| image_url | Up to 5 images; multiple images joined into one string with commas |
Authorizations
string
header
required
DashScope API Key,在控制台 API Key 页面 获取。
Body
application/jsonstring
required
知识库 ID,即 createIndex 接口返回的 data.id。
object
required
切片内容信息(键值对),结构因知识库类型而异,详见 field 结构