Skip to main content

Ask questions about your documents

What you get

You get answers, not search results to read through: ask "Which invoices are overdue, and by how much?" and Talonic replies in plain text, with each claim citing the document and passage it came from. When you know what you are looking for, search finds any document, value or field in one box, and filters narrow your documents by the values Talonic extracted. This guide is for anyone who needs facts out of their documents, and for developers building that into their own tools.

Before you start

  • Documents in your workspace. Answers and filters use what Talonic has read from them.
  • Any role can ask and search. Answers respect what you are allowed to see, and asking never changes your data.
  • For the API: a key with the read scope. Asking costs credits, so the workspace needs a balance.

Do it in the app

  1. Ask: press Cmd+I (Ctrl+I on Windows) on any page, or use the question box on the home page. Opened from a document, the question already has that document in view.
  2. Read the answer and click a citation to open the document with the cited passage highlighted. A check mark shows whether the claims held up on a second look; treat "issues" as a pointer to verify, not a verdict.
  3. Search: press Cmd+K (Ctrl+K) and type an invoice number, a name, a field or a Spec. Results are grouped by documents, values, fields, Specs and sources. A value found in many documents opens the Documents list already filtered to it.
  4. Filter: on Documents, type into the filter bar with facet:value (for example type:Invoice, source:, tag:, batch:), or add a condition on an extracted field such as total amount greater than 10,000. Bookmark or save the view as a preset.

Do it with the API

POST /v1/ask takes a question and returns 202 with an ask_id at once. Poll GET /v1/ask/{id} about every 2 seconds (answers usually take 10 to 60 seconds) or stream GET /v1/ask/{id}/stream. Narrow the question with scope (document_ids, pipeline_id, data_product_id, document_type, source_id, tags, dates), keep a conversation going with conversation_id, and shape the reply with output_format. GET /v1/search?q= searches everything at once, and POST /v1/documents/filter returns documents matching field conditions (eq, neq, gt, gte, lt, lte, between, contains, is_empty, is_not_empty).

curl: ask a scoped question, then poll
curl -s -X POST https://api.talonic.com/v1/ask \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "question": "Which invoices are overdue, and by how much?",
        "scope": { "document_type": "Invoice" },
        "output_format": { "instruction": "Answer as a table: invoice, due date, days overdue." } }'
# -> { "ask_id": "3fa85f64-...", "status": "processing", "poll_url": "/v1/ask/3fa85f64-...", ... }

curl -s https://api.talonic.com/v1/ask/$ASK_ID \
  -H "Authorization: Bearer $TALONIC_API_KEY"
Node: search, then filter on a field
import { Talonic } from '@talonic/node';

const talonic = new Talonic({ apiKey: process.env.TALONIC_API_KEY });

const hits = await talonic.search('Acme Corp', { limit: 10 });
console.log(hits.documents, hits.fieldMatches);

const invoices = await talonic.documents.filter({
  conditions: [
    { fieldId: vendorFieldId, operator: 'eq', value: 'Acme Corp' },
    { fieldId: dateFieldId, operator: 'between', value: '2026-01-01', valueTo: '2026-12-31' },
  ],
  limit: 50,
});
console.log(invoices.total);
Response: GET /v1/ask/{id} (completed)
{
  "ask_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "completed",
  "conversation_id": "8c4f2a1e-0b6d-4e2f-9a3c-5d7e1f2a3b4c",
  "answer": "Two invoices are overdue: [INV-1041](https://app.talonic.com/documents/1b6f...?cite=due_date) by 12 days and INV-1055 by 3 days.",
  "citations": [
    { "quote": "INV-1041", "document_id": "1b6f2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
      "kind": "field", "reference": "due_date", "filename": "invoice-1041.pdf",
      "app_url": "https://app.talonic.com/documents/1b6f2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d?cite=due_date" }
  ],
  "verification": { "verdict": "supported", "checks_total": 3, "checks_unsupported": 0 },
  "usage": { "tokens": 18432, "credits_charged": 100 }
}

A filter condition names a field by its ID; search results with a resolvedFieldId can be passed straight into a filter. Use GET /v1/search/autocomplete to find field IDs by name and GET /v1/search/field-values for the values a field holds, with counts.

Do it with an agent

Use talonic_ask for questions, talonic_search to find documents and values, and talonic_filter to list documents by field conditions. Ask, for example: "Using Talonic, which supplier contracts renew in the next 90 days? Cite the clause for each."

Limits and costs

  • Each accepted question costs a flat 100 credits, charged once when it starts. Polling, streaming and retrying the same ask_id never charge again. usage.credits_charged on the answer shows the charge.
  • Daily question limits by plan: free 200, individual 100, pro 5,000, enterprise unlimited. Polling counts as an ordinary read, not as a question. At most 20 streams can be open per workspace at once.
  • question up to 20,000 characters; scope.document_ids up to 1,000 and scope.tags up to 100. An empty document_ids list matches nothing.
  • Search and filter cost no credits. Filter pages hold up to 500 documents (default 50); search returns up to 20 results per group by default.

Errors

ParameterTypeDescription
400bad_requestMissing `question`, a scope over its limits, or a malformed filter body (condition without `fieldId` or `operator`, sort direction other than `asc`/`desc`).
402insufficient_creditsThe balance cannot cover one question. Nothing ran; the body carries `buy_credits_url`. Top up and ask again.
403insufficient_scopeThe key lacks the `read` scope.
404not_foundNo ask with this ID in your workspace.
429rate_limit_exceededDaily question limit or stream ceiling reached. Retry after `Retry-After`, or fall back to polling.
A filter condition with an unknown operator is skipped rather than refused, and a field ID that matches nothing returns no documents. Check both before you trust an empty result.

Next

Frequently asked questions

How much does a question cost?+
A flat 100 credits per accepted question, however long the answer. Polling, streaming and retrying the same question are free. Search and filter calls cost no credits.
Can I limit a question to certain documents?+
Yes. Pass scope with document IDs, a document type, a source, tags, a data product or a date range. Talonic then reads only those documents, and an empty document list matches nothing rather than everything.
Can an answer change my data?+
No. Asking is read-only: it never edits documents, Specs or results. Over the API it runs with viewer rights, and in the app it respects your role.