List document chunks
GET /v1/knowledge-bases/{kb_id}/documents/{doc_id}/chunks
List the chunks generated from a document. Useful for debugging and understanding
how a document was segmented. Chunks are returned in order of chunk_index.
The embedding vector is excluded from the response to keep payloads small.
Uses cursor-based pagination with chunk_index as the cursor value.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Example
kb_a1b2c3d4e5Knowledge base ID
Example
doc_f6g7h8i9j0Document ID
Query Parameters
Section titled “Query Parameters ”Pagination cursor from a previous response’s meta.cursor field
Maximum number of items to return per page
Responses
Section titled “ Responses ”Chunks retrieved
object
object
Chunk ID (prefixed with chk_)
Example
chk_k1l2m3n4o5Parent document ID
Example
doc_f6g7h8i9j0Parent knowledge base ID
Example
kb_a1b2c3d4e5The chunk text content
Example
Machine learning is a subset of artificial intelligence...Position of this chunk within the document (0-indexed)
Starting page number (null for text-only documents)
Example
1Ending page number
Example
1Section heading this chunk belongs to
Example
IntroductionEstimated token count for this chunk
Example
245Chunk-level metadata
object
Example
{}Example
2026-02-10T12:00:00.000Zobject
Cursor to pass for the next page. Null if no more results.
Example
eyJpZCI6ImtiX2FiYzEyMyJ9Whether more results are available
Example
trueAuthentication failed or missing
object
object
Machine-readable error code
Example
VALIDATION_ERRORHuman-readable error message
Example
Invalid request bodyAdditional error details (e.g., validation issues)
object
Example
{ "error": { "code": "AUTHENTICATION_ERROR", "message": "Invalid or missing API key" }}Resource not found
object
object
Machine-readable error code
Example
VALIDATION_ERRORHuman-readable error message
Example
Invalid request bodyAdditional error details (e.g., validation issues)
object
Example
{ "error": { "code": "NOT_FOUND", "message": "KnowledgeBase not found: kb_nonexistent" }}Rate limit exceeded
object
object
Machine-readable error code
Example
VALIDATION_ERRORHuman-readable error message
Example
Invalid request bodyAdditional error details (e.g., validation issues)
object
Example
{ "error": { "code": "RATE_LIMIT_EXCEEDED", "message": "Rate limit exceeded" }}