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
Setdetail 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 intostateor a question. Use it with thetypesafe-sdkImagetype. See Images as assets.
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.
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.
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
highorautopart lifts the whole read.
detail table, see the request reference.
Classify a PDF
Setfile_data to a base64 data URL or an http(s) URL.
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
Abox 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.top and bottom by the image height, and left and right by the image width.
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 typetext, 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
decisioncarries the sameanswersandusageas a posted read. - Images: frames and
contentparts only. A socket does not takeassets.
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. Usegoogle/gemma-4-26b-a4b-it.
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.