---
title: "Create a structured decision"
method: POST
path: "/typesafe/v1/systemone"
tags: ["Inference", "dev-api"]
---

# Create a structured decision

`POST /typesafe/v1/systemone`

## Request

- Base URL: `https://gateway.prem.io`
- URL: `https://gateway.prem.io/typesafe/v1/systemone`
- Auth: HTTP bearer and API key in header `Authorization`

Answer typed questions (choice, noul, score) about a state. TypeSafe-compatible (SystemOne), so the official SDK can use this endpoint directly. Not end-to-end encrypted.

## Headers

- `X-Queue-Timeout` string

## Request body

- object: SystemOne decision request.
  - `model` string, required: Model name, as listed by `GET /typesafe/v1/models`.
  - `state` union, required: Context the questions are asked about.
    - string
    - object
    - unknown[]
      - unknown
    - number
    - boolean
  - `questions` object, required: Map of question id to a typed question.
  - `images` string[]: Optional. At most one base64 image data URL.
  - `samples` integer
  - `steps` integer
  - `provider` string: Optional. Pin the request to one of the model's configured backends. Omit to let the platform choose.
  - `videos` string[]: Optional dgemma extension: one inline MP4, up to 10 MiB, 30 seconds and 1920 x 1080 pixels. Four frames are sampled; audio is not processed. Cannot be combined with images. Use a raw JSON request if your SDK does not expose this field.

## Response `200`

A decision with per-question answers and probabilities.

- object

## Other responses

- `400`: Bad request
- `401`: Access token is missing or invalid
- `403`: You do not have the required permissions to access this resource
- `404`: Resource not found
- `429`: Too many requests
- `502`: Upstream service failed
- `503`: Service temporarily unavailable

## Changes

- **2026-11-13** `d46bc3931b34`: 21 warning, 1 info
  - added the new `405.00` enum value to the `allOf[subschema #1]/status` response property for the response status `401`
  - added the new `405.00` enum value to the `allOf[subschema #1]/status` response property for the response status `403`
  - added the new `405.00` enum value to the `allOf[subschema #1]/status` response property for the response status `404`
  - added the new `405.00` enum value to the `status` response property for the response status `400`
  - …18 more
- **2026-10-16** `d5b1beb33be5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/premai-io/apis/prem-studio-api/changes/typesafe/v1/systemone/post.md)

---

[API](https://skmtc.dev/premai-io/apis/prem-studio-api.md) - [All operations](https://skmtc.dev/premai-io/apis/prem-studio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/premai-io/apis/prem-studio-api/revisions/d46bc3931b34?raw)
