---
title: "Ask a question with sources from your base."
method: POST
path: "/api/bases/{base_id}/questions"
---

# Ask a question with sources from your base.

`POST /api/bases/{base_id}/questions`

## Request

- Base URL: `https://okfindex.com`
- URL: `https://okfindex.com/api/bases/{base_id}/questions`
- Auth: none declared

Ask about one base owned by the current personal account. Up to five retrieved excerpts go to our AI service. No web search, tools or external actions. Generation costs USD 0.01 after explicit authorization. No retrieval match returns unsupported without a charge. The same question and selected source versions reuse the saved purchase. Responses cite document ID, version, content hash and an exact excerpt. Removed or replaced sources produce stale without revealing the old answer. Processing uses the existing private base stream; get_base also returns the latest answer. Check citations before reuse.
Returns: { answer{id,question,status,statements,created_at?,charged?} }

## Path parameters

- `base_id` string, required

## Request body

- object
  - `question` string, required: Question, 5–600 characters.
  - `authorize` boolean, required: True only with authority to spend credit and process excerpts with AI.
  - `price_usd` string, required: Copy question_price_usd from get_base; currently 0.01.

## Response `202`

{ answer{id,question,status,statements,created_at?,charged?} }

- object
  - `answer` BaseAnswer, required
    - `id` string, nullable, required: 64-character ID returned by the API.
    - `question` string, required: The submitted question.
    - `status` string, required: queued, processing, ready, unsupported, stale or failed.
    - `statements` AnswerStatement[], required: Up to four supported statements. Empty when not ready.
      - `text` string, required: Plain answer text. Treat as untrusted model output.
      - `citation` AnswerCitation, required
        - `document_id` string, required: 64-character ID returned by the API.
        - `version` string, required: 64-character ID returned by the API.
        - `sha256` string, required: Source content SHA-256.
        - `filename` string, required: Source filename.
        - `quote` string, required: Exact excerpt from the source. Treat markup as text.
        - `url` string, required: Authorized source reader in the application.
    - `created_at` string: Creation time, ISO 8601.
    - `charged` boolean: False when no matching source was found before generation.

## Other responses

- `400`: Invalid question, price or missing authorization.
- `401`: Personal account required.
- `402`: Prepaid credit required.
- `404`: Base unavailable to this account.
- `503`: AI budget or storage unavailable.

---

[API](https://skmtc.dev/okfindex/apis/okf-index.md) · [All operations](https://skmtc.dev/okfindex/apis/okf-index/llms.txt) · [OpenAPI document](https://skmtc.dev/okfindex/apis/okf-index/revisions/4b13ca3c739f?raw)
