---
title: "Create a decision – Superbot API"
canonical_url: "https://superbot.gg/developers/gateway/createDecision"
summary: "OpenAI Decisions on `superbot` or `superbot-fast`: one shared `input` and 1 to 400 questions, answered in question order. Each question is asked on its own (8 at a time) with the input as a shared, cached prefix, and its answer is read off the model’s token probabilities, never sampled text. Tool calls and tool outputs in `input` are read as evidence. Billed to your credits at the model’s rate, per question, for the tokens `usage` names, and counted on the key’s usage (`GET /v1/usage`) and its spend limits. A caller key’s own limits apply before any question is asked, as on every model call: its per-minute rate limit, its daily and monthly spend limits, its model list and its team’s model allow-list and spend limits. A question whose own call fails while others are answered comes back as a `refusal`, and the rest are answered; the request fails as a whole when no question is answered, or when a failure every question shares (credits, plan) comes first. Every refusal is OpenAI’s error object `{error: {message, type, param, code}}`: 400 `invalid_request` with `param`; 404 `model_not_found`; 502 `decision_unavailable` when the model answered without token probabilities."
---

> Markdown of https://superbot.gg/developers/gateway/createDecision. Site index: /llms.txt.

# Create a decision

`POST /v1/decisions`

OpenAI Decisions on `superbot` or `superbot-fast`: one shared `input` and 1 to 400 questions, answered in question order. Each question is asked on its own (8 at a time) with the input as a shared, cached prefix, and its answer is read off the model’s token probabilities, never sampled text. Tool calls and tool outputs in `input` are read as evidence. Billed to your credits at the model’s rate, per question, for the tokens `usage` names, and counted on the key’s usage (`GET /v1/usage`) and its spend limits. A caller key’s own limits apply before any question is asked, as on every model call: its per-minute rate limit, its daily and monthly spend limits, its model list and its team’s model allow-list and spend limits. A question whose own call fails while others are answered comes back as a `refusal`, and the rest are answered; the request fails as a whole when no question is answered, or when a failure every question shares (credits, plan) comes first. Every refusal is OpenAI’s error object `{error: {message, type, param, code}}`: 400 `invalid_request` with `param`; 404 `model_not_found`; 502 `decision_unavailable` when the model answered without token probabilities.

- Operation id: `createDecision`
- Group: [Gateway](https://superbot.gg/developers/gateway.md)
- Auth: A caller key holding `gateway:invoke` (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: `gateway:invoke`
- Body reference: [OpenAI Decisions reference](https://developers.openai.com/api/reference/resources/decisions/methods/create)

## Request body

`application/json`, required.

- `model` (string, required): One of `superbot`, `superbot-fast`.
- `input` (string | array of DecisionInputItem, required): The evidence every question is asked about: a text, or an ordered array of messages, tool calls and tool outputs.
- `questions` (array of DecisionQuestion, required)

## Response 200

One answer per question, in question order.

`application/json`: Decision.

- `model` (string, required)
- `answers` (array of DecisionAnswer, required)
- `usage` (object, required): Summed over the questions that were answered.
  - `input_tokens` (integer, required)
  - `input_tokens_details` (object, required)
    - `cached_tokens` (integer, required)
    - `cache_write_tokens` (integer, required)
  - `output_tokens` (integer, required)
  - `output_tokens_details` (object, required)
    - `reasoning_tokens` (integer, required)
  - `total_tokens` (integer, required)

## Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 400 | [`invalid_request`](https://superbot.gg/developers#errors-invalid_request) | The body is not a decision request (`invalid_request`, with `param`). |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | No valid bearer (`unauthorized`). |
| 402 | `insufficient_balance`, `daily_limit`, `monthly_limit`, `member_monthly_limit`, `org_monthly_limit` | Your credits are spent (`insufficient_balance`), or the key or its team reached a spend limit (`daily_limit`, `monthly_limit`, `member_monthly_limit`, `org_monthly_limit`). |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope), `model_not_allowed` | The key lacks `gateway:invoke` (`insufficient_scope`), or the model is off its list or its team’s allow-list (`model_not_allowed`). |
| 404 | `model_not_found` | The model does not make decisions (`model_not_found`). |
| 413 | `request_too_large` | The body is over the size limit (`request_too_large`). |
| 429 | [`rate_limited`](https://superbot.gg/developers#errors-rate_limited) | The key’s per-minute rate limit, or the model’s (`rate_limited`), with `Retry-After`. |
| 5XX | — | The model is unavailable (503 `router_unavailable`, `shed` with `Retry-After`), answered without token probabilities (502 `decision_unavailable`), or did not answer in time (504). |

## Examples

```sh
curl -sS -X POST "https://superbot.gg/v1/decisions" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY" \
  -H "content-type: application/json" \
  -d '{"model":"superbot","input":"your-input","questions":[]}'
```

```js
const res = await fetch(`https://superbot.gg/v1/decisions`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
    'content-type': 'application/json',
  },
  body: JSON.stringify({"model":"superbot","input":"your-input","questions":[]}),
});
console.log(res.status, await res.json());
```

```python
import os
import requests

res = requests.request(
    "POST",
    "https://superbot.gg/v1/decisions",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
        "content-type": "application/json",
    },
    json={"model":"superbot","input":"your-input","questions":[]},
)
print(res.status_code, res.json())
```
