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

# Get a knowledge base

> One knowledge base, with its text.



## OpenAPI

````yaml /api-reference/openapi.json get /knowledge-bases/{id}
openapi: 3.1.0
info:
  title: Talking Avatar API
  version: '1'
  description: >-
    Your account from your server, with an API key: voice agents, calls,
    knowledge bases, links, usage and billing. Send API-Version: 1 to pin
    version 1.
servers:
  - url: https://backend.talking-avatar.dev/api/talking-avatar
security:
  - apiKey: []
paths:
  /knowledge-bases/{id}:
    get:
      summary: Get a knowledge base
      description: One knowledge base, with its text.
      parameters:
        - name: id
          in: path
          required: true
          description: The knowledge base's ID
          schema:
            type: string
            format: uuid
        - name: API-Version
          in: header
          description: 'The API version. Without it: 1.'
          schema:
            type: string
            enum:
              - '1'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: >-
                          The knowledge base's ID, for an agent's
                          config.knowledgeBaseIds
                      name:
                        type: string
                        description: The function name its agents call it by
                      instruction:
                        type: string
                        description: When its agents use it
                      file_name:
                        type:
                          - string
                          - 'null'
                        description: The file its text came from
                      characters:
                        type: integer
                        description: How long its text is
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      text:
                        type: string
                    required:
                      - id
                      - name
                      - instruction
                      - file_name
                      - characters
                      - created_at
                      - updated_at
                      - text
                    additionalProperties: false
                  code:
                    type: integer
                    const: 200
                  message:
                    type: string
                required:
                  - data
                  - code
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        5XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl
            https://backend.talking-avatar.dev/api/talking-avatar/knowledge-bases/KNOWLEDGE_BASE_ID
            \
              -H "Authorization: Bearer $TALKING_AVATAR_API_KEY" \
              -H "API-Version: 1"
        - lang: python
          label: Python
          source: |-
            import os, requests

            response = requests.get(
                "https://backend.talking-avatar.dev/api/talking-avatar/knowledge-bases/KNOWLEDGE_BASE_ID",
                headers={
                    "Authorization": f"Bearer {os.environ['TALKING_AVATAR_API_KEY']}",
                    "API-Version": "1",
                },
            )
            response.raise_for_status()
            data = response.json()["data"]
        - lang: javascript
          label: Node.js
          source: >-
            const response = await
            fetch("https://backend.talking-avatar.dev/api/talking-avatar/knowledge-bases/KNOWLEDGE_BASE_ID",
            {
              method: "GET",
              headers: {
                Authorization: `Bearer ${process.env.TALKING_AVATAR_API_KEY}`,
                "API-Version": "1",
              },
            });

            const { data } = await response.json();
components:
  schemas:
    Error:
      type: object
      properties:
        code:
          type: integer
          description: The HTTP status
        message:
          type: string
          description: What went wrong, readable
        data:
          type: 'null'
      required:
        - code
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Your API key, tav_…
      x-default: YOUR_API_KEY

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.