Processor output types

Document processor outputs follow standardized formats based on the processor type. Understanding these formats is essential when working with evaluation sets, webhooks, and API responses.

Splitter Output Type

Type Definition

1type SplitterOutput = {
2 splits: Split[];
3};
4
5type Split = {
6 classificationId: string; // The id of the classification type (set in the processor config)
7 type: string; // The type of the split document (set in the processor config), corresponds to the classificationId.
8 startPage: number; // The start page of the split document
9 endPage: number; // The end page of the split document
10
11 // Fields included in outputs, but not required for creating an evaluation set item
12 identifier?: string; // Identifier for the split document (e.g. invoice number)
13 observation?: string; // Explanation of the results
14};

Example

1{
2 "splits": [
3 {
4 "classificationId": "invoice",
5 "type": "invoice",
6 "startPage": 1,
7 "endPage": 3
8 },
9 {
10 "classificationId": "other",
11 "type": "other",
12 "startPage": 4,
13 "endPage": 5
14 }
15 ]
16}