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

# Decisions

> POST /decisions: System One questions answered by a provider's decisions model

`POST /decisions` answers typed questions with a decisions model that a provider serves. The request and the response are those of [System One](https://docs.vlm.run/gateway/system-one.md): a `state`, a map of `questions`, and one typed answer per question with its probabilities. Errors come back in the envelope the OpenAI and OpenRouter SDKs read.

| Model | Provider | Access | Price |
| - | - | - | - |
| `google/gemini-decision-1` | Google, through OpenRouter | Paid account | \$0.10 / 1M input tokens, cached input included. Output tokens are \$0.00. |

The model is served on this route only. It is not listed on `GET /openai/models` and does not answer Chat Completions or `/typesafe`.

```python Python theme={"theme":{"light":"github-light","dark":"dark-plus"}}
import httpx

response = httpx.post(
    "https://gateway.vlm.run/decisions",
    headers={"Authorization": "Bearer <VLMRUN_API_KEY>"},
    json={
        "model": "google/gemini-decision-1",
        "state": "Answer about the attached image.",
        "content": [
            {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/document.receipt/playground/2.jpg"}},
        ],
        "questions": {
            "kind": {"type": "choice", "instructions": "What kind of document is this?", "criteria": {"invoice": None, "receipt": None, "other": None}},
            "has_total": {"type": "noul", "instructions": "Is a total amount visible?"},
        },
    },
    timeout=60,
)
print(response.json())
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"dark-plus"}}
const response = await fetch("https://gateway.vlm.run/decisions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.VLMRUN_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "google/gemini-decision-1",
    state: "Answer about the attached image.",
    content: [
      { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/document.receipt/playground/2.jpg" } },
    ],
    questions: {
      kind: { type: "choice", instructions: "What kind of document is this?", criteria: { invoice: null, receipt: null, other: null } },
      has_total: { type: "noul", instructions: "Is a total amount visible?" },
    },
  }),
});
console.log(await response.json());
```

```bash cURL theme={"theme":{"light":"github-light","dark":"dark-plus"}}
curl https://gateway.vlm.run/decisions \
  -H "Authorization: Bearer $VLMRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemini-decision-1",
    "state": "Answer about the attached image.",
    "content": [
      {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/document.receipt/playground/2.jpg"}}
    ],
    "questions": {
      "kind": {"type": "choice", "instructions": "What kind of document is this?", "criteria": {"invoice": null, "receipt": null, "other": null}},
      "has_total": {"type": "noul", "instructions": "Is a total amount visible?"}
    }
  }'
```

The request asks two questions about one receipt image and returns a `choice` answer and a `noul` answer, in the [System One response](https://docs.vlm.run/gateway/api-reference/post-systemone.md) shape: `id`, `model`, `answers`, and `usage`. `/v1/decisions` is an alias of the same route.

```json Response [expandable] theme={"theme":{"light":"github-light","dark":"dark-plus"}}
{
  "id": "sysone-ad70146a6e074623b8f3b0d79af03",
  "model": "google/gemini-decision-1",
  "answers": {
    "kind": {
      "type": "choice",
      "choice": "receipt",
      "probabilities": {
        "receipt": 0.989774658672271,
        "invoice": 0.004096857596854552,
        "other": 0.0061284837308744275
      },
      "confidence": 0.989774658672271
    },
    "has_total": {
      "type": "noul",
      "noul": 0.9093045295959307
    }
  },
  "usage": {
    "input_tokens": 1254,
    "output_tokens": 0,
    "input_tokens_details": {
      "cached_tokens": 0,
      "image_tokens": 0,
      "text_tokens": 1254
    },
    "reads": 1,
    "cost": 0.000125
  }
}
```

The read bills 1,254 input tokens at \$0.10 / 1M, so `usage.cost` is \$0.000125.

## Differences from System One

| | `POST /decisions` |
| - | - |
| Question types | `noul`, `choice`, `score`, and `box`. A field type (`text`, `number`, `date`, `list`) is a `400`. |
| `instructions` | Required on every question. A question without it is a `400` from the provider, which names the question. |
| Fields refused before any call | `reasoning_effort` other than `none`, `steps`, and `samples`. Each is a `400`. |
| Media | `assets`, `image_url` parts, and the pages of a PDF, sent to the model as images. |
| Body | JSON only. A `multipart/form-data` upload is refused. |
| Answers | The provider's. When it leaves out `probabilities` or `confidence`, the Gateway derives them. Any question can return `{"type": "refusal"}`. |
| `usage` | The provider's tokens at the model's rates. `reads` is `1`. There is no minimum per call. |

Calls spend the same [rate-limit](https://docs.vlm.run/gateway/rate-limits.md) budget as Chat Completions.

## Errors

Every error, auth and validation included, uses this envelope:

```json theme={"theme":{"light":"github-light","dark":"dark-plus"}}
{"error": {"code": 400, "message": "questions: Field required", "type": "invalid_request_error", "param": "questions"}}
```

`code` is the HTTP status, as OpenRouter reads it. `type` and `param` follow OpenAI.

| Status | When | `type` |
| - | - | - |
| `400` | Validation, an unsupported question type or field, or a provider `4xx` not listed below | `invalid_request_error` |
| `401` | A bad API key, or no key | `authentication_error` |
| `403` | Your organization has no credit card on file | `permission_error` |
| `404` | An unknown model | `not_found_error` |
| `429` | Over your rate limit. The body is the Gateway-wide `429` body, with no `code`. | `rate_limit_exceeded` |
| `502` | The provider failed or returned an answer the Gateway cannot read. Nothing is billed. | `api_error` |
| `503` | The provider is busy, timed out, or cannot be reached. Retry after `retry-after` seconds. | `api_error` |

## Next steps

> [card] [System One](https://docs.vlm.run/gateway/system-one.md)
>
> Question types, inputs, confidence, and cost levers.

> [card] [System One API](https://docs.vlm.run/gateway/api-reference/post-systemone.md)
>
> The full request and response schema.


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