Skip to main content
Jev is TypeSafe’s System One model for structured decisions. Use Custom Endpoints to keep your TypeSafe credentials on the AI Gateway and call the TypeSafe API with a TrueFoundry API key, access control, and tracing.

Prerequisites

Adding an endpoint

1

Create a Custom Endpoint model account

In the TrueFoundry dashboard, go to AI Gateway → Models → Custom Endpoints and click Add Custom Endpoint.In Configure Account, set:
  • Name: jev-account
  • Endpoint Type: Other
  • Header Auth: leave disabled at the account level; configure it on the endpoint below.
Click Continue to Endpoints.
2

Add the Jev endpoint

Add an integration with:
  • Display Name: jev-endpoint
  • Base URL: https://api.typesafe.ai (no trailing slash)
Enable Header Auth and add:Replace <TYPESAFE_API_KEY> with your TypeSafe key. The AI Gateway injects this header when forwarding requests to api.typesafe.ai. Client applications send their TrueFoundry API key to the gateway.To use a TrueFoundry secret, store the complete value Bearer <TYPESAFE_API_KEY> in the secret and set the Authorization value to tfy-secret://tenant:group:TYPESAFE_AUTHORIZATION. The reference resolves automatically. Do not prefix the reference with Bearer.
3

Set access control and save

On the Access Control step, choose the users or teams who can manage and use this model account, then Save. See Gateway access control.

Making requests

The gateway appends the upstream path to the configured Base URL:
This forwards to https://api.typesafe.ai/v1/systemone. Here, jev-account is the account name and jev-endpoint is the endpoint Display Name. The remaining /v1/systemone path belongs to the TypeSafe API. Replace the account and endpoint segments if you chose different names. See Endpoint structure.
Use https://api.typesafe.ai as the Base URL. TypeSafe uses its own request schema with model, state, and questions. See the TypeSafe API reference.

Supported APIs

All paths below are appended to /proxy-api/jev-account/jev-endpoint. Custom Endpoint requests support tracing; cost tracking is unavailable. Use a model name returned by GET /v1/models as the request’s model. The example below uses the documented alias jev-latest.

Example: classify a support message

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. For Python, install requests with pip install requests.
Responses contain model, answers, and usage. Answers are keyed by question name. In this example, answers.billing.noul is the probability of a yes answer, from 0 to 1. TypeSafe also supports choice and score questions; see the TypeSafe API reference for their schemas.