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

# Ask a question

Runs a one-shot query against the configured resources.


## OpenAPI

````yaml /api-reference/openapi.local.json POST /question
openapi: 3.1.0
info:
  title: btca Local Server API
  version: 2.0.0
  description: Local HTTP API exposed by btca-server.
servers:
  - url: http://localhost:{port}
    variables:
      port:
        default: '8080'
security: []
paths:
  /question:
    post:
      summary: Ask a question (non-streaming)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuestionRequest'
      responses:
        '200':
          description: Answer and metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuestionResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    QuestionRequest:
      type: object
      required:
        - question
      properties:
        question:
          type: string
        resources:
          type: array
          items:
            type: string
        quiet:
          type: boolean
    QuestionResponse:
      type: object
      required:
        - answer
        - model
        - resources
        - collection
      properties:
        answer:
          type: string
        model:
          $ref: '#/components/schemas/ModelInfo'
        resources:
          type: array
          items:
            type: string
        collection:
          $ref: '#/components/schemas/CollectionInfo'
    ErrorResponse:
      type: object
      required:
        - error
        - tag
      properties:
        error:
          type: string
        tag:
          type: string
        hint:
          type: string
    ModelInfo:
      type: object
      required:
        - provider
        - model
      properties:
        provider:
          type: string
        model:
          type: string
        providerOptions:
          type: object
          description: Per-provider options (e.g., baseURL and name for openai-compat)
          additionalProperties:
            type: object
            properties:
              baseURL:
                type: string
              name:
                type: string
            additionalProperties: false
    CollectionInfo:
      type: object
      required:
        - key
        - path
      properties:
        key:
          type: string
        path:
          type: string

````