---
title: OpenAI Decisions → SIE
description: Run OpenAI Decisions API code on SIE. Keep the OpenAI SDK and your questions; change the base URL, the key and the model.
canonical_url: https://superlinked.com/docs/migrate/openai-decisions
last_updated: 2026-10-16
---

SIE serves OpenAI's Decisions format at `POST /v1/decisions`. The OpenAI SDK's
`client.decisions.create` runs on SIE with two changes: the client's base URL
and key, and the model. Predicate, choice and score questions keep their
shape, and the answers come back in question order, as they do from OpenAI.

## TL;DR

#### Python

```diff
- client = OpenAI()
+ client = OpenAI(api_key="sk-sie-…", base_url="https://api.superlinked.com/v1")
```

#### TypeScript

```diff
- const client = new OpenAI();
+ const client = new OpenAI({ apiKey: "sk-sie-…", baseURL: "https://api.superlinked.com/v1" });
```

Then `model="gpt-6-luna"` becomes `model="fastino/GLiNER2.5-Decide"`, or
another [decision model](#choosing-a-model).

## Before

#### Python

```python
from openai import OpenAI

client = OpenAI()
decision = client.decisions.create(
    model="gpt-6-luna",
    input="I was charged twice. Please refund one charge today.",
    questions=[
        {"type": "predicate", "name": "refund", "instructions": "Does the customer request a refund?"},
        {
            "type": "choice",
            "name": "team",
            "instructions": "Which team should handle this?",
            "choices": [{"value": "billing"}, {"value": "technical"}],
        },
        {
            "type": "score",
            "name": "urgency",
            "instructions": "How urgent is the request?",
            "levels": [{"label": "can wait"}, {"label": "today"}],
        },
    ],
)
refund, team, urgency = decision.answers
print(refund.probability, team.choice, urgency.score)
```

#### TypeScript

```typescript
import OpenAI from "openai";

const client = new OpenAI();
const decision = await client.decisions.create({
  model: "gpt-6-luna",
  input: "I was charged twice. Please refund one charge today.",
  questions: [
    { type: "predicate", name: "refund", instructions: "Does the customer request a refund?" },
    {
      type: "choice",
      name: "team",
      instructions: "Which team should handle this?",
      choices: [{ value: "billing" }, { value: "technical" }],
    },
    {
      type: "score",
      name: "urgency",
      instructions: "How urgent is the request?",
      levels: [{ label: "can wait" }, { label: "today" }],
    },
  ],
});
console.log(decision.answers);
```

## After

#### Python

```python
from openai import OpenAI

client = OpenAI(api_key="sk-sie-…", base_url="https://api.superlinked.com/v1")
decision = client.decisions.create(
    model="fastino/GLiNER2.5-Decide",
    input="I was charged twice. Please refund one charge today.",
    questions=[
        {"type": "predicate", "name": "refund", "instructions": "Does the customer request a refund?"},
        {
            "type": "choice",
            "name": "team",
            "instructions": "Which team should handle this?",
            "choices": [{"value": "billing"}, {"value": "technical"}],
        },
        {
            "type": "score",
            "name": "urgency",
            "instructions": "How urgent is the request?",
            "levels": [{"label": "can wait"}, {"label": "today"}],
        },
    ],
)
refund, team, urgency = decision.answers
print(refund.probability, team.choice, urgency.score)
```

#### TypeScript

```typescript
import OpenAI from "openai";

const client = new OpenAI({ apiKey: "sk-sie-…", baseURL: "https://api.superlinked.com/v1" });
const decision = await client.decisions.create({
  model: "fastino/GLiNER2.5-Decide",
  input: "I was charged twice. Please refund one charge today.",
  questions: [
    { type: "predicate", name: "refund", instructions: "Does the customer request a refund?" },
    {
      type: "choice",
      name: "team",
      instructions: "Which team should handle this?",
      choices: [{ value: "billing" }, { value: "technical" }],
    },
    {
      type: "score",
      name: "urgency",
      instructions: "How urgent is the request?",
      levels: [{ label: "can wait" }, { label: "today" }],
    },
  ],
});
console.log(decision.answers);
```

## What carries over

- **Input.** A string, or text messages with user, developer, system or
  assistant roles.
- **Questions.** Predicate, choice and score questions, up to 200 per request
  within the model's window. Answers keep the order of the questions,
  including unnamed questions and repeated names.
- **Choices.** Up to 255 per question. A value is a string or a boolean, and
  `true` stays distinct from `"true"`.
- **Scores.** 1 to 10 levels. An answer carries each level's probability and
  the expected level.
- **Errors.** OpenAI error envelopes and retry headers, so the SDK raises its
  usual exception classes.

## What differs

- **Models.** SIE model ids replace OpenAI's. The probabilities come from the
  SIE model you choose.
- **Text only.** SIE's decision models read text. A request with images,
  audio or tool calls gets a `400`.
- **Input that does not fit.** A request longer than the model's window gets
  a `400`. SIE never truncates it. Use a model with a longer window.

## Choosing a model

`/v1/decisions` answers with SIE's decision models. Each reads a fixed window
of tokens per row:

| Model | Window | What shares it |
|---|---|---|
| `fastino/GLiNER2.5-Decide` | 512 tokens | All of a request's questions (at most 256 tokens) and the input |
| `fastino/GLiNER2.5-Decide-1B` | 2,048 tokens | All of the questions (at most 512 tokens) and the input; for longer text |
| `fastino/GLiNER2.5-multi-Decide` | 2,048 tokens | As Decide-1B, multilingual |
| `convaiinnovations/laya-typed-decisions` | 1,024 tokens | One question and the input, per question |
| `convaiinnovations/laya-multilingual` | 1,024 tokens | As above, multilingual |
| `convaiinnovations/laya` | 512 tokens | As above |

`GLiNER2.5-Decide` runs on SIE Serverless. Self-hosted SIE serves all six.

## Run it yourself

```bash
docker run -p 8080:8080 ghcr.io/superlinked/sie-server:latest-cpu-transformers5
```

Point the client at `http://localhost:8080/v1` with any key: a local server
checks none. The first request downloads and loads the model. The
[`decisions-local` example](https://github.com/superlinked/sie/tree/main/examples/decisions-local)
in the SIE repository checks every answer type, question ordering, the async
client and the SDK's error classes.

Using TypeSafe's System One API instead? See [TypeSafe → SIE](/docs/migrate/typesafe/).
For OpenAI embeddings, see [OpenAI → SIE](/docs/migrate/openai/).
