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

# Ask knowledge base

> Ask a single question from the chat assistant and connected knowledge base

This endpoint allows you to ask a question and get an answer that incorporates all your connected knowledge sources and documents.

## Request Parameters

<ParamField query="api_key" type="string">
  Your API key for authentication
</ParamField>

<ParamField query="board_id" type="string" required>
  The ID of the knowledge board you want to use
</ParamField>

<ParamField query="chat_id" type="string" required>
  The ID of the chat assistant you're sending the question to
</ParamField>

## Request Body

<ParamField body="prompt" type="string" required>
  Your question for the assistant
</ParamField>

<ParamField body="model" type="string" default="claude-sonnet-4-6">
  The AI model to use. Allowed values: claude-sonnet-4-6, claude-sonnet-4-5, o3-mini, gpt-4o,
  grok-2-1212, gpt-4o-mini
</ParamField>

<ParamField body="plaintext" type="string" default={false}>
  Force the AI response to use plain text instead of markdown. Allowed values are "true" or
  "active". Any other value will disable plaintext.
</ParamField>

<ParamField body="streaming" type="string" default={false}>
  Return the answer as a stream instead of a JSON. Allowed values are "true" or "active". Any other
  value will disable streaming.
</ParamField>

<ParamField body="include_usage" type="boolean" default={false}>
  When streaming is enabled, set this to `true` to receive credit usage information as a final chunk
  in the stream. The usage chunk will be appended after the `finish` event with the format:
  `{"type":"usage","credits_used":0.123}`. This is similar to OpenAI's `stream_options.include_usage` parameter.
</ParamField>

<ParamField body="additional_context" type="string" default=" ">
  Extra information you want to include for this specific question (will not be stored in your
  knowledge base)
</ParamField>

## Response

<ResponseField name="text" type="string">
  The assistant's response to your question
</ResponseField>

<ResponseField name="credits_used" type="number">
  The number of credits consumed by this request
</ResponseField>

<ResponseField name="credits_remaining" type="number">
  Your account's remaining credit balance for the current billing period
</ResponseField>

<RequestExample>
  ```json Request theme={null}
  {
    "board_id": "winter-frost-CJk4G",
    "chat_id": "chatNode-patient-star-4uIJt",
    "prompt": "What is my favourite number?",
    "model": "gpt-4o",
    "additional_context": "My favourite number is 444"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "text": "Based on the information available, your favorite number is 444.",
    "credits_used": 0.04975,
    "credits_remaining": 1853.74585
  }
  ```
</ResponseExample>
