---
title: "Extractive question answering"
method: POST
path: "/extractions/qa"
tags: ["Extractions"]
---

# Extractive question answering

`POST /extractions/qa`

Extract information from documents with an Isaacus extractive question answering model.

## Request body

- AnswerExtractionRequest — A request to extract answers from documents with an Isaacus extractive question answering model.
  - `model` 'kanon-answer-extractor', required — The ID of the [model](https://docs.isaacus.com/models#extractive-question-answering) to use for extractive question answering.
  - `query` string, required — The query to extract the answer to. The query must contain at least one non-whitespace character. Unlike the texts from which the answer will be extracted, the query cannot be so long that it exceeds the maximum input length of the model.
  - `texts` string[], required — The texts to search for the answer in and extract the answer from. There must be at least one text. Each text must contain at least one non-whitespace character.
  - `ignore_inextractability` boolean — Whether to, if the model's score of the likelihood that an answer can not be extracted from a text is greater than the highest score of all possible answers, still return the highest scoring answers for that text. If you have already determined that the texts answer the query, for example, by using one of our classification or reranker models, then you should set this to `true`.
  - `top_k` integer — The number of highest scoring answers to return. If `null`, which is the default, all answers will be returned.
  - `chunking_options` ChunkingOptions — Options for how to split text into smaller chunks.
    - `size` integer, nullable — A whole number greater than or equal to 1.
    - `overlap_ratio` number, nullable — A number greater than or equal to 0 and less than 1.
    - `overlap_tokens` integer, nullable — A whole number greater than or equal to 0.

## Response `200`

The results of extracting answers from texts.

- AnswerExtractionResponse
  - `extractions` AnswerExtraction[], required — The results of extracting answers from the texts, ordered from highest to lowest answer confidence score (or else lowest to highest inextractability score if there are no answers for a text).
    - `index` integer, required — The index of the text in the input array of texts that this result represents, starting from `0` (and, therefore, ending at the number of texts minus `1`).
    - `answers` Answer[], required — Answers extracted from the text, ordered from highest to lowest score.
      - `text` string, required — The text of the answer.
      - `start` integer, required — The index of the first character of the answer in the text, starting from `0` (and, therefore, ending at the number of characters in the text minus `1`).
      - `end` integer, required — The index of the character immediately after the last character of the answer in the text, starting from `0` (such that, in Python, the answer is equivalent to `text[start:end]`).
      - `score` number, required — A score between `0` and `1`, inclusive, representing the strength of the answer.
    - `inextractability_score` number, required — A score between `0` and `1`, inclusive, representing the likelihood that an answer can not be extracted from the text. Where this score is greater than the highest score of all possible answers, the text should be regarded as not having an extractable answer to the query. If that is the case and `ignore_inextractability` is `false`, no answers will be returned.
  - `usage` AnswerExtractionUsage, required — Statistics about the usage of resources in the process of extracting answers from the texts.
    - `input_tokens` integer, required — The number of tokens inputted to the model.

## Other responses

- `400` — The request was invalid or could not be processed.
- `401` — The API key you provided does not exist, is expired or revoked, or is not authorized to access this resource.
- `402` — Your account is overdue, please pay any outstanding invoices to continue using our services.
- `403` — You are not allowed to access this resource.
- `413` — The request is larger than the server is willing or able to process.
- `500` — An unexpected error occurred while processing the request.

## Changes

- **2026-03-11** `3fc0da1b03c0` — 3 breaking
  - the `model` request property const value `kanon-answer-extractor` was added
  - removed the enum value `kanon-answer-extractor` of the request property `model`
  - removed the enum value `kanon-answer-extractor-mini` of the request property `model`
- **2026-03-09** `0768ad934de9` — 1 info
  - the `query` request property's maxLength was increased from `5000` to `10000000`
- **2026-02-04** `eb64c01e148b` — 1 warning
  - the `chunking_options/oneOf[subschema #1: Chunking options]/overlap_tokens/oneOf[subschema #1: Non-negative integer]/` request property's min was set to `0.00`

[Change history](https://skmtc.dev/isaacus-dev/apis/isaacus-api/changes/extractions/qa/post.md)

---

[API](https://skmtc.dev/isaacus-dev/apis/isaacus-api.md) · [All operations](https://skmtc.dev/isaacus-dev/apis/isaacus-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/isaacus-dev/isaacus-api/revisions/b650dd142971/schema)
