# Decisions API

Source: https://cicora.ai/en/docs/decisions

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](/en/models?category=decision) 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](/en/docs/authentication) with inference permission and access to the model. Save the body as `decision.json`, then run:

```bash
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
```

```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

| Type     | Input                                                             | Read the answer                                                                  |
| -------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `noul`   | A condition in `instructions`                                     | `noul`: probability from 0 to 1, not a Boolean                                   |
| `choice` | A `criteria` object mapping option keys to descriptions or `null` | `choice`: the selected option key                                                |
| `score`  | An ordered `criteria` array                                       | `score`: a position from 0 to the number of levels minus 1; it can be fractional |
| `box`    | A description of an object in an image                            | Available through [System One](/en/docs/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.

```json
{
  "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

| Format        | Path                        | Input                                  |
| ------------- | --------------------------- | -------------------------------------- |
| Decisions API | `POST /api/alpha/decisions` | Text and JSON                          |
| System One    | `POST /v1/systemone`        | Text 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](/en/docs/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](/en/docs/usage-costs) or in the cabinet result, in your balance currency.

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

## Troubleshooting


**Why is the model unavailable?**


Check your selected workspace, model access and balance. If Jev is absent from the Decisions catalog, it is not enabled for your access yet.


**What should I do after a timeout?**


Check [Usage](/en/docs/usage-costs) for the request time first. No response does not mean no charge. Make an explicit decision before submitting again.

## FAQ

### What is cicora.ai?

cicora.ai is a multi-model AI workspace and compatible API for chat, text, images, video, coding tools, and teams. Start with the [overview](/en.md), [documentation](/en/docs.md), or [model catalog](/en/models.md).

### How is usage billed?

Confirmed usage is charged in USD from the active workspace's prepaid balance. Use the live catalog for current model prices and the [usage guide](/en/docs/usage-costs.md) for settlement details.

### Which protocols and integrations are available?

Documentation covers OpenAI-compatible Chat Completions and Responses, Anthropic Messages, image interfaces, Claude Code, OpenCode, and Codex CLI. Compatibility does not imply support for every upstream parameter.

### Which sources are authoritative and current?

For model IDs, availability, capabilities, limits, and prices, use the [live catalog](/en/models.md). For API behavior, use the matching [documentation page](/en/docs.md). Never include API keys, private workspace data, or preview URLs in public documents.
