SystemOne SDK
Kev is an open decision model with a System One compatible API. If you already use TypeSafe's SDK for Jev, use the same client with jaredpalmer/kev-9b on Gradiated. This selects Kev; jev-latest is not a Gradiated model alias.
Install
pip install typesafe-sdk
Set GRADIATED_API_KEY in your server environment. Use a Gradiated key from the quickstart.
Make a decision
Send the information to evaluate as state, and the decision to make as a named question. State can be text, a JSON object, or an array.
import os
from typesafe_sdk import Choice, TypeSafeClient
with TypeSafeClient(
base_url="https://api.gradiated.com",
api_key=os.environ["GRADIATED_API_KEY"],
model="jaredpalmer/kev-9b",
) as client:
response = client.system_one(
state={"ticket": "I was charged twice. Please fix this today."},
questions={
"category": Choice(
instructions="Choose the department for this ticket.",
criteria={
"billing": "Charges or payments",
"technical": "Something is broken",
"other": "Anything else",
},
),
},
)
print(response.choices["category"].choice)
print(response.choices["category"].probabilities)
Use the base URL without /v1; the SDK adds /v1/systemone. Check models and pricing for model access and current pricing.
Ask multiple questions
Questions in one request share the same state. Use Noul for a yes/no probability and Score for an ordered rating.
import os
from typesafe_sdk import Noul, Score, TypeSafeClient
with TypeSafeClient(
base_url="https://api.gradiated.com",
api_key=os.environ["GRADIATED_API_KEY"],
model="jaredpalmer/kev-9b",
) as client:
response = client.system_one(
state={"ticket": "I was charged twice. Please fix this today."},
questions={
"billing": Noul(instructions="Is this about a payment problem?"),
"urgency": Score(
instructions="Rate how urgently this ticket needs attention.",
criteria=["Can wait", "Needs attention today", "Needs immediate attention"],
),
},
)
print(response.nouls["billing"].noul)
print(response.scores["urgency"].score)
| Question | Result |
|---|---|
choice | The selected option, probabilities for each option, and confidence. |
noul | A probability of “yes” from 0 to 1. Apply your own decision threshold. |
score | An expected score across zero-indexed criteria. The three-level example returns a number from 0 to 2, which can be fractional. |
Supported requests
Kev accepts 1–64 named questions per request. A choice has 1–255 options; a score has 2–255 ordered criteria. Keep requests small: the hosted runtime limits bodies to 1 MiB and packed inputs to 8,192 tokens. Multiple questions also consume the input budget.
Use the native SystemOne endpoint for Kev. It returns all answers in one response, with no streaming or text generation parameters such as max_tokens or temperature. Only the default service tier is supported; omit service_tier to use it.
Usage counts input tokens, including question tokens. Generated output tokens are zero. See errors and retries for handling rejected requests and rate limits.
SDK reference: Python · JavaScript.


