Limai Docs
CLI Reference

classify

Document classification commands

$limai classify <subcommand>

Manage classifiers and their routes, and upload and classify documents.

Options
--jsonOutput raw JSON
--verboseEnable debug logging

Subcommands

limai classify list

List the classifiers visible in a project, including the global classifiers that route into it.

$limai classify list

List the classifiers visible in a project.

Options
--project-id <id>Project ID (required)

limai classify create

Create a classifier. Classifiers are always created project-scoped; making one global is a separate action in the app.

$limai classify create

Create a project-scoped classifier.

Options
--name <name>Classifier name (required)
--project-id <id>Project ID (required)

limai classify add-route <classifierId>

Add a route from a classifier to a model. A global classifier may route to a model in any project you can access.

$limai classify add-route <classifierId>

Add a route from a classifier to a model.

Options
--deployment-id <id>ID of the model to route to (required)
--name <name>Route name (required)
--description <desc>Route description (required)

limai classify file <classifierId> <file>

Upload a file and classify it. By default, runs synchronously and returns the classification result immediately. Either way the command prints the routed model's name and its extraction schema ID, or reports the file as UNCLASSIFIED.

$limai classify file <classifierId> <file>

Upload and classify a file.

Options
--asyncClassify with the async endpoint, which also queues extraction

Supported file types: PDF, PNG, JPG, JPEG.

limai classify status <classifierId>

Check the status of an asynchronous classification.

$limai classify status <classifierId>

Check classification status.

Options
--classification-id <id>Classification ID (required)

Examples

Classify a file synchronously

limai classify file cls_abc123 ./document.pdf

Classify and queue extraction in one call

limai classify file cls_abc123 ./document.pdf --async

Check a classification's status

limai classify status cls_abc123 --classification-id clsf_xyz789

List the classifiers routing into a project

limai classify list --project-id proj_abc123

Route a classifier to a model

limai classify add-route cls_abc123 --deployment-id dep_xyz789 --name "Invoices" --description "Supplier invoices"

Get classification result as JSON

limai classify file cls_abc123 ./document.pdf --json

On this page