Skip to main content
Chat models are strong at text and weak at automation. Code that branches on a model needs a label it can trust. A chat model returns a string that you must parse and validate, states its confidence loosely, and generates one token at a time. That is too slow and too loose for a request path. TypeSafe introduced System One models, starting with Jev, for this gap. You send a block of state and a set of typed questions. The model answers all of them in parallel as typed values, each with a calibrated probability. Classify, route, score, and guard become if statements over probabilities. The state that drives automation is often pixels: a scanned page, a camera frame, a product photo. Today an image decision goes through a VLM that writes a sentence, and you parse it. Jev was released for text and structured state. The Gateway applies the same contract to images. POST /typesafe/v1/systemone answers typed questions about a state (text, JSON, or images) in one forward pass. Each answer is one of your labels with a calibrated probability. Nothing is generated or parsed, so an answer cannot be off-schema. Over a socket the measured p50 is ~44 ms. Edit criteria to change the question. The route is wire-compatible with TypeSafe’s Jev API. Point the typesafe-sdk client at https://gateway.vlm.run/typesafe. It works unchanged. See TypeSafe SDK Compatibility. The VLM Run SDKs also wrap the route as client.gateway.systemone, with friendly question specs and media helpers: see the Python and Node.js references.

Quickstart

Set detail to high for small print.
Response

Models

Name the model on the request. The response reports the id that answered. See Models.

When to use a read

A read costs the prompt prefill plus one forward pass. Generating the same answer pays a full decode plus parsing. The parse can still fail.

Question types

A score is the expected level. A 3-level question returns a number from 0 to 2. For the exact criteria and limits, see the request reference.

Confidence

confidence runs from 1 (all mass on one label) to 0 (uniform). Threshold it to route the case to a human or a larger model. Document Classification is a full routing example.
Probabilities are the model’s own at temperature 1. They are not a parsed guess. They are model-specific. Revalidate your thresholds when you change models.

Inputs

content is a list of content parts. Each part names its type. One list can carry images, a document, and text. Put media parts first and the state after them. A bare string in content counts as one text part.
Send images or one document, never both: A document’s pages become the read’s images. The two compete for the same 8 slots. Sending both is a 422.
A read has no roles and no message array. It denoises a single canvas over a single state, so there is no turn to address and no history to carry.
The detail field sets how closely the model reads each image.
  • Default auto: 280 vision tokens.
  • "detail": "low": 70 vision tokens. 4x fewer billed image tokens. Same latency. Usually enough for classifying or routing.
  • The cap applies per request. One high or auto part lifts the whole read.
For accepted part shapes and the full detail table, see the request reference.

Classify a PDF

Set file_data to a base64 data URL or an http(s) URL.
A PDF longer than 8 pages is answered from its opening pages. That covers classifying or routing. Reading every page of a long document uses the Gateway’s per-page document pipeline.

Streaming

WS /typesafe/ws answers the same questions per frame. Use it for a video or an image stream.
  • Questions: send them once.
  • Frames: each frame is raw binary.
  • Decisions: every decision carries the same answers and usage as a posted read.
See Streaming.

Gateway extensions

Three optional fields extend Jev’s contract. reasoning_effort notes:
  • Default: off. A read is a prefill. A reasoning budget turns it into a generation.
  • medium and high: 128 and 256 tokens. They are declared. They return a 422 until an engine holds the latency target.
  • Diffusion engines: reject any reasoning budget with a 422.
See the request reference for ranges and defaults. Unknown fields return a 422.

Cost levers, in order of effect

Next steps

System One API

Full request and response reference, plus error envelopes.

TypeSafe SDK Compatibility

Point an existing Jev client at the Gateway with three environment variables.

Chat Completions

OCR, VQA, and document inference when you need generated text.

Rate Limits

Per-tier quotas and how they apply to a read.

Streaming

WS /typesafe/ws, for per-frame decisions over video or an image stream.

CLI

vlmrun gw s1 for one-off reads, gates that guard a script, and dry runs.