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

# Query

> Query the knowledge base and retrieve answers to user questions. Send a question and receive a synthesized answer or relevant document chunks from the knowledge base.



## OpenAPI

````yaml /specs/general-runtime/openapi.public.json post /knowledge-base/query
openapi: 3.0.0
info:
  title: General-runtime
  description: Voiceflow runtime service
  version: 1.0.0
  contact: {}
servers:
  - url: https://general-runtime.voiceflow.com
security: []
paths:
  /knowledge-base/query:
    post:
      tags:
        - Public-Docs
      summary: Query
      description: >-
        Query the knowledge base and retrieve answers to user questions. Send a
        question and receive a synthesized answer or relevant document chunks
        from the knowledge base.
      operationId: KnowledgeBaseController_query
      parameters:
        - name: authorization
          required: true
          in: header
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                projectID:
                  type: string
                question:
                  type: string
                instruction:
                  type: string
                chunkLimit:
                  type: integer
                  minimum: 1
                  exclusiveMinimum: false
                  maximum: 30
                  exclusiveMaximum: false
                synthesis:
                  type: boolean
                settings:
                  type: object
                  properties:
                    model:
                      type: string
                    temperature:
                      type: number
                    maxTokens:
                      type: integer
                    system:
                      type: string
                    reasoningEffort:
                      type: string
                      nullable: true
                  required:
                    - model
                filters:
                  type: object
                  additionalProperties: {}
                internalFilters:
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                      value:
                        type: string
                      operator:
                        type: string
                        enum:
                          - is
                          - is_not
                          - contains
                          - not_contains
                        x-enumNames:
                          - IS
                          - IS_NOT
                          - CONTAINS
                          - NOT_CONTAINS
                    required:
                      - key
                      - value
                      - operator
                projectEnvironmentIDOrAlias:
                  description: >-
                    The alias of the environment to target (ie. `main`). You can
                    find this in the environments page of your agent.


                    > **💡 Tip:** [Learn more about
                    Environments](/documentation/deploy/environments).
                  type: string
                versionVariant:
                  type: string
                  enum:
                    - draft
                    - published
                  default: published
              required:
                - question
      responses:
        '200':
          description: ''
      security:
        - auth: []
components:
  securitySchemes:
    auth:
      type: apiKey
      in: header
      name: authorization
      description: Voiceflow API key

````