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

# List all knowledge bases

> Returns a list of your knowledge bases. The knowledge bases are returned sorted by creation date, with the most recent knowledge bases appearing first

<Note>
  **Related guide**: Knowledge bases guide. See the [Knowledge bases guide](/ai-studio/ai-engineering/knowledge-bases) for a walkthrough with examples.
</Note>


## OpenAPI

````yaml get /v2/knowledge
openapi: 3.1.0
info:
  title: orq.ai API
  version: '2.0'
  description: orq.ai API documentation
servers:
  - url: https://my.orq.ai
security:
  - ApiKey: []
tags:
  - name: Chunking
    description: Split text into smaller chunks for retrieval and generation workflows.
  - name: File Systems
    description: >-
      Create and manage persistent file systems that agents and MCP clients read
      from and write to.
  - name: Knowledge Bases
    description: Create and manage knowledge bases used by agents and retrieval workflows.
  - name: Memory Stores
    description: Create and manage memory stores, memories, and memory documents.
  - name: Evals
    description: Run an evaluator against a conversation and its result
  - name: Logs
    description: >-
      OpenTelemetry log query API. Search, filter, aggregate, and facet log
      records ingested via OTLP.
  - name: Reporting
    description: >-
      GenAI reporting API over canonical analytics rollups. Accepts a metric
      name, time range, grain, group-by, and filters; returns a typed time
      series and optional totals.
  - name: Traces
    description: >-
      Query and inspect ingested trace data: search trace summaries, aggregate
      metrics, and read individual traces and their spans.
  - description: List models available through the AI Router.
    name: Models
  - name: Policies
  - name: Alerts
    description: >-
      Alerts evaluate a Reporting API metric on a fixed interval and fire
      notifications through notifiers when the value breaches a threshold. Each
      breach opens a trigger that tracks the incident until the value recovers.
  - name: Annotation Queues
    description: Annotation queues collect spans for human review.
  - name: API keys
    description: >-
      API keys authenticate programmatic access to the workspace. They expose
      opaque tokens, per-domain access grants, and budget and rate-limit
      constraints.
  - name: Audit Logs
    description: Audit logs record workspace entity changes and access-relevant events.
  - name: Budgets
    description: >-
      Budgets govern spend, token usage, and request rate across six scopes:
      workspace, project, identity, API key, provider, and model. Every
      applicable budget is enforced, and the most restrictive limit applies per
      dimension.
  - name: Files
    description: File upload and retrieval operations.
  - name: Guardrail Rules
    description: >-
      Guardrail Rules conditionally enforce evaluators and plugins for AI
      Gateway traffic. Rules may be scoped to a project or the whole workspace.
  - name: Hub
    description: Hub items are reusable templates available to a workspace.
  - name: Identities
    description: >-
      Identities represent end users from your system for usage and engagement
      tracking.
  - name: Management keys
    description: >-
      Management keys are workspace-scoped credentials that authenticate
      programmatic access to workspace administration surfaces (API keys,
      budgets). Unlike project-scoped API keys, a management key always operates
      at the workspace level.
  - name: MCP Gateway
    description: >-
      Register upstream MCP servers, discover and sync their tools, and assemble
      gateways that expose a curated tool surface to MCP clients.
  - name: Model Catalog
    description: >-
      Browse the orq.ai model catalog: every model orq offers, across every
      provider, with pricing, capabilities and benchmark data. List endpoints
      only return models that are not deprecated. This API is public, requires
      no authentication, and is rate limited to 120 requests per minute per IP.
      Responses carry a 5-minute cache-control max-age.
  - name: Notifiers
    description: Notifier destinations used to send delivery and workflow notifications.
  - name: Projects
    description: Projects organize resources within a workspace
  - name: Routing Rules
    description: >-
      Routing Rules conditionally select models and enforce request plugins for
      AI Gateway traffic. Rules are evaluated by ascending priority and may be
      scoped to a project or the whole workspace.
  - name: Threads
    description: Threads group related trace invocations and their aggregate usage
  - name: Skills
    description: >-
      Skills are modular instructions you can use to codify processes and
      conventions
  - name: Smart Routers
    description: >-
      Create and manage workspace Smart Routers. A Smart Router selects a model
      from an eligible pool for each request according to a quality, balanced,
      or cost profile.
  - name: Webhooks
    description: >-
      Create and manage webhooks that deliver workspace events to external HTTPS
      endpoints.
  - name: Workspaces
    description: >-
      A workspace is the tenant. Create is called from a user session during
      onboarding; Get, List, and Update are the public management surface.
  - name: Workspace Security
    description: >-
      Workspace-level domain verification and IP allowlist controls. These
      operations are restricted to workspace administrators.
  - name: Workspace Settings
    description: >-
      Workspace-level settings managed with a workspace credential. A workspace
      is the tenant, so these settings are a singleton — there is nothing to
      create or delete, only read and update.
  - name: Responses
  - description: Run agents on a cron cadence. Minimum firing interval is 1 hour.
    name: Agent Schedules
  - name: Embeddings
  - name: Telemetry
    description: >-
      Unified query envelope for traces, metrics, and logs. One request shape,
      one filter dialect, and one response shape per source, validated by a
      per-source registry.
  - description: Beta. Run typed classification questions against a classify model.
    name: Classify
  - description: Search Gateway with managed credits or BYOK.
    name: Web Search
