Splitter output types

Splitter outputs follow standardized formats. Understanding these formats is essential when working with evaluation sets, webhooks, and API responses.

Split Output Type

Type Definition

1type SplitOutput = {
2 splits: Split[];
3};
4
5type Split = {
6 // Required fields (all present in API response)
7 classificationId: string; // The id of the classification type (set in the splitter config)
8 type: string; // The type of the split document, corresponds to the classificationId
9 startPage: number; // The start page of the split document
10 endPage: number; // The end page of the split document
11 observation: string; // Explanation of the results
12 identifier: string; // Identifier for the split document (e.g. invoice number)
13 fileId: string; // The file ID of the split document
14
15 // Optional field
16 name?: string; // Optional name for the split
17};
18
19// For creating evaluation set items, use this subset:
20type ProvidedSplit = {
21 classificationId: string; // Required
22 type: string; // Required
23 startPage: number; // Required
24 endPage: number; // Required
25};

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}