Update Classifier
Update the fields you send. Sending examples replaces them and rebuilds the
classifier in the background (status building); policies keep using the
previous build until the new one is ready.
Authentication
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
The classifier’s id.
Request
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. Omit, or send null, to keep the current value.
Response
Why the last build failed, when status is failed.
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.
Send as a routing policy’s complexity_classifier_id to use it.
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.
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.