externalDocs:
  url: https://docs.orq.ai
  description: orq.ai Documentation
paths:
  /v2/knowledge:
    get:
      tags:
        - Knowledge Bases
      summary: List all knowledge bases
      description: >-
        Returns a list of your knowledge bases. The knowledge bases are returned
        sorted by creation date, with the most recent knowledge bases appearing
        first
      operationId: ListKnowledgeBases
      parameters:
        - schema:
            type: string
            description: >-
              A cursor for use in pagination. `starting_after` is an object ID
              that defines your place in the list. For instance, if you make a
              list request and receive 20 objects, ending with
              `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include
              `starting_after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the
              next page of the list.
          required: false
          description: >-
            A cursor for use in pagination. `starting_after` is an object ID
            that defines your place in the list. For instance, if you make a
            list request and receive 20 objects, ending with
            `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include
            `starting_after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the
            next page of the list.
          name: starting_after
          in: query
        - schema:
            type: string
            description: >-
              A cursor for use in pagination. `ending_before` is an object ID
              that defines your place in the list. For instance, if you make a
              list request and receive 20 objects, starting with
              `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include
              `ending_before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the
              previous page of the list.
          required: false
          description: >-
            A cursor for use in pagination. `ending_before` is an object ID that
            defines your place in the list. For instance, if you make a list
            request and receive 20 objects, starting with
            `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include
            `ending_before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the
            previous page of the list.
          name: ending_before
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 300
            default: 25
            description: >-
              A limit on the number of objects to be returned. Limit can range
              between 1 and 300, and the default is 25
          required: false
          description: >-
            A limit on the number of objects to be returned. Limit can range
            between 1 and 300, and the default is 25
          name: limit
          in: query
        - schema:
            type: string
            description: Filter knowledge bases by key (case-insensitive match)
          required: false
          description: Filter knowledge bases by key (case-insensitive match)
          name: search
          in: query
        - schema:
            type: string
            description: >-
              Filter by the users who last updated the knowledge base. Accepts a
              comma-separated list of user IDs
          required: false
          description: >-
            Filter by the users who last updated the knowledge base. Accepts a
            comma-separated list of user IDs
          name: updated_by
          in: query
        - schema:
            type: string
            enum:
              - internal
              - external
            description: Filter knowledge bases by type
          required: false
          description: Filter knowledge bases by type
          name: type
          in: query
        - schema:
            type: string
            description: Filter knowledge bases by project ID
          required: false
          description: Filter knowledge bases by project ID
          name: project_id
          in: query
      responses:
        '200':
          description: Knowledge bases retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeBasesServiceListResponse'
        '401':
          description: Unauthorized - Bearer token is missing or invalid.
      x-code-samples:
        - lang: curl
          label: Core - List knowledge bases
          source: |
            curl --request GET \
              --url 'https://my.orq.ai/v2/knowledge?limit=25' \
              --header "Authorization: Bearer $ORQ_API_KEY"
