> The full index of these docs is at [llms.txt](https://u22a8.ai/llms.txt).

# Decisions

Call A8 through OpenAI’s Decisions API, the fields it reads, what the number on each answer promises, and where an abstention lands.

*Preview. Applies to a8-1. Last reviewed 2026-10-31.*

A8 answers OpenAI’s Decisions API at `POST https://api.u22a8.ai/v1/decisions`. Any client that takes a custom base URL calls it this way: the OpenAI SDKs (`decisions.create`), LangSmith’s decision-model evaluators, promptfoo’s `openai:decisions` provider, MLflow judges with `model_api="decisions"`, BAML and the gateways that serve `/v1/decisions`, LiteLLM among them.

## 1 Request

One request asks several questions of one input. A8 judges each question as a request of its own, against the same version of your organization’s model:

| Field                      | Type            | How A8 reads it                                                                                                                     | Default  |
| -------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `model`                    | string          | `a8` for your organization’s latest version, a pinned identifier, or `a8-1-1@reference`. Its tag sets the minimum accuracy: `a8:95` | Required |
| `input`                    | string or array | The subject. System and developer items open every question’s criterion                                                             | Required |
| `questions`                | array           | `1` to `400` questions, answered in order                                                                                           | Required |
| `questions[].type`         | string          | `predicate` for a yes or no, `choice` for one of `choices`, `score` for one of `levels`                                             | Required |
| `questions[].instructions` | string          | The criterion                                                                                                                       | Required |
| `questions[].name`         | string          | Echoed on the answer                                                                                                                | `null`   |
| `questions[].choices`      | array           | `2` to `255` values, each a string or a boolean, with an optional `description`                                                     | None     |
| `questions[].levels`       | array           | `2` to `10` labels, lowest first, each with an optional `description`                                                               | None     |

*Table 1.* The fields A8 reads. Every other field is accepted and ignored, `safety_identifier` and the prompt-cache settings among them.

## 2 What is refused

Each of these returns `400`, with an error that names the field and the value that passes:

| Request                                         | Status | Send                                                               |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------ |
| `min_accuracy` in the body                      | `400`  | The minimum accuracy as the model’s tag, as `a8:95`                |
| A `model` tag outside `0` to `99`               | `400`  | A whole number from `0` to `99`                                    |
| `expected` in the body                          | `400`  | The answer as a teach, over [MCP](https://u22a8.ai/docs/a8-mcp.md) |
| No questions, or more than `400`                | `400`  | `1` to `400` questions                                             |
| Two questions with one `name`                   | `400`  | A name per question                                                |
| A `choices` or `levels` count outside its range | `400`  | `2` to `255` choices, or `2` to `10` levels                        |
| An image part, `input_image`                    | `400`  | Text or JSON parts                                                 |
| An `input` with no user message                 | `400`  | The subject as a user message                                      |

*Table 2.* Refused fields and values. Error bodies are on [Errors](https://u22a8.ai/docs/errors.md).

## 3 Minimum accuracy

The minimum accuracy is the accuracy A8 promises on the verdicts it returns. At 95, at least 95% of answered verdicts are correct. The model’s tag sets it for every question in the request: `a8:95` asks for 95, and a pinned identifier carries it too, as `a8-1-1:95@20260715t140322z`.

- **The tag is a whole number from `0` to `99`.** A higher level answers less often and is right more often.
- **By default, the minimum accuracy is 90.**
- **The response’s `model` names the level that answered.**

A question whose verdict falls short of the minimum accuracy comes back as a refusal, and the other questions still answer. At `a8:0`, A8 answers wherever a reading exists, and each answer’s number says which levels it clears, so one request lets you choose the threshold afterwards. What the minimum accuracy promises is on [Accuracy and abstention](https://u22a8.ai/docs/a8-abstention.md).

## 4 The number on each answer

Every answer in this API carries a number. A8’s number is its promise: the strictest minimum accuracy the verdict clears, over 100. A verdict that clears `97` carries `0.97`.

- **A threshold is a minimum accuracy.** Keeping the answers whose number is at least `0.95` keeps exactly the answers `a8:95` returns, and at least 95% of them are correct. The threshold this API asks you to tune on labelled data is a level A8 has already earned on what you taught.
- **A predicate** carries the number in `probability` for a yes, and one minus the number for the opposite answer, so it always sits on the answer’s side of `0.5`.
- **A choice** carries the number on the chosen value, in its `probabilities` entry and in `confidence`. The rest is spread evenly over the other values, since A8’s promise covers the chosen value alone. The chosen value always holds at least an even share.
- **A score** spreads its levels the same way, and `score` is the mean level index of that spread, from `0` for the lowest level.

The promise covers all the answers at or above a threshold, taken together. Measured alone, a band between two thresholds can run below the lower one. Each answer also carries `min_accuracy`, the level it was answered at.

## 5 Reasoning

This API states which part is which, so A8 reads each question as written, as the other interfaces read a request with reasoning off:

| Part      | Where it goes                                                                                                                         |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Criterion | The `input`’s system and developer items, then the question’s `instructions`, then a line for each choice or level with a description |
| Subject   | An `input` string, or its one user message. Any other `input` is its transcript: one `role: text` line per item, tool calls included  |
| Labels    | The question’s `choices` values, or its `levels` labels                                                                               |

*Table 3.* How a question is read. A JSON part, `input_json`, is read as its JSON.

A threshold written in `instructions` counts as part of the criterion. A layout read as written writes `0` reasoning tokens.

## 6 Response

A8 answers with a standard decision object. The answers follow the questions, in order:

```jsonc
{
  "answers": [
    {
      "type": "predicate",
      "name": "refund_requested",
      "min_accuracy": 95, // the level this answer is promised at
      "probability": 0.97 // the strictest level it clears
    },
    {
      "type": "choice",
      "name": "queue",
      "min_accuracy": 95,
      "choice": "shipping",
      "probabilities": [
        {"value": "billing", "probability": 0.02},
        {"value": "shipping", "probability": 0.96},
        {"value": "account", "probability": 0.02}
      ],
      "confidence": 0.96
    },
    {
      "type": "refusal",
      "name": "severity",
      "abstention": {
        "kind": "too_close",
        "asked": 95,
        "answerable_at": 80,
        "earned": 97,
        "missing": null
      }
    }
  ],
  "model": "a8-1-1:95@20260715t140322z", // the version and level that answered
  "usage": {
    "input_tokens": 1240,
    "input_tokens_details": {"cached_tokens": 0, "cache_write_tokens": 0},
    "output_tokens": 0,
    "total_tokens": 1240
  },
  "system_fingerprint": "fit-1a2b3c4d5e6f7890.9e2a1b3c"
}
```

- **`model`** names the exact version that answered, with the minimum accuracy in its tag. Send it back to get the same answers. See [Horizons](https://u22a8.ai/docs/a8-horizons.md).
- **`usage.input_tokens`** counts each text the request reads once, so the input every question shares counts once. A verdict is scored, so `output_tokens` is `0`.
- **`min_accuracy`**, `abstention` and `system_fingerprint` are A8’s fields beside the standard ones. Standard clients carry them through.

## 7 An abstention

An abstention is the question’s `refusal`, which this API returns for a question the model declines while the other questions still answer. Its `abstention` says which check the evidence failed, and at what level the same question is answered. The kinds, and what clears each, are on [Accuracy and abstention](https://u22a8.ai/docs/a8-abstention.md).

Some clients score a refusal as a failure: promptfoo fails the assertion, and Langfuse fails the evaluator run. Ask at `a8:0` and threshold on the number to keep every case in those tools, or send the refused cases to a person and [teach](https://u22a8.ai/docs/a8-teaching.md) their answers.

## 8 Precedents and recall

[Precedents](https://u22a8.ai/docs/a8-precedents.md) and recall travel on Chat Completions, Responses, Anthropic Messages and MCP, whose responses carry a verdict with room beside it. A Decisions answer holds the fields this API defines and A8’s `min_accuracy` and `abstention`. Teaching is over [MCP](https://u22a8.ai/docs/a8-mcp.md), and a criterion taught there answers on this API too.

## 9 Streaming

A Decisions response arrives whole, in one body, as this API defines it.

## 10 Example

A ticket router at a minimum accuracy of 95:

**curl**

```bash
curl https://api.u22a8.ai/v1/decisions \
  -H "Authorization: Bearer $U22A8_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "a8:95",
    "input": "It arrived crushed. I want a refund.",
    "questions": [
      {
        "type": "predicate",
        "name": "refund_requested",
        "instructions": "Is the customer asking for a refund?"
      },
      {
        "type": "choice",
        "name": "queue",
        "instructions": "Which queue does the ticket belong in?",
        "choices": [
          {"value": "billing"},
          {"value": "shipping"},
          {"value": "account"}
        ]
      }
    ]
  }'
```

**Python**

```python
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.u22a8.ai/v1",
    api_key=os.environ["U22A8_API_KEY"],
)

decision = client.decisions.create(
    model="a8:95",  # minimum accuracy 95
    input="It arrived crushed. I want a refund.",
    questions=[
        {
            "type": "predicate",
            "name": "refund_requested",
            "instructions": "Is the customer asking for a refund?",
        },
        {
            "type": "choice",
            "name": "queue",
            "instructions": "Which queue does the ticket belong in?",
            "choices": [
                {"value": "billing"},
                {"value": "shipping"},
                {"value": "account"},
            ],
        },
    ],
)
for answer in decision.answers:
    if answer.type == "refusal":
        print(answer.name, "goes to a person")
    else:
        print(answer.name, answer)
```

**TypeScript**

```typescript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.u22a8.ai/v1",
  apiKey: process.env.U22A8_API_KEY,
});

const decision = await client.decisions.create({
  model: "a8:95", // minimum accuracy 95
  input: "It arrived crushed. I want a refund.",
  questions: [
    {
      type: "predicate",
      name: "refund_requested",
      instructions: "Is the customer asking for a refund?",
    },
    {
      type: "choice",
      name: "queue",
      instructions: "Which queue does the ticket belong in?",
      choices: [
        { value: "billing" },
        { value: "shipping" },
        { value: "account" },
      ],
    },
  ],
});
for (const answer of decision.answers) {
  const said = answer.type === "refusal" ? "goes to a person" : answer;
  console.log(answer.name, said);
}
```

```json
{
  "answers": [
    {
      "type": "predicate",
      "name": "refund_requested",
      "min_accuracy": 95,
      "probability": 0.97
    },
    {
      "type": "choice",
      "name": "queue",
      "min_accuracy": 95,
      "choice": "shipping",
      "probabilities": [
        {"value": "billing", "probability": 0.02},
        {"value": "shipping", "probability": 0.96},
        {"value": "account", "probability": 0.02}
      ],
      "confidence": 0.96
    }
  ],
  "model": "a8-1-1:95@20260715t140322z",
  "usage": {
    "input_tokens": 46,
    "input_tokens_details": {"cached_tokens": 0, "cache_write_tokens": 0},
    "output_tokens": 0,
    "total_tokens": 46
  },
  "system_fingerprint": "fit-1a2b3c4d5e6f7890.9e2a1b3c"
}
```

The samples need Python 3.10 or later with `openai` 3.26 or later, or `openai` 7.30 or later for TypeScript. The minimum accuracy travels in `model`, which every SDK and gateway passes through.

## Next steps

- [Accuracy and abstention](https://u22a8.ai/docs/a8-abstention.md): How a request sets the minimum accuracy a verdict must meet, what that level promises and the five kinds of abstention.
- [API overview](https://u22a8.ai/docs/api-overview.md): What every request to A8 shares, from the base URL and authentication to the request parts and the response fields.
- [Errors](https://u22a8.ai/docs/errors.md): Every status A8 returns for a failed request, with its body, its cause and its fix, and how each SDK raises it.
