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

Send media one of two ways:
  • content: OpenAI content parts, as below. Use it when your code already sends chat completions.
  • assets: images keyed by a reference you write into state or a question. Use it with the typesafe-sdk Image type. See Images as assets.
Media goes in one or the other. Images or a document in content together with assets is a 422. text parts work with either. 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. 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 16 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.

Images as assets

assets is TypeSafe’s image format. List each image once, keyed by a reference string. Write the reference where the image belongs: in state, in a question’s instructions, or in its criteria. The model sees [image N] at that place. Unused assets and bad image data are 422s. TypeSafe answers some of these with 400 or 413.

Locate with a box

A box question asks where something is. The answer is four edges as fractions of the image: top and bottom of its height, left and right of its width, from the top-left corner.
Response
The samples set compression to false. The Gateway does not decode zstd request bodies yet. Both SDKs send zstd by default on Python 3.14+ (or the zstd extra) and Node.js 22.15+, for bodies over 1 KB.
To convert to pixels, multiply top and bottom by the image height, and left and right by the image width.
Box answers are a preview. Localization quality is not yet benchmarked. In spot checks, edges are often accurate but one edge can miss, even at high confidence. Check boxes on your own images before you branch on them.
Pair a box with labelled questions as needed: a noul for “is it there at all”, or a choice of none, one, and several. A box needs no other question beside it.

Extract fields

A question of type text, number, date, or list is a field to extract. The answer is a typed value with the probability that it is right and the probability that the state does not give it. You never parse a string. All fields are decoded at once. They share one prompt, which the engine reads once. Each field then writes only its own value. A request takes about as long as its longest value. A JSON completion writes every key, quote, and value in order. See Field Extraction for measured numbers and a text, image, and PDF walkthrough.
Response
The typesafe-sdk clients decode only Jev’s answer types. Read fields with any HTTP client, as above.

Streaming

WS /v1/ws/systemone 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.
  • Images: frames and content parts only. A socket does not take assets.
See Realtime System One. WS /typesafe/ws is a deprecated alias of the same socket.

Gateway extensions

Six optional fields extend Jev’s contract. reasoning_effort notes:
  • Default: off. A read is a prefill. A reasoning budget turns it into a generation.
  • Diffusion engines: reject any reasoning budget with a 422.
  • Qwen engines: can fail a read that has a reasoning budget, with a 502. Use google/gemma-4-26b-a4b-it.
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.

Realtime System One

WS /v1/ws/systemone, 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.