Decisions

Make a decision

Ask a model to pick one option per question, with a confidence, instead of writing prose you have to parse back into a choice.

Send the state and the questions; every question comes back with one of the options you supplied, a confidence between 0 and 1, and the probabilities across the options when the model reports them.

Billed per input token at the model's published rate, rounded up to the nearest $0.0001 — the smallest amount the ledger holds — with output free. usage.cost is the amount taken from your balance, not a number rounded again later. Failures are not charged.

post/decisions

Request

  • Base URL: https://kymaapi.com/v1
  • URL: https://kymaapi.com/v1/decisions
  • Auth: bearerAuth (a scheme the document does not define)

Request body

modelstring

The decisions model. jev is the only value today; any other returns 400.

statestring required

What the model is deciding about, in your own words.

questionsobject required

One or more questions keyed by an id you choose. Each must be a choice question: {"type": "choice", "instructions": "…", "criteria": {"<option>": "<what it means>"}} with at least one option.

Example request

{
  "model": "jev",
  "state": "Proposed shell command: `rm -rf ./build` in a CI job that has already published its artifacts."
}

Response

One answer per question asked

idstring
modelstring
answersobject

Example response

{
  "model": "jev"
}

Changes

No recorded changes to this operation across all 1 revision of this API.