dgemma.
Decisions runs in Zero Data Retention mode. Your content is plaintext at the Prem API Gateway and at the partner. There is no client-side encryption and no attestation. See ZDR overview and ZDR security boundary.
Basic decision
Ask a routing question about an incident:choice is the most likely label. probabilities holds one value per criterion key. confidence rescales the top probability against a uniform distribution. It is not a calibrated correctness estimate.
Question types
Each question declares atype and a criteria shape that matches the type.
choice
Pick one label from a named list. criteria maps each label to a description. The list holds 1 to 26 entries.
noul
Answer yes or no. The answer is a single probability. criteria is optional and can name the two outcomes.
noul:
probabilities for a noul question. That field is not part of this answer.
score
Rate on an ordered scale. criteria lists the levels in ascending order, from 2 to 10 levels.
score, legend, probabilities, and confidence. The score is the probability-weighted mean over the zero-indexed levels.
Several questions in one request
Each question is independent. One request can carry up to 16 questions. The questions share the state, and each returns its own distribution.Questions cannot read one another. There is no shared prefix across questions in a request, and one question cannot use the answer to another. Ask a follow-up request if a later question depends on an earlier answer.
Image input
Send one image as a base64 data URL inimages. The image is placed ahead of the state.
Video input
Send one MP4 as a base64 data URL invideos. This is a dgemma extension and is not part of the base request shape.
images or videos, not both in one request. Use a raw JSON request if your HTTP client does not expose the field.
Response shape
The response contains:model, the resolved model name;answers, one entry per question id, withtype, the answer, and the distribution;usage, withinput_tokensandoutput_tokens;diagnostics, engine detail for the call.
answers keyed by your own question ids. diagnostics is informational and can change without notice.
Request with the TypeSafe SDK
Decisions uses a TypeSafe-compatible API, so the official TypeSafe client works against this route. Install it and point the base URL athttps://gateway.prem.io/typesafe.
choice, noul, and score helpers build the typed questions and validate them before the request is sent. state accepts any JSON value, so an object such as { document: "..." } works as well as a string. The client throws a TypeSafeError on an invalid key and a BadRequestError when the server rejects the request, for example when a request carries more than 16 questions.
Request with the standard library
Decisions is not the OpenAI Chat Completions shape, so an OpenAI client does not work against this route. Any HTTP client can send the JSON directly:Current limits
- The route is non-streaming.
streamis not supported. - Up to 16 questions per request. Up to 4 concurrent requests per key before a 429.
choiceholds 1 to 26 criteria.scoreholds 2 to 10 levels.- At most one image or one video per request, not both.
- Questions are independent and cannot read one another.
- Probabilities are not calibrated. On a public benchmark slice, 8 of 113 answers above a 0.99 top-probability threshold were wrong, and reversing the order of the criteria changed 17 of 139 predictions. Do not use
confidenceas a correctness guarantee. - The route runs in ZDR mode. There is no client-side encryption and no attestation. See ZDR vs Confidential.
- Verify a production input format with your own representative fixture before rollout.
Next steps
Decisions API reference
The full request and response reference.
ZDR overview
What ZDR guarantees and what it does not.
Models & Pricing
The models, the prices, and the regions.
ZDR vs Confidential
Which mode fits your workload.