Skip to navigation

Get Classifier

Return a classifier with its examples and quality report.

Authentication

AuthorizationBearer

A management key (mgmt_...), sent as Authorization: Bearer <key>. Reading /v1/routing-policies also accepts the organization’s gateway API keys; writing there needs a management key.

Path parameters

classifier_idstringRequiredformat: "uuid"

The classifier’s id.

Response

The classifier
build_errorstring or nullRead-only

Why the last build failed, when status is failed.

created_atdatetimeRead-only
descriptionstring or null
What the classifier is for.
exampleslist of objects

Labeled prompts: what your requests look like and how complex each one is, from 0 (simple) to 1 (complex). Scores further from 0.5 count more. The classifier is ready once at least 3 are below 0.5 and 3 are at or above it.

has_readoutbooleanRead-only
Whether routers that score with the difficulty readout use it too. Classifiers saved before readouts get one when their examples are next updated.
idstringRead-onlyformat: "uuid"

Send as a routing policy’s complexity_classifier_id to use it.

is_readybooleanRead-only

Whether it has a build that scores requests (also true while a rebuild runs). A policy using a classifier that isn’t ready scores with the built-in scorer.

namestring
Unique within the organization.
quality_reportobject or nullRead-only
null until the classifier is ready.
statusenum

building while the classifier builds in the background after a save (a few seconds to a minute), then ready, or not_enough_examples when either side of 0.5 has fewer than 3 examples, or failed. While a rebuild runs, policies keep using the previous build.

Allowed values:
updated_atdatetimeRead-only

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error