POST /v1/systemone serves TypeSafe’s System One API: a request carries a
state (the text or record to evaluate) and a map of typed questions, and the
answer is a calibrated probability per question. It is a decision API, not a
text generator, so GoModel forwards it natively and never translates it to
or from chat. To reach the same models with OpenAI’s request and answer
shapes, use the Decisions API, which GoModel
translates to System One.
The endpoint is available once a jev provider (hosted Jev
or a self-hosted Kev server), an openrouter provider, or an
azure provider
(Microsoft-Decision-1) is configured. Without one, it answers 404.
Request and answer
POST {base_url}/v1/systemone, so point them at the
gateway root (base_url="http://localhost:8080") with your GoModel key; see
Jev / Kev.
Routes
The Kev routes behave like
/v1/systemone. They are refused for OpenRouter
and Azure, which answer only the evaluation route; a hosted TypeSafe jev provider
returns its own 404 for them.
What the gateway does
- Resolves
modellike any other endpoint: a bare name, a provider-qualified name (jev/jev-latest), or a virtual model, then applies the caller’s model allowlist, rate limits, and budgets. - Runs the workflow’s prompt guardrails over
state. - Serves an identical earlier request from the response cache.
- Forwards the body with only
model(the resolved name) andstate(if a guardrail edited it) changed. Questions, criteria, and every other field reach the provider byte for byte. - Relays the answer unchanged and records it in the request log (request type Decisions) and in usage.
Images
TypeSafe’s image requests work as sent:assets in the JSON body, or TypeSafe’s multipart/form-data form, with the
JSON request as the first part, named request, and each image as a file part
an asset names with part. The TypeSafe SDKs send that form for Image
objects. GoModel inlines each image part into its asset as data_base64 and
forwards one JSON request, so guardrails, the cache, and failover handle both
forms the same way. The image must be a PNG or JPEG; the asset’s format is
kept when it states one, and otherwise comes from the image’s bytes. A form
TypeSafe would reject, such as a part no asset uses, an asset naming a
missing part, or an image that is not a PNG or JPEG, returns 400. Send the
TypeSafe-Danger-Zone-Images: true header as TypeSafe requires; the gateway
forwards it. Kev servers and Azure’s Microsoft-Decision-1 read text only; the
gateway does not refuse their image requests, and the upstream answers them.
Models
System One models are listed in
GET /v1/models as utility models with no
generation mode.
TypeSafe lists only its aliases but accepts any versioned ID, so a pinned
version works without being declared: GoModel routes a model it does not list
to a jev provider when the name says which one (jev/jev-1.13.0), or, for a
bare name, when exactly one jev provider is configured. A virtual model can
pin a version the same way.
OpenRouter accepts jev-latest itself, but GoModel routes on its catalog IDs.
To keep a plain jev-latest (the TypeSafe SDKs’ default) working through
OpenRouter, add a virtual model:
Caching
With the response cache enabled, an identical request (same route, resolved model, guardrails, and body after guardrail edits) is answered from the exact cache (X-Cache: HIT (exact)) and recorded in usage as a cache
hit. The semantic cache never serves System One: a state that is merely
similar is not the same decision. Send Cache-Control: no-cache to skip the
cache for one request.
Failover
A virtual model with thefailover strategy moves a request to its next
target when the current one fails with an availability error (429 or 5xx,
including TypeSafe’s 529, by default; see Failover).
Every target receives the request in its own System One form. A target without
the API, such as a chat model, is skipped without using a failover attempt,
and client errors such as a malformed question (422) are returned without
failover:
Guardrails
Guardrails seestate as a single user message: a string state as its text,
any other JSON value as its encoded JSON, which must still be valid JSON after
an edit. That is what anonymizing and blocking guardrails need; for example, a
string_replace rule that masks card numbers applies to state before it
leaves the gateway. The questions are your application’s fixed schema and are
not exposed.
Edits a decision request has no place for, such as a system prompt injected by
a guardrail that also covers chat models, are dropped. The gateway logs one
warning per kind of dropped edit, then logs repeats at debug level. A
guardrail that would answer the request itself blocks it instead, since System
One callers expect typed answers, not text.
Only the prompt phase applies. The answer is typed values, not a completion,
so response and stream phase guardrails do not run on it and it is relayed
unchanged; a workflow that selects them for a System One request logs one
warning per guardrail.
Errors and misuse
The endpoint never translates, and it says so when a request cannot work:Request log, usage, and cost
Each call is a request log entry under its route, with the requested and resolved model, provider, request and response bodies, guardrail outcomes, and failover attempts; filter the request log by the Decisions request type. Usage records the answer’sinput_tokens and output_tokens under the model that
answered. OpenRouter reports its own usage.cost, which is recorded as the
request’s cost; for hosted Jev, declare pricing on the provider (see
Jev / Kev).