Skip to content

The platform

Classify

Label documents and split a file into its classes, with your own classes or ours.

A classification job reads a document and tells you what it is: an invoice, a delivery note, a contract. When one file holds several documents, the result also says which pages belong to which class.

Without classes, ByteIt uses its default classes. To use your own, send classes as a list of label and description pairs: only those classes are used. In a form upload, classes is one field holding a JSON array.

curl -X POST "https://byteit.ai/v1/jobs/classification-jobs/" \
-H "X-API-Key: $BYTEIT_API_KEY" \
-F "file=@invoice.pdf" \
-F "nickname=inbox-batch"

When the job is completed, the job’s document_class is the class of most of its pages, or mixed on a tie. The result lists every page with its label and its group: pages with the same group belong to the same document, so one scanned file splits into its documents.

{
"pages": [
{ "page": 1, "label": "invoice", "group": 1 },
{ "page": 2, "label": "invoice", "group": 1 },
{ "page": 3, "label": "delivery_note", "group": 2 }
]
}

Keep a set of document classes on your account and reuse them: create, list, update and delete them in Document classes.