TypeSafe: Jev 1.13 API Reference

About

Jev 1.13 evaluates text or structured data against named questions and returns structured decisions. Use noul for yes/no probabilities, choice for classification, and score for ordered ratings. Multiple question types can share the same state in one request.

The API returns a synchronous JSON response. Streaming and task polling are not supported. The context limit is 64,000 tokens per request, with a 32,000-token limit for state plus the longest question. Inputs must contain text or structured text data; image, audio, and video input are not supported.

1. Calling the API

Setup your API Key

To begin using Infron, create an account and generate your API Key.

Set the key as an environment variable:

export INFRON_KEY="YOUR_API_KEY"

Submit a request

Send a JSON request to POST https://llm.onerouter.pro/v1/decisions. Use your Infron API key and the public model ID typesafe/jev-1.13.

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.13",
  "state": "Please refund the duplicate payment.",
  "questions": {
    "refund": {
      "type": "noul",
      "instructions": "Does the customer request a refund?"
    }
  }
}
JSON

Response

The result is returned directly with HTTP 200. Read each answer using the same question ID you submitted. Example response; request IDs, probabilities, and token counts vary by request:

{
  "answers": {
    "refund": {
      "type": "noul",
      "noul": 0.99
    }
  },
  "id": "20260921192505517157000K0YjQgU6",
  "model": "typesafe/jev-1.13",
  "provider": "typesafe",
  "request_id": "20260921192505517157000K0YjQgU6",
  "service_tier": "standard",
  "usage": {
    "input_tokens": 279,
    "output_tokens": 20
  }
}

Routing and usage

To select the TypeSafe provider without provider fallback and include cost details, add these optional fields at the top level of your request:

{
  "provider": {
    "only": ["typesafe"],
    "allow_fallbacks": false
  },
  "usage": {
    "include": true
  }
}

With usage.include=true, the response includes top-level cost and cost_details. The usage object continues to contain input_tokens and output_tokens. Omitting this flag does not disable billing.

Errors

For unsuccessful requests, read error.message and retain the request ID when available. Correct invalid input before retrying. For rate limits or temporary service failures, use a delayed retry with backoff.

2. Schema

Input

ParameterTypeRequiredDefaultRangeDescription
modelstringYes--typesafe/jev-1.13Public model ID. The alias ~typesafe/jev-latest is also available.
statestring / object / arrayYes--Text or structured text dataShared content evaluated by all questions. Cannot be null.
questionsobjectYes--At least one questionMap of custom question IDs to question objects. Answers use the same IDs.
questions.<id>.typestringYes--noul, choice, scoreDecision type for this question.
questions.<id>.instructionsstring / object / arrayYes----The question or evaluation instructions. Cannot be null.
questions.<id>.criteriaobject / arrayFor choice and score--Depends on question typeOptions, rating levels, or optional yes/no definitions; see Question types.
providerobjectNo----Provider routing options, including only and allow_fallbacks.
usage.includebooleanNofalsetrue, falseInclude top-level cost details in the response. Token usage is returned either way.
userstringNo--Up to 256 charactersOptional user metadata.
session_idstringNo--Up to 256 charactersOptional session metadata.
traceobjectNo----Optional trace metadata; does not enable a separate trace export service.
streambooleanNofalsefalse onlyResponses are synchronous JSON.

Required fields cannot be null. Question IDs and option IDs are preserved as supplied.

Question types

Noul: yes/no probability

Returns a number from 0 to 1 in answers.<id>.noul. Choose a threshold in your application when you need a boolean decision. criteria is optional; if supplied, it must contain both true and false, each as a string, object, or array.

{
  "type": "noul",
  "instructions": "Does the customer request a refund?",
  "criteria": {
    "true": "The customer asks for money to be returned.",
    "false": "The customer does not ask for money to be returned."
  }
}

Choice: classification

Provide criteria as an object with up to 255 named options. Each value can be a string, object, array, or null. The answer contains the selected option ID in choice, its probability distribution in probabilities, and confidence.

{
  "type": "choice",
  "instructions": "Which team should handle this message?",
  "criteria": {
    "billing": "Payments and refunds",
    "technical": "Software errors"
  }
}

Score: ordered rating

Provide criteria as an ordered array of level descriptions. Each entry can be a string, object, or array and cannot be null. Use 2 to 10 levels. The request schema also permits one level, but its upstream behavior has not been verified. Levels are indexed from 0. The returned score is probability-weighted and may fall between levels.

{
  "type": "score",
  "instructions": "How urgent is this incident?",
  "criteria": [
    "Low urgency",
    "Needs attention today",
    "Requires immediate action"
  ]
}

Each example above is one question object. Place it under a custom ID in questions; you can combine several question objects in the same request.

Output

ParameterTypeRangeDescription
idstring--Platform request ID.
request_idstring--Request ID for correlation and support.
modelstring--Public model ID for this request.
providerstring--Selected provider.
service_tierstring--Selected service tier.
answersobjectSame IDs as questionsOne structured answer per question.
answers.<id>.typestringnoul, choice, scoreMatches the question type.
answers.<id>.noulnumber0 to 1Probability of yes; returned for noul.
answers.<id>.choicestringOption IDs in criteriaHighest-probability option; returned for choice.
answers.<id>.scorenumber0 to number of levels minus 1Probability-weighted rating; returned for score.
answers.<id>.confidencenumber0 to 1Confidence derived from the distribution; returned for choice and score.
answers.<id>.probabilitiesobjectValues from 0 to 1Distribution over option IDs or string level indices; returned for choice and score.
answers.<id>.legendobject--Maps string level indices to their descriptions; returned for score.
usage.input_tokensinteger>= 0Actual input token usage.
usage.output_tokensinteger>= 0Actual output token usage. Output tokens are free.
costnumberUSDTotal charge, included when usage.include=true.
cost_detailsobject--Cost breakdown, included when usage.include=true.

Example answer objects

{
  "refund": {
    "type": "noul",
    "noul": 0.99
  },
  "department": {
    "type": "choice",
    "choice": "billing",
    "confidence": 1.0,
    "probabilities": {
      "technical": 0.0,
      "billing": 1.0
    }
  },
  "urgency": {
    "type": "score",
    "score": 2.0,
    "confidence": 1.0,
    "legend": {
      "0": "Low urgency",
      "1": "Needs attention today",
      "2": "Requires immediate action"
    },
    "probabilities": {
      "0": 0.0,
      "1": 0.0,
      "2": 1.0
    }
  }
}

These are answer shapes for the three question types, grouped for reference. Actual results depend on the supplied state and questions.

3. Detailed Pricing

ModelBilling unitInput priceOutput price
Jev 1.13Per 1 million tokens$0.042Free

Your final charge follows your account rate and platform billing precision. When requested with usage.include=true, use the top-level cost and cost_details returned by the API.

Model reference: TypeSafe API reference and Jev model specifications.