Skip to main content
POST
Create a structured decision

Zero Data Retention

This is a Zero Data Retention route. Prem sends the request to a trusted partner. Prem does not keep your prompts or completions, and the partner does not keep them. Your content is plaintext at the Prem API Gateway and at the partner. There is no client-side encryption and no Trusted Execution Environment. See ZDR vs Confidential.

Base URL

Authenticate with a standard Prem API key in the Authorization: Bearer header. The key must have the chats.completion scope. No client KEK is used on this route.

Request shape

The request uses a TypeSafe-compatible API, so the official TypeSafe client works against this route. Set its base URL to https://gateway.prem.io/typesafe. The client appends /v1/systemone and /v1/models.
It is not the OpenAI Chat Completions shape, so an OpenAI client does not work against this route. Each question carries type, instructions, and criteria:

Response shape

Read answers by your own question ids. A noul answer puts its scalar in noul; a noul answer has no probabilities field. A score answer reports the probability-weighted mean over the zero-indexed levels.
The values in probabilities are normalized scores over the supplied labels. They are not calibrated correctness estimates, and label order can change the prediction. See the guide’s current limits.

Media input

Use images or videos, not both in one request.
  • images holds at most one base64 image data URL. The image is placed ahead of the state.
  • videos holds at most one base64 MP4 data URL, up to 10 MiB, 30 seconds, and 1920 x 1080 pixels. Four frames are sampled and audio is not processed. This is a dgemma extension and is not part of the base request shape. Use a raw JSON request if your HTTP client does not expose the field.

Streaming

This route is non-streaming. A stream field is not supported. The call returns one JSON object.

Model availability

Send a model that GET /typesafe/v1/models returns for your API key. dgemma is served through this route and is not available on the chat completions routes. A chat model on this route returns a validation error. See Models & Pricing.

Limits

  • Up to 16 questions per request.
  • choice holds 1 to 26 criteria. score holds 2 to 10 levels.
  • At most one image or one video per request.
  • Questions are independent. One question cannot read another question or its answer.
  • Up to 4 concurrent requests per key before a 429.

Decisions guide

Worked examples for each question type.

ZDR security boundary

What Prem records and what the partner records.

Authorizations

Authorization
string
header
required

Send your access token as header Authorization: Bearer {accessToken}

Authorization
string
header
required

Your API key that starts with sk_live or sk_test. You can create yours at go.prem.io/api-keys.

Body

application/json

SystemOne decision request.

model
string
required

Model name, as listed by GET /typesafe/v1/models.

state
required

Context the questions are asked about.

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.

Maximum array length: 1
Pattern: ^data:video/mp4;base64,

Response

A decision with per-question answers and probabilities.

The response is of type object.