systemone after it.
Returns the answers directly: no job, no workspace, nothing stored. Send a
state (the situation, as text or any JSON value) and the questions to
decide about it, keyed by name. Drex answers every question in
one call and returns a probability for each outcome.
Each question has a type:
confidence is Drex’s average confidence in the answer. It tracks
the highest value in probabilities but is a different number, so do not
compute one from the other.
The probabilities of a choice or a score add up to 1. A score is an
expected value, so legend[round(score)] names the level nearest it, which is
not always the most likely level. For that, take the highest entry in
probabilities.
model names the decision model as this deployment calls it, and usage
token counts may be null when the model does not report them.
Limits and input rules
- A call carries 1 to 512 questions. A
choicelists 1 to 255 options, and ascore1 to 255 levels. - The state and questions together must fit the decision model’s context. A
longer request is refused with
422at pathstate. - Question names are trimmed, and each answer comes back under the trimmed name. A blank name is refused.
- Unknown fields are refused, except
model, which is accepted and ignored: the deployment chooses the decision model. - A NUL character (
\u0000) anywhere in the body is refused. - Nothing is stored, so sending the same call again is safe. The SDKs do not
retry it on their own; retry a
429afterRetry-After, and a503.
Errors
401 unauthorized— theX-API-Keyheader is missing or the key is invalid. This endpoint does not acceptAuthorization: Bearer.422 invalid_request— the body does not match the schema, or the state and questions are too long for the decision model. Besides the usualdetail.errors, the error carriesdetail.issues: one{path, message}per refused field, by dotted path (state,questions.exception.criteria).detail.errors[].locstarts withbodyand includes the question’s type (["body", "questions", "exception", "choice", "criteria"]);detail.issuespaths leave both out.501 not_implemented— this deployment has no decision model.429 rate_limited— the account’s request or concurrency budget is spent.503 upstream_unavailable— the decision model is unavailable or did not answer within 45 seconds; retry.