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

# Decisions API

> Ask a decision model one typed question about each item you send (a yes/no, a pick from your options, or a position on your scale) and get the decision with its score, confidence and probabilities, the exact model version, its maker, token counts and the exact cost of each call. You pay exactly what each call costs at the model's own token rates.

`POST /v1/data/llm/decisions/run`

**Pricing:** Metered: you pay exactly each call's cost at the selected model's rates (default TypeSafe: Jev Latest: \$0.04 per 1M input tokens).

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**items** `string[]` *required*

The texts to judge, one per row. Each item is one call to the model.

**question** `string` *required*

The one question to ask about every item, e.g. 'Is this review negative?'.

**answerType** `string` (default: yes\_no)

yes\_no, choice (decision is one of your options) or score (your options are an ordered scale, lowest first).

Allowed values: `yes_no` (Yes or no), `choice` (Pick one option), `score` (Position on a scale).

**options** `string[]`

For choice: the options to pick from (2 to 50). For score: the scale, lowest first (2 to 50). Not used for yes\_no.

**model** `string` (default: \~typesafe/jev-latest)

The decision model. Pick from the list (the leaders first). Each model shows its own rate per 1M input tokens, and that is exactly what each call costs.

37 allowed values, for example `~typesafe/jev-latest` (TypeSafe: Jev Latest), `typesafe/jev-1.14` (TypeSafe: Jev 1.14), `perplexity/pplx-decider-flash-v1.2` (Perplexity: Decider Flash V1.2), `liquid/d1.2-ultra` (LiquidAI: d1.2-ultra), `nace-ai/drex-max-finance` (Nace.AI: Drex Max Finance), `cloudflare/clef-omni` (Cloudflare: Clef Omni), `openai/gpt-6-luna-decisions` (OpenAI: GPT-6 Luna Decisions), `baseten/elephant-1` (Baseten: Elephant 1), `baseten/joey-1` (Baseten: Joey 1), `baseten/mammoth-1` (Baseten: Mammoth 1). Fetch the full list with `GET /v1/data/llm/decisions?expand=options`.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/llm/decisions/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "items": [
      "The battery died after two days and support never answered my emails.",
      "Arrived early, works perfectly, and setup took five minutes.",
      "Decent sound for the price, but the left earbud keeps disconnecting."
    ],
    "question": "Is this review negative?",
    "answerType": "yes_no",
    "model": "~typesafe/jev-latest"
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/llm/decisions/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "items": [
        "The battery died after two days and support never answered my emails.",
        "Arrived early, works perfectly, and setup took five minutes.",
        "Decent sound for the price, but the left earbud keeps disconnecting."
    ],
    "question": "Is this review negative?",
    "answerType": "yes_no",
    "model": "~typesafe/jev-latest"
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/llm/decisions/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "items": [
    "The battery died after two days and support never answered my emails.",
    "Arrived early, works perfectly, and setup took five minutes.",
    "Decent sound for the price, but the left earbud keeps disconnecting."
  ],
  "question": "Is this review negative?",
  "answerType": "yes_no",
  "model": "~typesafe/jev-latest"
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one decision, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `id` | ID | text |
| `item` | Item | text |
| `question` | Question | text |
| `answerType` | Answer Type | text |
| `options` | Options | array |
| `decision` | Decision | text |
| `score` | Score | number |
| `confidence` | Confidence | number |
| `probabilities` | Probabilities | object |
| `model` | Model | text |
| `provider` | Provider | text |
| `inputTokens` | Input Tokens | number |
| `outputTokens` | Output Tokens | number |
| `totalTokens` | Total Tokens | number |
| `costUsd` | Cost (USD) | number |
| `error` | Error | text |
| `createdAt` | Created At | datetime |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "llm/decisions",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "item": "The battery died after two days and support never answered my emails.",
      "inputTokens": 284,
      "probabilities": {
        "yes": 0.98,
        "no": 0.02
      },
      "provider": "TypeSafe",
      "answerType": "yes_no",
      "totalTokens": 304,
      "error": null,
      "question": "Is this review negative?",
      "score": 0.98,
      "model": "typesafe/jev-1.14-20261014",
      "id": "gen-dec-1794256124-vaMBNIEV45eGK6xizsIS",
      "confidence": 0.98,
      "decision": "yes",
      "outputTokens": 20,
      "costUsd": 1.1928e-05,
      "createdAt": "2026-11-09T20:28:44Z",
      "options": null
    }
  ]
}
```


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