Skip to main content
TypeSafe provides System One models such as Jev that evaluate a piece of content against typed questions and return calibrated answers. TrueFoundry connects to TypeSafe natively through the AI Gateway. TypeSafe models use the decision model type and are called through POST /v1/systemone, not chat completions.
You can also reach TypeSafe through Custom Endpoints. The native integration below provides model access control and cost tracking, with models addressed as account-name/model-name.

Adding Models

This section explains the steps to add TypeSafe models and configure the required access controls.
1

Navigate to TypeSafe in AI Gateway

From the TrueFoundry dashboard, navigate to AI Gateway > Models and select TypeSafe.
2

Add TypeSafe Account Details

Click Add TypeSafe Model Account. Give a unique name to your TypeSafe account and complete the form:
  • API Key: your TypeSafe API key. It is sent to TypeSafe as an Authorization: Bearer token.
  • Base URL (optional): defaults to https://api.typesafe.ai. Change this only if TypeSafe directs you to a different endpoint.
Add collaborators to your account, this will give access to the account to other users/teams. Learn more about access control here.Under advanced settings, you can optionally set a Discount % that is applied to the upstream list price for this account.
3

Add Models

Click + Add Model and fill the form:
  • Display Name: the name shown in the TrueFoundry UI, for example jev.
  • Model ID: the TypeSafe model identifier, for example jev-1.13.0 or jev-latest. Pin a versioned ID so confidence thresholds stay stable across releases.
  • Model Types: Decision (default).
  • Cost (optional): TypeSafe bills input tokens only, so set the output cost to 0.

Inference

Call the model with the TrueFoundry model ID in the format your-typesafe-account/your-model-display-name. Send the content in state and named questions in questions. This example asks a yes/no (noul) question about a support message. Set GATEWAY_BASE_URL to your gateway base URL without a trailing slash and TFY_API_KEY to your TrueFoundry API key.
The response contains the versioned model that served the request, an answers object keyed by your question IDs, and usage with input_tokens and output_tokens. See the TypeSafe API reference for all question types.