For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Connect
BlogHelp CenterAPI PricingSign up
OverviewElevenCreativeElevenAgentsElevenAPIReception AIAPI referenceChangelog
OverviewElevenCreativeElevenAgentsElevenAPIReception AIAPI referenceChangelog
  • API reference
    • Introduction
    • Authentication
    • Streaming
  • ElevenAgents
        • GETList knowledge base documents
        • DELDelete knowledge base document
        • GETGet knowledge base document
        • PATCHUpdate knowledge base document
        • POSTCreate knowledge base document from URL
        • POSTCreate knowledge base document from text
        • POSTCreate knowledge base document from file
        • GETGet document content
        • GETGet document chunk
        • GETGet source file URL
        • POSTRefresh knowledge base document
        • GETGet RAG chunks for a document
        • PATCHUpdate document file
      • GETSearch knowledge base
      • GETGet dependent agents
      • GETGet knowledge base size
      • GETGet knowledge base summaries
  • ElevenAPI
  • ElevenCreative
  • Core Resources
  • Workspace
  • Legacy
  • Conversational AI
LogoLogo
Login
Login
Connect
BlogHelp CenterAPI PricingSign up
ElevenAgentsKnowledge BaseDocuments

Get RAG chunks for a document

GET
/v1/convai/knowledge-base/:documentation_id/chunks
GET
/v1/convai/knowledge-base/:documentation_id/chunks
$curl -G https://api.elevenlabs.io/v1/convai/knowledge-base/documentation_id/chunks \
> -H "xi-api-key: sk-1234567890abcdef1234567890abcdef" \
> -H "Content-Type: application/json" \
> -d embedding_model=e5_mistral_7b_instruct \
> -d page_size=30
1{
2 "chunks": [
3 {
4 "id": "chunk_001",
5 "name": "Introduction to Conversational AI",
6 "content": "Conversational AI refers to technologies that enable computers to simulate real human conversations. It includes chatbots, virtual assistants, and voice-enabled devices."
7 },
8 {
9 "id": "chunk_002",
10 "name": "Knowledge Base Document Structure",
11 "content": "A knowledge base document is divided into multiple chunks to facilitate efficient retrieval and response generation in RAG systems."
12 },
13 {
14 "id": "chunk_003",
15 "name": "Embedding Models Overview",
16 "content": "Embedding models convert text into numerical vectors that capture semantic meaning, enabling similarity search and retrieval."
17 }
18 ],
19 "next_cursor": "eyJwYWdlIjoxfQ=="
20}
Get all RAG chunks for a specific knowledge base document.
Was this page helpful?
Previous

Update document file

Next
Built with

Path parameters

documentation_idstringRequired
The id of a document from the knowledge base. This is returned on document addition.

Headers

xi-api-keystringOptional

Query parameters

embedding_modelenumRequiredDefaults to e5_mistral_7b_instruct
The embedding model used to retrieve the chunk.
Allowed values:
page_sizeintegerOptional1-100Defaults to 30
How many documents to return at maximum. Can not exceed 100, defaults to 30.
cursorstring or nullOptional
Used for fetching next page. Cursor is returned in the response.

Response

Successful Response
chunkslist of objects
next_cursorstring or null

Errors

422
Unprocessable Entity Error