Skip to navigation

Evaluate typed classification questions against a shared state.

Evaluates independently answered Noul, Choice and Score questions using a classification model. The JSON body is limited to 8 MiB. Rendered state must be nonempty and at most 4 MiB; each expanded question must be nonempty and at most 16 KiB. At most 4096 questions and expanded binary branches are allowed. Unknown request fields are rejected. No output tokens are generated.

Authentication

AuthorizationBearer
Mixlayer API key or console user session supplied as a Bearer token.

Request

This endpoint expects an object.
modelstringRequired>=1 character

Classification model identifier; nonempty and at most 256 UTF-8 bytes.

questionsmap from strings to objectsRequired

Between 1 and 4096 questions. IDs must be nonblank and at most 256 UTF-8 bytes.

statestring or map from strings to any or list of anyRequired

State may be text, a JSON object or a JSON array; scalar numbers, booleans and null are rejected.

Response

Typed answers keyed by the supplied question IDs, with actual input token usage
answersmap from strings to objects
Exactly the question IDs supplied in the request, with matching answer types.
modelstring
usageobject
Actual forward input tokens count the shared prefix once plus every branch suffix.

Errors

401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error