Kriyam Docwise
AsyncRead a set of documents end to end — parse, classify and extract.
Overview
Post up to five documents with the steps you want run over them, and Docwise processes them as one session. Unlike the single-purpose tools, a session is a pipeline: each step you ask for pulls in whatever it depends on, and the work continues long after the response returns.
- Register a webhook on the key before calling this. You're told when the session reaches a terminal state; reading the session is a reconciliation backstop, not the normal path.
capabilityis repeated once per step. Dependencies are resolved for you — asking forextractalone also runsparse, because it can't extract from a document it hasn't read. You are charged for the steps that actually ran.- A session is charged per capability as each one delivers, not up front. A session that parses and then fails to classify pays for the parse and nothing else, so there is no refund path to reason about.
- The steps on offer are configurable, and one that isn't currently active is refused at creation rather than accepted and skipped.
parse,classifyandextractare the steps that run today. - Send
extraction_schemato decide whatextractpulls out. Without it, Docwise works out a schema from the documents themselves, which suits exploring, but the fields can differ from one session to the next. With it, extraction runs straight against your fields and the result comes back in exactly the shape you asked for, every time. extraction_schemais a JSON Schema object, sent as one form field holding its JSON text. Every field needs adescription— at every level, including the columns of an array of objects — because the description is what tells the model which value belongs in the field:amountalone could be any figure on an invoice, while "Grand total payable including tax" can only be one.typeis optional; use it (string,number,integer,boolean,object,array,null, or a list of them) when the shape matters to you.
Endpoints
POSTStart a document processing session
/models/docwise/v2Uploads a set of documents and starts reading them.
GETGet a session details
/models/docwise/{session_id}Returns a session with each document, its per-stage progress and whatever results are ready.
Where the result is delivered when the work finishes, and how to verify a delivery.
