Provider: TypeSafe
Call TypeSafe Jev through Respan Gateway with unified logs and latency.
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.
Paste this into your coding agent:
Help me set up the Respan gateway to call TypeSafe models.
Follow https://www.respan.ai/docs/integrations/gateway/model-providers/typesafe.mdQuick setup
TypeSafe requires bring your own key (BYOK). Respan gateway credits cannot be used for TypeSafe requests.
Get a Respan API key
Sign up and create a key on the API keys page .
Get a TypeSafe API key
Create a key in the TypeSafe console .
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:
| Type | Use case | Answer fields |
|---|---|---|
noul | Evaluate a yes/no question | noul |
choice | Choose from named options | choice, probabilities, confidence |
score | Rate state against an ordered rubric | score, 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 .