components:
  schemas:
    KnowledgeBasesServiceListResponse:
      required:
        - object
        - data
        - has_more
      type: object
      properties:
        object:
          enum:
            - list
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/Knowledge'
        has_more:
          type: boolean
    Knowledge:
      oneOf:
        - type: object
          properties:
            _id:
              type: string
              description: The unique identifier of the knowledge base.
            created:
              type: string
              description: The creation date of the knowledge base.
            description:
              type:
                - string
                - 'null'
              description: The description of the knowledge base.
            key:
              type: string
              description: The unique key of the knowledge base.
            domain_id:
              type: string
              description: The project/domain ID of the knowledge base.
            path:
              type: string
              description: >-
                Entity storage path.


                With workspace-level API keys, use the format
                `project/folder/subfolder/...`. The first element identifies the
                project, followed by nested folders (auto-created as needed).
                Example: `Default/agents`.


                With project-level API keys, the project is predetermined by the
                API key, so the path is relative to that project. Example:
                `agents`. For backward compatibility, a leading project name is
                ignored when it matches the scoped project.
              example: Default
            created_by_id:
              type:
                - string
                - 'null'
              format: uuid
            updated_by_id:
              type:
                - string
                - 'null'
              format: uuid
            updated:
              type: string
              description: The last update date of the knowledge base.
            type:
              type: string
              enum:
                - internal
              default: internal
            retrieval_settings:
              type: object
              properties:
                retrieval_type:
                  type: string
                  enum:
                    - vector_search
                    - keyword_search
                    - hybrid_search
                  default: hybrid_search
                  description: >-
                    The retrieval type to use for the knowledge base. If not
                    provided, Hybrid Search will be used as a default query
                    strategy.
                top_k:
                  type: integer
                  exclusiveMinimum: 0
                  default: 5
                  description: The number of results to return from the search.
                threshold:
                  type: number
                  minimum: 0
                  maximum: 1
                  default: 0
                  description: >-
                    The threshold value used to filter the search results, only
                    documents with a relevance score greater than the threshold
                    will be returned
                rerank_config:
                  type:
                    - object
                    - 'null'
                  properties:
                    top_k:
                      type: integer
                      minimum: 1
                      maximum: 100
                      default: 5
                      description: The number of results to return by the reranking model
                    rerank_threshold:
                      type: number
                      minimum: 0
                      maximum: 1
                      default: 0.5
                      description: >-
                        The threshold value used to filter the rerank results,
                        only documents with a relevance score greater than the
                        threshold will be returned
                    rerank_model:
                      type: string
                      description: The rerank model to use for the knowledge base.
                  required:
                    - rerank_model
                  description: >-
                    The rerank configuration for the knowledge base. In case the
                    model is provided it will be used to enhance the search
                    precision.
                agentic_rag_config:
                  type:
                    - object
                    - 'null'
                  properties:
                    model:
                      type: string
                      description: The model to use for the Agentic RAG
                  required:
                    - model
                  description: >-
                    The Agentic RAG configuration for the knowledge base. If
                    `null` is provided, Agentic RAG will be disabled.
              description: >-
                The retrieval settings for the knowledge base. If not provider,
                Hybrid Search will be used as a default query strategy.
            model:
              type: string
              description: The embeddings model used for the knowledge base.
            settings:
              allOf:
                - $ref: '#/components/schemas/KnowledgeSettings'
              description: >-
                Settings for the knowledge base: embedding model, retrieval
                configuration, and agentic RAG configuration.
            metadata:
              $ref: '#/components/schemas/KnowledgeMetadata'
          required:
            - _id
            - created
            - key
            - domain_id
            - updated
            - model
        - type: object
          properties:
            _id:
              type: string
              description: The unique identifier of the knowledge base.
            created:
              type: string
              description: The creation date of the knowledge base.
            description:
              type:
                - string
                - 'null'
              description: The description of the knowledge base.
            key:
              type: string
              description: The unique key of the knowledge base.
            domain_id:
              type: string
              description: The project/domain ID of the knowledge base.
            path:
              type: string
              description: >-
                Entity storage path.


                With workspace-level API keys, use the format
                `project/folder/subfolder/...`. The first element identifies the
                project, followed by nested folders (auto-created as needed).
                Example: `Default/agents`.


                With project-level API keys, the project is predetermined by the
                API key, so the path is relative to that project. Example:
                `agents`. For backward compatibility, a leading project name is
                ignored when it matches the scoped project.
              example: Default
            created_by_id:
              type:
                - string
                - 'null'
              format: uuid
            updated_by_id:
              type:
                - string
                - 'null'
              format: uuid
            updated:
              type: string
              description: The last update date of the knowledge base.
            type:
              type: string
              enum:
                - external
              default: external
            retrieval_settings:
              type: object
              properties:
                top_k:
                  type: integer
                  exclusiveMinimum: 0
                  default: 5
                  description: The number of results to return from the search.
                threshold:
                  type: number
                  minimum: 0
                  maximum: 1
                  default: 0
                  description: >-
                    The threshold value used to filter the search results, only
                    documents with a relevance score greater than the threshold
                    will be returned
                rerank_config:
                  type:
                    - object
                    - 'null'
                  properties:
                    top_k:
                      type: integer
                      minimum: 1
                      maximum: 100
                      default: 5
                      description: The number of results to return by the reranking model
                    rerank_threshold:
                      type: number
                      minimum: 0
                      maximum: 1
                      default: 0.5
                      description: >-
                        The threshold value used to filter the rerank results,
                        only documents with a relevance score greater than the
                        threshold will be returned
                    rerank_model:
                      type: string
                      description: The rerank model to use for the knowledge base.
                  required:
                    - rerank_model
                  description: >-
                    The rerank configuration for the knowledge base. In case the
                    model is provided it will be used to enhance the search
                    precision.
                agentic_rag_config:
                  type:
                    - object
                    - 'null'
                  properties:
                    model:
                      type: string
                      description: The model to use for the Agentic RAG
                  required:
                    - model
                  description: >-
                    The Agentic RAG configuration for the knowledge base. If
                    `null` is provided, Agentic RAG will be disabled.
              description: The retrieval settings for the knowledge base.
            external_config:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the external knowledge base.
                api_url:
                  type: string
                  format: uri
                  description: The API URL of the external knowledge base.
              required:
                - name
                - api_url
            settings:
              allOf:
                - $ref: '#/components/schemas/KnowledgeSettings'
              description: >-
                Settings for the knowledge base: embedding model, retrieval
                configuration, and agentic RAG configuration.
            metadata:
              $ref: '#/components/schemas/KnowledgeMetadata'
          required:
            - _id
            - created
            - key
            - domain_id
            - updated
            - external_config
    KnowledgeSettings:
      type: object
      properties:
        embeddings_config:
          $ref: '#/components/schemas/EmbeddingsConfig'
        retrieval_config:
          $ref: '#/components/schemas/RetrievalConfig'
        agentic_rag_config:
          $ref: '#/components/schemas/AgenticRagConfig'
    KnowledgeMetadata:
      type: object
      properties:
        word_count:
          type: integer
          format: int32
        document_count:
          type: integer
          format: int32
        sentences_count:
          type: integer
          format: int32
        support_enabled:
          type: boolean
        unique_metadata_fields:
          type: array
          items:
            type: string
    EmbeddingsConfig:
      type: object
      properties:
        provider:
          type: string
        model:
          type: string
        model_db_id:
          type: string
        model_type:
          type: string
        model_parameters:
          $ref: '#/components/schemas/EmbeddingsModelParameters'
        integration_id:
          type: string
    RetrievalConfig:
      type: object
      properties:
        type:
          type: string
        top_k:
          type: integer
          format: int32
        threshold:
          type: number
          format: double
        rerank_config:
          $ref: '#/components/schemas/RerankConfig'
    AgenticRagConfig:
      type: object
      properties:
        model_db_id:
          type: string
        provider:
          type: string
        integration_id:
          type: string
        model:
          type: string
    EmbeddingsModelParameters:
      type: object
      properties:
        encoding_format:
          type: string
        dimensions:
          type: integer
          format: int32
    RerankConfig:
      type: object
      properties:
        enabled:
          type: boolean
        provider:
          type: string
        top_k:
          type: integer
          format: int32
        model:
          type: string
        model_db_id:
          type: string
        model_type:
          type: string
        model_parameters:
          $ref: '#/components/schemas/RerankModelParameters'
        integration_id:
          type: string
    RerankModelParameters:
      type: object
      properties:
        threshold:
          type: number
          format: double
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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