Skip to main content
GET
/
api
/
knowledge-base
/
{id}
/
documents
/
{docId}
/
chunks
curl --request GET \
  --url https://zeus-api.agentspro.cn/api/knowledge-base/kb_abc123/documents/doc_xyz789/chunks \
  --header 'Authorization: Bearer <token>'
{
  "chunks": [
    {
      "chunk_index": 0,
      "content": "# Product User Guide\n\nThis document covers the installation, configuration, and usage of the product.",
      "metadata": {
        "source": "product-guide.pdf",
        "page": 1
      }
    },
    {
      "chunk_index": 1,
      "content": "## Installation Steps\n\n1. Download the latest installer package\n2. Run the installer...",
      "metadata": {
        "source": "product-guide.pdf",
        "page": 2
      }
    }
  ],
  "total": 45
}
Returns all semantic chunks produced by SmartChunker for a document, including the content and metadata of each chunk. Only available after the document reaches status: completed.
Authorization
string
required
Bearer JWT Token
id
string
required
Knowledge base ID
docId
string
required
Document ID
chunks
array
List of semantic chunks
total
number
Total number of chunks
curl --request GET \
  --url https://zeus-api.agentspro.cn/api/knowledge-base/kb_abc123/documents/doc_xyz789/chunks \
  --header 'Authorization: Bearer <token>'
{
  "chunks": [
    {
      "chunk_index": 0,
      "content": "# Product User Guide\n\nThis document covers the installation, configuration, and usage of the product.",
      "metadata": {
        "source": "product-guide.pdf",
        "page": 1
      }
    },
    {
      "chunk_index": 1,
      "content": "## Installation Steps\n\n1. Download the latest installer package\n2. Run the installer...",
      "metadata": {
        "source": "product-guide.pdf",
        "page": 2
      }
    }
  ],
  "total": 45
}