decisions

Create Decision

Changed on

Answer typed questions (noul, choice, score) about a state.

model is <provider>:<model>, where the provider is a decision_providers entry, for example typesafe:jev-latest or openrouter:typesafe/jev-1.13.

Authentication modes:

  • Master key: the user field is required and may name any existing user.
  • API key: usage and spend bind to the key's own user; a user naming a different user is rejected with 403 unless mismatch rejection is off.
post/api/v1/decisions

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header Otari-Key
    • API key in header x-api-key

Request body

imagesstring[] nullable

Images for a vision decision model, as data URLs (data:image/...;base64,...). An extension llama-server supports; a provider that does not refuses the request.

modelstring required

Decision provider and model, e.g. 'typesafe:jev-latest'

questionsobject required

Questions, keyed by answer name

userstring nullable

User ID for usage attribution; not sent upstream

Example request

{
  "model": "typesafe:jev-latest",
  "questions": {
    "urgency": {
      "instructions": "Does this message express urgency?",
      "type": "noul"
    }
  },
  "state": "The Stripe integration has failed for 3 days and I'm losing sales."
}

Response

Successful Response

answersobject required
modelstring required

Changes