Skip to main content
POST
Rate limit tier: submission, 60 requests/min. See Rate limits. Answers a question about what a workflow’s documents say: contract terms, invoice details, anything that needs reading rather than a field lookup. Extraction answers “what is in this document”. This endpoint answers “what do these documents say about X”, across the workflow’s current corpus. Every answer carries the exact quotes it rests on. Each quote resolves to a page and a region in the source PDF, so you can show a customer where a number came from.

Requires a knowledge base

The workflow needs a knowledge node. Without one, the endpoint returns 409 KNOWLEDGE_NOT_ENABLED. Add the node in Studio, or include it when you create the workflow. Adding the node makes subsequent completed runs eligible for ingestion. It does not backfill documents that completed earlier. A member starts Index existing documents or Retry indexing from the workflow’s Knowledge tab when needed. A pack that already exists keeps serving while a later upload is re-indexed in the background, so there is no manual “update” action to trigger. These app actions are not public REST or MCP operations. The corpus is workflow-scoped, not version-scoped. It keeps the current parsed content for each live file across runs and versions. It is not a version history.

Errors

Follow-up questions

Pass a thread_id you mint yourself, starting with kb-, to ask in the context of earlier questions in that thread. Omit it and each question stands alone. Reuse the same id to continue a conversation.

Billing

The platform charges per question and meters the text the agent reads. A narrow question over a small corpus therefore costs a fraction of a broad sweep over a large one. A question the organization cannot pay for is refused up front.

Authorizations

Authorization
string
header
required

API key issued from app.anyformat.ai/api-key. Send as Authorization: Bearer <key>.

Path Parameters

workflow_id
string
required

Body

application/json
question
string
required

A question about the content of this workflow's documents.

Minimum string length: 1
Example:

"Which contracts renew before March and what notice do they need?"

thread_id
string | null

Optional conversation id, minted by you, to ask a follow-up in context. Must start with kb-. Reuse it to continue; omit it for a fresh question.

Maximum string length: 64
Pattern: ^kb-[A-Za-z0-9._-]+$
Example:

"kb-renewals-q3"

Response

Successful Response

answer
string
required
citations
AskCitationV3 · object[]
required
path
AskStepV3 · object[]
required

The route the agent took to the answer — auditable, not decorative.

steps_used
integer
required
thread_id
string | null

Present when the question was asked in a thread.