> ## 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.

# 预览分块

> 预览分块结果（客户端调试用）

在不实际入库的情况下预览文本的分块结果，用于客户端调整分块参数（chunk\_size、chunk\_overlap 等）时实时查看效果。

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

<ParamField body="content" type="string" required>
  要预览的文本内容
</ParamField>

<ParamField body="chunk_size" type="number" default="1000">
  分块最大字符数
</ParamField>

<ParamField body="chunk_overlap" type="number" default="200">
  分块重叠字符数
</ParamField>

<ParamField body="delimiter" type="string" default="\n\n">
  分块分隔符
</ParamField>

<ResponseField name="chunks" type="array">
  分块预览列表

  <Expandable title="chunk object">
    <ResponseField name="index" type="number">
      分块序号
    </ResponseField>

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

    <ResponseField name="length" type="number">
      分块字符数
    </ResponseField>
  </Expandable>
</ResponseField>

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

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://zeus-api.agentspro.cn/api/knowledge-base/preview-chunks \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "content": "# 标题\n\n第一段内容...\n\n第二段内容...\n\n第三段内容...",
      "chunk_size": 512,
      "chunk_overlap": 50,
      "delimiter": "\n\n"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "chunks": [
      {
        "index": 0,
        "content": "# 标题\n\n第一段内容...",
        "length": 18
      },
      {
        "index": 1,
        "content": "第二段内容...",
        "length": 8
      },
      {
        "index": 2,
        "content": "第三段内容...",
        "length": 8
      }
    ],
    "total": 3
  }
  ```
</ResponseExample>
