> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.milliseconds.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.milliseconds.ai/_mcp/server.

# decision-machine-1

`decision-machine-1` is a decisions API. You send text and a question about it. You get a typed answer back: a yes/no, a label, a path through a label tree, a rating, an answer span, a filled JSON Schema, a list of entities, or a value check.

It does not write prose. It does not chat. Every call returns structured JSON with probabilities, so your code can branch on a number instead of parsing a sentence.

## Watch the walkthrough

Nina, who leads applications development, walks through what `decision-machine-1` does in under six minutes. She covers invoices, leases, clinical notes, support tickets and a pre-check in front of a chat model.

Every call goes to `https://api.milliseconds.ai` with your milliseconds.ai API key. See [Authentication](/authentication). The price is \$0.04 per million input tokens and \$0 per output token. See [Pricing](/reference/pricing).

> **Note**
>
> **Decisions, not generation.** Each capability answers one question about one text. Most calls finish in about 0.4 seconds.

## The whole surface

| Endpoint                                    | Question it answers                                                         | Returns                                                              | Typical latency   |
| ------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------- | ----------------- |
| `POST /v1/decision-machine-1/yes-no`        | Is this statement true of the text?                                         | `statement`, `answer`, `probability`                                 | 0.42 s            |
| `POST /v1/decision-machine-1/classify`      | Which label applies?                                                        | `label`, `probability`, `confidence`, `scores`                       | 0.43 s            |
| `POST /v1/decision-machine-1/classify-tree` | Which path through this label tree applies?                                 | `path`, `label`, compound `probability` and `confidence`, `levels[]` | 0.77 s (2 levels) |
| `POST /v1/decision-machine-1/rate`          | Where does this sit on a scale?                                             | `score`, `level`, `confidence`, `scores`                             | 0.42 s            |
| `POST /v1/decision-machine-1/answer`        | What does the text say about this?                                          | `question`, `answer` span, `probability`, `start`, `end`             | 0.40 s            |
| `POST /v1/decision-machine-1/extract`       | Fill this JSON Schema from the text.                                        | `data`                                                               | 0.41 s            |
| `POST /v1/decision-machine-1/entities`      | Where is every span of each type?                                           | `entities` with type, text, probability, offsets                     | 0.42 s            |
| `POST /v1/decision-machine-1/verify`        | Does the text support this value?                                           | `matches`, `probability`, `found`                                    | 0.40 s            |
| `POST /v1/chat/completions`                 | OpenAI clients: extraction and function calling                             | Chat completion object                                               | 0.39 – 0.72 s     |
| `POST /v1/systemone`                        | TypeSafe clients: named `noul`, `choice` and `score` questions on one state | One typed answer per question                                        | 0.17 s            |
| `GET /v1/models`                            | Which models does the OpenAI-compatible surface serve?                      | A list with one model object                                         | —                 |

Every capability accepts `text` (up to 20,000 characters) or `texts` (up to 32 items). A batch returns `{ "results": [ ... ] }` in input order.

The latencies are wall-clock times against production on 2026-09-18, median of 7 runs from a laptop. They include TLS and internet transit.

## One call

```bash
curl -X POST https://api.milliseconds.ai/v1/decision-machine-1/classify \
  -H "Content-Type: application/json" \
  -H "authorization: Bearer test_sk-..." \
  -d '{
    "text": "I was charged twice for my subscription this month and support has not replied.",
    "labels": {
      "billing": "payments, invoices, charges, refunds",
      "shipping": "delivery, tracking, returns",
      "account": "login, password, profile settings"
    }
  }'
```

```json
{"label":"billing","probability":0.995,"confidence":0.972,"scores":{"billing":0.995,"shipping":0,"account":0.005}}
```

The `label` picks the branch. The `confidence` decides whether a person reviews it.

## An OpenAI-compatible surface

Point any OpenAI client at `https://api.milliseconds.ai/v1` with model `decision-machine-1`. Two modes work: `response_format` with a `json_schema`, and `tools` for function calling. Set the client's `api_key` to your test or production key.

Plain chat returns `400 unsupported_request` on purpose. The model decides, it does not chat.

TypeSafe clients keep their request shape too. `POST /v1/systemone` takes one `state` and named `noul`, `choice` and `score` questions. See [TypeSafe-compatible API](/typesafe/overview).

#### [All capabilities](/capabilities/overview)

The eight endpoints, their fields and their routing rules.

#### [OpenAI-compatible API](/openai/overview)

Reuse an OpenAI SDK for structured extraction and function calling.

#### [TypeSafe-compatible API](/typesafe/overview)

Send systemone requests with noul, choice and score questions.

## When not to use it

* **You need generated text.** Summaries, rewrites, replies and explanations need a large language model.
* **You need multi-step reasoning.** The model makes one pass over the text. It does not plan or chain steps.
* **You need a conversation.** There is no chat mode and no memory between calls.
* **Your task has no shape.** Each capability needs your labels, statements, questions or schema. You define the decision.
* **You need open-ended discovery.** `entities` finds the types you name. It does not invent new ones.

For the rest, a typed decision beats a prompt: no parsing, stable probabilities, and cost linear in characters.

## Next

* [Quickstart](/quickstart) — one curl call to your first decision.
* [Why a decisions model](/why-a-decisions-model) — where this beats an LLM prompt, and where it does not.
* [Choosing a capability](/concepts/choosing-a-capability) — a decision table for the eight endpoints.