Skip to main content
POST
Returns a calibrated probability for each question about state. For the concepts, see System One. To migrate a client, see TypeSafe SDK Compatibility. Authentication is optional: see Authentication and Rate Limits.

Request body

An unknown top-level field is a 422.

Question object

Content parts

content is a flat list: media first, then state. There are no roles and no history.
Images or one document, never both. A PDF’s first 8 pages are rasterised at 96 DPI and read as the request’s images, so they share the same 8 slots. Sending both is a 422.
One high or auto part sets every image and page in the request to 280 tokens.

Response

The x-typesafe-request-id header matches the Gateway x-request-id. A decision is billed per read, and a rejected request bills nothing. See Pricing.

Answer shapes

confidence is 1 - H(p) / ln(K): 1 puts all mass on one label, and 0 is uniform.

Errors

See Error Codes for the Gateway-wide envelope.

System One

Question types, images, confidence, and cost levers.

TypeSafe SDK Compatibility

Compatibility matrix and migration steps.

List Models

The current TypeSafe-compatible models on the /typesafe route.

Chat Completions

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

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The body of POST /typesafe/v1/systemone.

state
required
model
string
required
questions
Questions · object
required

Typed questions to answer, keyed by caller id. At most 16 per decision.

content
(TextPart · object | ImageUrlPart · object | FilePart · object | DocumentUrlPart · object)[] | null

Media for this request, as OpenAI content parts: image_url (max 8, data:image/…;base64 or http(s), ≤5 MB each) and one file, whose first 8 pages are read as images. Text is read after the state.

{"type": "text", "text": ...} — appended after the state.

reasoning_effort
enum<string> | null
Available options:
none,
minimal,
low,
medium,
high
steps
integer | null

Denoise steps per read; Jev's contract is 1.

Required range: 1 <= x <= 8
samples
integer | null

Fixed number of noise draws to average. Unset: one read, re-read on high entropy.

Required range: 1 <= x <= 32

Response

Successful Response

model
string
required
answers
Answers · object
required
usage
Usage · object
required

Jev's two counters, plus what the gateway bills for them.

cost is this gateway's addition. TypeSafe's decoder ignores a field it does not model, so the official SDK still parses the response; a client that reads the raw JSON (the vlmrun CLI) can show the price of a read.

id
string