> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeus.agentspro.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取文档分块

> 获取文档所有语义分块

返回文档经过 SmartChunker 处理后的所有语义分块，包含每个 chunk 的内容和元数据。仅在文档 `status: completed` 后可用。

<ParamField header="Authorization" type="string" required>
  Bearer JWT Token
</ParamField>

<ParamField path="id" type="string" required>
  知识库 ID
</ParamField>

<ParamField path="docId" type="string" required>
  文档 ID
</ParamField>

<ResponseField name="chunks" type="array">
  语义分块列表

  <Expandable title="chunk object">
    <ResponseField name="chunk_index" type="number">
      分块序号（从 0 开始）
    </ResponseField>

    <ResponseField name="content" type="string">
      分块文本内容
    </ResponseField>

    <ResponseField name="metadata" type="object">
      分块元数据

      <Expandable title="metadata">
        <ResponseField name="source" type="string">
          来源文件名
        </ResponseField>

        <ResponseField name="page" type="number">
          所在页码（PDF 文档）
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="total" type="number">
  分块总数
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://zeus-api.agentspro.cn/api/knowledge-base/kb_abc123/documents/doc_xyz789/chunks \
    --header 'Authorization: Bearer <token>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "chunks": [
      {
        "chunk_index": 0,
        "content": "# 产品使用指南\n\n本文档介绍了产品的安装、配置和使用方法。",
        "metadata": {
          "source": "product-guide.pdf",
          "page": 1
        }
      },
      {
        "chunk_index": 1,
        "content": "## 安装步骤\n\n1. 下载最新版本的安装包\n2. 运行安装程序...",
        "metadata": {
          "source": "product-guide.pdf",
          "page": 2
        }
      }
    ],
    "total": 45
  }
  ```
</ResponseExample>
