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

# Get All Rag Chunks For A Document

> Get all RAG chunks for a specific knowledge base document.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/convai/knowledge-base/{documentation_id}/chunks
openapi: 3.1.0
info:
  title: Threetone API Documentation
  description: >-
    This is the documentation for the Threetone API. You can use this API to use
    our service programmatically with API keys sent in the x-api-key header. You
    can create and manage API keys in the dashboard at
    https://threetone.in/app/developers/api-keys.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/convai/knowledge-base/{documentation_id}/chunks:
    get:
      tags:
        - Agents Platform
      summary: Get All Rag Chunks For A Document
      description: Get all RAG chunks for a specific knowledge base document.
      operationId: get_documentation_chunks_from_knowledge_base
      parameters:
        - name: documentation_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              The id of a document from the knowledge base. This is returned on
              document addition.
            examples:
              - 21m00Tcm4TlvDq8ikWAM
            embed: true
            title: Documentation Id
          description: >-
            The id of a document from the knowledge base. This is returned on
            document addition.
        - name: embedding_model
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/EmbeddingModelEnum'
            description: The embedding model used to retrieve the chunk.
            examples:
              - e5_mistral_7b_instruct
              - multilingual_e5_large_instruct
          description: The embedding model used to retrieve the chunk.
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: >-
              How many documents to return at maximum. Can not exceed 100,
              defaults to 30.
            default: 30
            title: Page Size
          description: >-
            How many documents to return at maximum. Can not exceed 100,
            defaults to 30.
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Used for fetching next page. Cursor is returned in the response.
            title: Cursor
          description: Used for fetching next page. Cursor is returned in the response.
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeBaseDocumentChunksResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EmbeddingModelEnum:
      type: string
      enum:
        - e5_mistral_7b_instruct
        - multilingual_e5_large_instruct
      title: EmbeddingModelEnum
      default: e5_mistral_7b_instruct
    KnowledgeBaseDocumentChunksResponseModel:
      properties:
        chunks:
          items:
            $ref: '#/components/schemas/KnowledgeBaseDocumentChunkResponseModel'
          type: array
          title: Chunks
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
      type: object
      required:
        - chunks
      title: KnowledgeBaseDocumentChunksResponseModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KnowledgeBaseDocumentChunkResponseModel:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        content:
          type: string
          title: Content
      type: object
      required:
        - id
        - name
        - content
      title: KnowledgeBaseDocumentChunkResponseModel
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````