About
TypeSafe Jev 1.14 evaluates shared text, structured data, and images with Noul, Choice, Score, and Box questions, returning typed decisions instead of generated prose. Infron serves the pinned jev-1.14.0 through TypeSafe using synchronous JSON. This endpoint enables the experimental image, Box, and long-context features, with up to 262,144 tokens of context; both the shared state plus one question and the full request must fit the limit. These experimental features can change and are not recommended by TypeSafe for production automation. Audio, video, streaming, and task polling are not supported.
1. Calling the API
Setup your API Key
To begin using Infron, create an account and generate your API Key.
export INFRON_KEY="YOUR_API_KEY"
Submit a request
Send JSON to POST https://llm.onerouter.pro/v1/decisions using your Infron API key.
curl --request POST "https://llm.onerouter.pro/v1/decisions" \
--header "Authorization: Bearer $INFRON_KEY" \
--header "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "typesafe/jev-1.14",
"state": "Please refund the duplicate payment.",
"questions": {
"refund": {
"type": "noul",
"instructions": "Does the customer request a refund?"
}
}
}
JSON
Response
The API returns one JSON response. The following is illustrative, not a recorded request; IDs, answers, and usage vary.
{
"id": "REQUEST_ID",
"request_id": "REQUEST_ID",
"model": "typesafe/jev-1.14",
"provider": "typesafe",
"service_tier": "standard",
"answers": {"refund": {"type": "noul", "noul": 0.9}},
"usage": {"input_tokens": 120, "output_tokens": 12}
}
Routing and usage
Optional platform fields can select a provider and include costs:
{
"provider": {"only": ["typesafe"], "allow_fallbacks": false},
"usage": {"include": true}
}
usage.include=true adds top-level cost and cost_details; billing still applies when omitted. Routing and metadata fields are handled by Infron. The provider receives model, state, questions, and assets when supplied.
Errors
Read error.message and retain the request ID. Correct invalid input before retrying; use delayed retries for transient failures and rate limits.
2. Schema
Input
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
model | string | Yes | -- | typesafe/jev-1.14 | Public model ID. |
state | string / object / array | Yes | -- | Non-null | Shared content for every question. |
questions | object | Yes | -- | At least 1 entry | Named questions; no separate question-count maximum. |
questions.<id>.type | string | Yes | -- | noul, choice, score, box | Question type. |
questions.<id>.instructions | string / object / array / null | No | -- | -- | What to evaluate; accepted shapes follow the current TypeSafe OpenAPI schema. |
questions.<id>.criteria | object / array / null | For choice and score | -- | See Question types | Choices, rating levels, or optional Noul definitions. |
assets | object | No | -- | At least 1 entry if supplied | Images indexed by reference strings used in state, instructions, or criteria. |
assets.<id>.type | string | No | -- | image | Asset type. |
assets.<id>.format | string | Yes for an asset | -- | png, jpg, jpeg | Image format for JSON base64 input. |
assets.<id>.data_base64 | string | Yes for an asset | -- | Standard padded base64 | Image bytes, with no data-URL prefix or whitespace. |
provider | object | No | -- | -- | Platform provider routing options. |
usage.include | boolean | No | false | true, false | Include cost details; token usage is always returned. |
user | string | No | -- | Up to 256 characters | Accepted for compatibility; not sent to TypeSafe. |
session_id | string | No | -- | Up to 256 characters | Accepted for compatibility; not sent to TypeSafe. |
trace | object | No | -- | -- | Accepted for compatibility; not sent to TypeSafe. |
stream | boolean | No | false | false only | Synchronous JSON only. |
Question types
Noul: yes/no probability
Returns noul between 0 and 1. Optional criteria may be an object or null. Its true and false entries are optional and each accepts a string, object, array, or null according to the current upstream schema. Include instructions and descriptive criteria for useful questions.
Choice: classification
criteria is required: an object containing 1–255 named options. Each description accepts a string, object, array, or null. The answer includes choice, probabilities, and confidence.
Score: ordered rating
criteria is required: an array containing 1–10 levels. Each level is a string, object, or array. Levels start at index 0; score is their probability-weighted value. The answer also includes legend, probabilities, and confidence. The 1-level case follows the published schema and has not been live-tested in this review.
Box: image location
Use type: "box" with an image reference and instructions identifying the target. Box does not use criteria. Its answer contains box.top, box.bottom, box.left, box.right, and confidence. Coordinates are fractions of image dimensions from 0 to 1.
{
"model": "typesafe/jev-1.14",
"state": {"photo": "photo-reference"},
"assets": {
"photo-reference": {
"type": "image",
"format": "png",
"data_base64": "BASE64_ENCODED_PNG"
}
},
"questions": {
"target": {"type": "box", "instructions": "Locate the red rectangle in photo-reference."}
}
}
Replace the base64 placeholder with a valid image before calling. This gateway accepts JSON base64 assets; it does not upload multipart files or download image URLs. Infron sets the required TypeSafe image and long-context headers. Images must be still PNG/JPEG, with each side 280–1568 pixels and at most 16 MiB per decoded image. The upstream request-body, processed-image total, and expanded-request limits are each 32 MiB. Every asset must be referenced. Image validation and expansion limits are enforced by the upstream service. Image tokens are included in usage.input_tokens at the same price as text.
Output
| Parameter | Type | Range | Description |
|---|---|---|---|
id, request_id | string | -- | Platform request ID. |
model | string | -- | Public model ID. |
provider, service_tier | string | -- | Selected route. |
answers | object | Request question IDs | Typed answer for each question. |
answers.<id>.type | string | noul, choice, score, box | Answer type. |
answers.<id>.noul | number | 0–1 | Yes probability for Noul. |
answers.<id>.choice | string | Choice keys | Selected option. |
answers.<id>.score | number | 0 to levels minus 1 | Weighted score. |
answers.<id>.box | object | Coordinates 0–1 | top, bottom, left, right for Box. |
answers.<id>.confidence | number | 0–1 | Choice, Score, or Box confidence. |
answers.<id>.probabilities | object | Values 0–1 | Choice/Score distribution. |
answers.<id>.legend | object | -- | Score level descriptions. |
usage.input_tokens, usage.output_tokens | integer | Non-negative | Actual provider usage; free output still has a real count. |
cost | number | USD | Charge when requested. |
cost_details | object | -- | Billing breakdown when requested. |
3. Detailed Pricing
| Model | Billing unit | Input price | Output price |
|---|---|---|---|
| Jev 1.14 | Per 1 million tokens | $0.042 | Free |
Text and image input use the same token rate; there is no per-image surcharge. Final charges follow account rates and platform billing precision. Sources: TypeSafe models, TypeSafe OpenAPI, Images, Box, and OpenRouter context metadata.