> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oumi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# OVERVIEW

> Get started using decision models in production

## WHAT IS A DECISION MODEL

A decision model answers narrow, multiple-choice questions instead of generating open-ended text. You give it a state that describes the current situation and a set of questions about that state. It returns a probability for each answer option, scoring all questions in parallel.

A generative LLM produces its answer one token at a time. That makes it flexible, but slow and expensive when all you need is a choice between a few options. A decision model skips text generation and only scores the options, so each decision is faster and cheaper.

A decision model can't write code, compose messages, or explain its reasoning. Use it as a fast decision layer next to your LLM, not as a replacement. The LLM sets up the state and acts on the result; the decision model makes the call.

### WHEN TO USE A DECISION MODEL

Decision models fit high-volume decisions where speed and cost matter:

* **Agent guardrails:** check each action an agent proposes, such as exposing secrets, deleting data, or sending data outside your network, before it runs.
* **Content moderation:** classify large volumes of user content against your policies.
* **Routing:** pick which tool, workflow, or model handles a request.
* **Automated testing and navigation:** choose the next action in a game, UI, or browser session.

## API INTERFACE

You send each decision as one request. The request holds the state to evaluate and the questions to answer about it. The response holds one answer per question.

| | Value |
| - | - |
| **Endpoint** | `POST https://inference.oumi.ai/v1/systemone` |
| **Auth header** | `X-API-Key: $OUMI_API_KEY` |

> [!TIP]
>
> You can start right away with our pretrained Iris model. Set `model` to
> `projects/{project_id}/models/iris-latest`, using the ID of any project you
> own. No training or deployment needed.

### REQUEST

| Field | Type | Required | Description |
| - | - | - | - |
| `model` | string | Yes | The decision model to call, as a path that includes your project: `projects/{project_id}/models/{model_name}`. For example, `projects/FOOBAR-123/models/iris-latest`. |
| `state` | string, object, or array | Yes | The content to evaluate: a plain string, or a JSON object or array of related context. |
| `questions` | object | Yes | The questions to answer, keyed by a name you choose. That name is the key for the answer in the response. |

Each question has a `type`, `instructions` that state the question, and `criteria` that describe the possible answers. There are three question types:

| Type | Use it for | `criteria` format |
| - | - | - |
| `noul` | Yes or no questions | An object with a `true` and a `false` description. Optional. |
| `choice` | Picking one option from a set | An object that maps each option name to its description. |
| `score` | Placing the state on an ordered scale | An array of descriptions, ordered from lowest to highest. |

`instructions` and each criteria description can be a plain string, or a JSON object or array of structured guidance.

```bash curl theme={null}
curl -X POST https://inference.oumi.ai/v1/systemone \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $OUMI_API_KEY" \
  -d '{
    "model": "projects/{project_id}/models/iris-latest",
    "state": {
      "customer_tier": "enterprise",
      "ticket": "My checkout page shows a blank screen after I click Pay. I have tried two browsers."
    },
    "questions": {
      "is_bug": {
        "type": "noul",
        "instructions": "Is the customer reporting a software defect?",
        "criteria": {
          "true": "The customer describes broken or unexpected product behavior.",
          "false": "The customer is asking a question or requesting a feature."
        }
      },
      "team": {
        "type": "choice",
        "instructions": "Which team should own this ticket?",
        "criteria": {
          "account": "Login, permissions, or profile issues.",
          "frontend": "Rendering, layout, or browser compatibility issues.",
          "payments": "Checkout, billing, or payment processing issues."
        }
      },
      "urgency": {
        "type": "score",
        "instructions": "How urgent is this ticket?",
        "criteria": [
          "Can wait for the next release",
          "Should be fixed this week",
          "Blocking revenue right now"
        ]
      }
    }
  }'
```

### RESPONSE

| Field | Type | Description |
| - | - | - |
| `model` | string | The model path from your request. |
| `answers` | object | One answer per question, keyed by the question names from your request. |
| `usage` | object | `inputTokens` and `outputTokens` for the request. |

The fields in each answer depend on the question type:

| Type | Fields |
| - | - |
| `noul` | `noul`: the probability that the answer is `true`, from 0 to 1. |
| `choice` | `choice`: the most likely option. `probabilities`: the probability of each option. `confidence`: how sure the model is of its pick. |
| `score` | `score`: the expected position on the scale, from 0 to the last index. `probabilities`: the probability of each position. `legend`: maps each position to its criteria description. `confidence`: how sure the model is of its pick. |

```json Response theme={null}
{
  "model": "projects/{project_id}/models/iris-latest",
  "answers": {
    "is_bug": {
      "type": "noul",
      "noul": 0.9252490387264224
    },
    "team": {
      "type": "choice",
      "choice": "payments",
      "confidence": 0.9057838757165146,
      "probabilities": {
        "account": 0.011615685025438532,
        "frontend": 0.05119506449688511,
        "payments": 0.9371892504776764
      }
    },
    "urgency": {
      "type": "score",
      "score": 1.8715208986248113,
      "confidence": 0.8411583967409364,
      "probabilities": {
        "0": 0.022584699202479703,
        "1": 0.08330970297022941,
        "2": 0.8941055978272909
      },
      "legend": {
        "0": "Can wait for the next release",
        "1": "Should be fixed this week",
        "2": "Blocking revenue right now"
      }
    }
  },
  "usage": {
    "inputTokens": 334,
    "outputTokens": 0
  }
}
```

In this example, the model is 93% sure the ticket is a bug, routes it to the payments team, and rates it as blocking revenue.

## AVAILABLE MODELS

> [card] [Iris](https://docs.oumi.ai/guides/decision-models/iris.md)
>
> Call and fine-tune the Iris decision model.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.