Global Classifiers
Organization-scoped classifiers that route documents into models across projects.
A classifier is normally owned by a single project: it can only route documents to models inside that project, and it is only listed there. A global classifier is owned by the organization instead. Its routes may target models in any project of the organization, so one classifier can fan documents out across the whole account.
Scope is a property of the classifier itself:
| Scope | projectId | Routes may target | Listed in |
|---|---|---|---|
| Project | the owning project ID | models in that project only | the owning project |
| Global | null | models in any project of the organization | every project it routes into |
Becoming Global
Classifiers are always created project-scoped. POST /api/v1/classify requires projectId, and there is no API parameter that creates a global classifier directly.
Turning a project classifier into a global one — and turning it back — is an explicit action in the platform, on the classifier detail page:
- Make global requires organization-level model editing rights. The classifier keeps its existing routes, its name must be unique across the organization, and deleting the original project no longer deletes the classifier.
- Make project-scoped is only offered when every route already targets models in a single project; the classifier is then owned by that project again.
Existing classifiers are unaffected until someone upgrades them.
Routes Across Projects
/api/v1/classify/{classifierId}/routesRoute creation is where the scope rules are enforced:
- Project classifier — the model must belong to the classifier's own project. Anything else returns
400. - Global classifier — the model must belong to the same organization, and the caller must have access to that model's project. A caller without access to the target project gets
403.
The model needs an extraction schema, and a classifier cannot have two routes to the same target. The body field is still named deploymentId and takes the model's ID.
Routing into a deployment
deploymentId names the model the route sends documents to. Add targetDeploymentId to send them through one of that model's deployments instead, so the document is stamped with the deployment and extracted against the schema it serves. A route to the model and a route to one of its deployments are two different targets, and one classifier can hold both.
| Field | Type | Description |
|---|---|---|
deploymentId | string | The model the route targets. Required. |
targetDeploymentId | string | null | One of that model's deployments. Omit or send null to route to the model directly. A deployment of another model returns 400; a second route to the same model and deployment returns 409. |
While a target deployment is paused, its route leaves the candidate set: the classifier picks among its other routes, and records the document UNCLASSIFIED with a reason when no active route remains.
const response = await fetch(
`https://app.limai.io/api/v1/classify/${CLASSIFIER_ID}/routes`,
{
method: "POST",
headers: {
"Authorization": `Bearer ${API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
deploymentId: "dep_other_project",
name: "Delivery Notes",
description: "Signed delivery notes with a shipment number"
})
}
)Listing Classifiers
/api/v1/classifyListing is always done per project — there is no organization-wide listing endpoint. A global classifier is included in a project's list when at least one of its routes targets a model in that project. Visibility is derived from routes, so a global classifier with no route into a project does not appear there.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
projectId | string | query | Yes | The project whose classifiers to list. Returns the project's own classifiers plus every global classifier that routes into it. |
Request
const response = await fetch(
`https://app.limai.io/api/v1/classify?projectId=${PROJECT_ID}`,
{ headers: { "Authorization": `Bearer ${API_TOKEN}` } }
)
const classifiers = await response.json()Response
[
{
"id": "cls_global_1",
"name": "Inbound Mail",
"projectId": null,
"isGlobal": true,
"routeProjects": [
{
"id": "proj_finance",
"name": "Finance"
},
{
"id": "proj_logistics",
"name": "Logistics"
}
],
"deploymentRoutes": [
{
"id": "route_1",
"name": "Invoices",
"description": "Supplier invoices",
"deploymentId": "dep_inv",
"deployment": {
"id": "dep_inv",
"name": "Invoice Processing",
"type": "MODEL",
"projectId": "proj_finance",
"project": {
"id": "proj_finance",
"name": "Finance"
}
},
"targetDeploymentId": "dpl_prod01",
"targetDeployment": {
"id": "dpl_prod01",
"name": "production",
"status": "ACTIVE"
}
}
],
"classificationCount": 1284,
"createdAt": "2026-01-04T10:00:00.000Z",
"updatedAt": "2026-02-11T08:30:00.000Z"
}
]| Field | Type | Description |
|---|---|---|
projectId | string | null | The owning project, or null for a global classifier. |
isGlobal | boolean | true when projectId is null. |
routeProjects | array | Distinct projects reached by the classifier's routes. A project classifier always reports its own project. |
deploymentRoutes | array | Every route, each with the target model and the project that model belongs to, plus targetDeploymentId and targetDeployment (id, name, status) when the route sends documents through one of the model's deployments, null otherwise. |
classificationCount | number | Total classifications performed by the classifier. |
Classifying Documents
The classification endpoints are unchanged and behave identically for both scopes. Pass the classifier ID and the platform resolves the routes it is allowed to use:
- Get Upload URL —
GET /api/v1/classify/{classifierId}/get-url - Classify —
POST /api/v1/classify/{classifierId} - Classify Async —
POST /api/v1/classify/{classifierId}/async
For a global classifier the document can land in a model outside the project you started from; the response still returns the routed deploymentName and extractionSchemaId, and the extraction lives in the routed model's project.
Token Access
| Token scope | Project classifier | Global classifier |
|---|---|---|
| Organization | usable when the token's teams grant access to the owning project | usable when the token's teams grant access to at least one route project |
| Project | usable when the classifier belongs to the token's project | usable for classification when the classifier routes into the token's project |
A project-scoped token never administers a global classifier — creating routes and changing scope require organization-level model editing rights.
CLI
limai classify list lists a project's classifiers, including the global ones routing into it, and marks each row with its scope:
limai classify list --project-id proj_financeid name scope routes projects classifications
cls_global_1 Inbound Mail GLOBAL 4 Finance, Logistics 1284
cls_local_7 Contracts PROJECT 2 Finance 96limai classify create always creates a project-scoped classifier. limai classify add-route can target a model in another project when the classifier is global and you have access to that project.