Skip to main content
POST
Create Decision
Send the facts in state and the judgments you need in questions. The answer is a pick from a set, a score on a scale, or a yes/no measure. state is text or JSON. The model does not read images, and it does not write chat text. jev is TypeSafe’s decision model at $0.042 per million input tokens. Output tokens are free. Requests count toward your normal rate limits.

Create Decision

POST /systemone POST /decisions is the same endpoint.

Request Body

string
default:"jev"
jev. jev-latest, typesafe/jev, and typesafe/jev-latest are aliases. Version pins such as typesafe/jev-1.13 are rejected because only the current Jev is served. Proxy keys must send model.
string | object | array
required
The facts needed to answer: the ticket, records, conversation, or policy. A string, object, or array, including an empty one. Numbers, booleans, and null are rejected. Image parts and data-URL images are rejected. See Images.
object
required
A non-empty map of question IDs to question definitions. Answers use the same IDs. IDs must be non-empty and cannot be __proto__.
Each question has:
string
required
choice, score, or noul. Case-sensitive.
string | object | array
required
The question to answer. The question ID only labels the answer; it is not read as the question.
object | array
What each option or level means. Required for choice and score, optional for noul. See Question types.
Every question sees the same state. Send independent questions together in one call and keep each one focused on a single judgment. The combined state and questions can be up to 32,000 tokens. Other body fields, such as user, session_id, or assets, are ignored.

Images

Jev does not read image bytes. An image part in state (image_url, image, or input_image), or any data:image/ URL, is rejected with 400 and param set to state. Describe the image with a vision model such as gemini-2.5-flash, then put that description in state.
A written description is ordinary text, including one stored under a field named image. There is no box question type. Ask a choice, score, or noul about the description.

Question types

Descriptions may be strings, objects, or arrays, and may be empty. A choice description may also be null. Numbers and booleans are rejected.

Reading answers

  • choice: the selected option ID. probabilities maps every option ID to a probability.
  • score: the expected level on the 0-based scale, as a decimal (for example 2.82 of 0 to 3). legend maps each level index to the description you sent. probabilities maps each level index to a probability.
  • noul: the probability of yes, from 0 to 1. Near 0.5 means uncertain. There is no confidence field.
  • confidence: a separate certainty signal from 0 to 1. It is not the largest probability and may be omitted; treat a missing value as unknown.
Probabilities are rounded to two decimals. Identical requests can differ by about 0.02, so compare against thresholds rather than exact values.

Example

Response

Read each answer by its question ID, then apply your own rules. Validate thresholds on your own examples.

Describe the endpoint

GET /systemone (or GET /decisions) returns the default model (jev), its context length and price, the question types, and a models list with every decision model. No API key is needed. jev allows 32,000 tokens.

Errors

Failed requests are not charged.

Authorizations

Authorization
string
header
required

Enter your API key (starts with 'ek-')

Body

application/json
state
required

The facts needed to answer. A string, object, or array, including empty. Image parts (image_url, image, input_image) and data-URL images are rejected with param state. Describe the image with a vision model and put that text here.

questions
object
required

Non-empty map of question IDs to question definitions. IDs must be non-empty and cannot be __proto__.

model
string
default:jev

jev. jev-latest, typesafe/jev, and typesafe/jev-latest are aliases. Version pins are rejected.

Example:

"jev"

Response

Success

id
string
required
object
string
required
Example:

"decision"

model
string
required
Example:

"jev"

answers
object
required

One answer per question ID.

usage
object
required