Provider: TypeSafe

Call TypeSafe Jev through Respan Gateway with unified logs and latency.
This page is for Respan LLM Gateway users.

Use Respan Gateway to call TypeSafe’s Jev, a System One model for structured decisions. Send application state and typed questions, then use the returned answers in your code.

Quick setup

TypeSafe requires bring your own key (BYOK). Respan gateway credits cannot be used for TypeSafe requests.

1

Get a Respan API key

Sign up and create a key on the API keys page.

2

Get a TypeSafe API key

Create a key in the TypeSafe console.

3

Choose how to provide your TypeSafe key

Open the Providers page, select TypeSafe, then Add deployment to save your key.

Omit respan_params.credential_override from requests to use the saved key.

Send your first request

Call POST https://api.respan.ai/api/typesafe/v1/systemone. The examples use RESPAN_API_KEY for the Authorization header and pass TYPESAFE_API_KEY with each request.

TypeSafe uses a dedicated endpoint with state and questions. OpenAI Chat Completions and streaming are not supported on this endpoint.

import os
import requests
response = requests.post(
"https://api.respan.ai/api/typesafe/v1/systemone",
headers={
"Authorization": f"Bearer {os.environ['RESPAN_API_KEY']}",
"Content-Type": "application/json",
},
json={
"respan_params": {
"credential_override": {
"jev-1.13.0": {"api_key": os.environ["TYPESAFE_API_KEY"]}
}
},
"model": "typesafe/jev-1.13.0",
"state": "I want a refund.",
"questions": {
"is_refund": {
"type": "noul",
"instructions": "Is the customer asking for a refund?",
}
},
},
)
response.raise_for_status()
print(response.json()["answers"]["is_refund"]["noul"])

The noul answer is a probability between 0 and 1. Answers are returned under the same names you supplied in questions.

A 401 response can mean the TypeSafe key is missing or invalid; a 403 response can mean the Respan key is missing or invalid.

Supported question types

You can combine these question types in one request:

TypeUse caseAnswer fields
noulEvaluate a yes/no questionnoul
choiceChoose from named optionschoice, probabilities, confidence
scoreRate state against an ordered rubricscore, legend, probabilities, confidence

See the TypeSafe API reference for question formats and response details.

Switch models

Use typesafe/jev-1.13.0 in the model field. When changing the TypeSafe model, also update the key in credential_override to the model name without the typesafe/ prefix. Check the Models page for models available through Respan.

Learn more about Jev in TypeSafe’s Introducing System One Models & Jev.