POST /v1/decide has the same shape:
contextis the text to decide on, such as a user message, a ticket or an agent step.questionsis a map of the decisions you want about that context, keyed by ids you choose.answershas one answer per question, under the same ids, in the same order.
Questions
Options
Option ids are yours. Use the ids your code already understands, liketransaction_charged_twice or calendar_search. Krun returns them exactly as sent, in choice and in probabilities. Option ids can be 1 to 200 characters.
The description is optional:
- With a description, like
"returns": "Returns and refunds", the model reads it to understand the option. Descriptions can be up to 1,000 characters. - Label-only, with
""ornull, the model uses the option id alone. Use readable ids, likelost_or_stolen_card.
Duplicate question ids or option ids, unknown fields and question types other than
choice are rejected with 400 INVALID_REQUEST before any inference runs.Answers
The response also has
model, the model that answered, and usage.input_tokens. See Usage and tokens.
The request id is not in the body. It is in the X-Request-ID response header, and the Python SDK exposes it as result.request_id.