cicora.ai / docs
API

Decisions API

Use Jev typed answers with request examples, pricing and limits.

Last updated on

TypeSafe Jev answers specific questions about data: select a category, evaluate a condition or return a score. Responses contain typed values and probabilities. Choose a text model for a regular conversation.

Choose a model

Open the model catalog and select Decisions. Check current availability, pricing, context and capabilities there. Jev appears after it is enabled; use the example ID below only when it is available in your workspace.

In the cabinet, open Chat → model picker → Decisions → Jev. Enter context and questions, then run the evaluation. Choosing a text model restores the normal chat and its history. Selecting a model does not start paid inference.

First request

Use your API key with inference permission and access to the model. Save the body as decision.json, then run:

Terminal
export CICORA_API_KEY="sk_..."

curl --fail-with-body --silent --show-error https://api.cicora.ai/api/alpha/decisions \
  -H "Authorization: Bearer $CICORA_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @decision.json
decision.json
{
  "model": "typesafe/jev-1.14",
  "state": {"order": 1042, "paid": true},
  "questions": {
    "paid": {"type": "noul", "instructions": "The order is paid."},
    "action": {
      "type": "choice",
      "instructions": "Choose the next action.",
      "criteria": {"ship": null, "request_payment": null}
    },
    "priority": {
      "type": "score",
      "instructions": "Rate delivery urgency.",
      "criteria": ["Normal", "Urgent"]
    }
  }
}

Question types

TypeInputRead the answer
noulA condition in instructionsnoul: probability from 0 to 1, not a Boolean
choiceA criteria object mapping option keys to descriptions or nullchoice: the selected option key
scoreAn ordered criteria arrayscore: a position from 0 to the number of levels minus 1; it can be fractional
boxA description of an object in an imageAvailable through System One when supported by the model

state accepts a string, JSON object or array. The names in questions become the keys in answers. Decisions API requires instructions for every question. Choice requires at least one option and Score at least one level. Size and option limits depend on model capabilities.

Response

This is an illustrative response. Actual probabilities and token counts will vary.

Response
{
  "model": "typesafe/jev-1.14",
  "answers": {
    "paid": {"type": "noul", "noul": 0.99},
    "action": {
      "type": "choice", "choice": "ship", "confidence": 0.98,
      "probabilities": {"ship": 0.99, "request_payment": 0.01}
    },
    "priority": {
      "type": "score", "score": 0.1, "confidence": 0.8,
      "probabilities": {"0": 0.9, "1": 0.1},
      "legend": {"0": "Normal", "1": "Urgent"}
    }
  },
  "usage": {"input_tokens": 120, "output_tokens": 0}
}

confidence, probabilities and legend can be absent in Decisions API. Your application chooses its decision thresholds. A probability does not guarantee a correct answer.

Formats and limits

FormatPathInput
Decisions APIPOST /api/alpha/decisionsText and JSON
System OnePOST /v1/systemoneText and JSON; PNG/JPEG when supported

Use Content-Type: application/json. Streaming, messages, temperature, tools and max_tokens are not supported. Image input is not yet accepted through Decisions API; use System One instead.

Cost and retries

The catalog shows current prices per million input and output tokens. Multiple questions can increase metered input; use usage.input_tokens rather than the length of state alone. Balance is temporarily reserved before evaluation and settled against actual usage after the response.

API responses return usage.input_tokens and usage.output_tokens; usage.cost is omitted. Check the actual charge in Usage or in the cabinet result, in your balance currency.

Failures use the common API error format. Correct invalid questions or unsupported capabilities before retrying. After a connection failure, check Usage first: submitting again can create another paid request.

Troubleshooting

On this page