> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect to a TypeSafe-compatible model provider

> Point LangSmith decision model evaluators at any server that implements the TypeSafe System One API, such as OpenRouter or a self-hosted model.

A TypeSafe-compatible endpoint is a saved [model configuration](/langsmith/model-configurations). It sends a decision model evaluator's requests to any server that implements the [TypeSafe System One API](https://docs.typesafe.ai). With a TypeSafe-compatible endpoint, you can call TypeSafe models through another provider, such as OpenRouter, or call a decision model you host yourself. For models that implement the OpenAI API, see [Connect to an OpenAI compliant model provider/proxy](/langsmith/custom-openai-compliant-model).

TypeSafe-compatible endpoints are available in [decision model evaluators](/langsmith/decision-model-evaluator). To use Jev directly from TypeSafe or SemIf through the LLM Gateway, you do not need a compatible endpoint.

## Configuration

A TypeSafe-compatible endpoint has three settings:

* **Model**: The model ID the server expects. Defaults to `jev-latest`.
* **API Key Name**: The name of the workspace secret that stores the server's API key. Defaults to `TYPESAFE_API_KEY`.
* **Base URL**: The root of the server's System One API. See [Base URL format](#base-url-format).

## Use the endpoint in an evaluator

An evaluator can use a TypeSafe-compatible endpoint only after you save the endpoint as a model configuration.

To use a TypeSafe-compatible endpoint in an evaluator:

1. Add the server's API key as a workspace secret. Go to **Settings > Integrations > Provider secrets**, click **+ Secret**, and select **Custom** to enter your own secret name. To use the default name, select **TypeSafe** instead.
2. In the evaluator, under **Prompt & Model**, open **Model Configuration**.
3. For **Provider**, select **TypeSafe Compatible Endpoint**. It appears under **Other**.
4. Enter the **Model**, **API Key Name**, and **Base URL**.
5. Click **Save as preset** and name the configuration.
6. Select the saved configuration as the evaluator's model.

When the evaluator runs, it calls the endpoint with the API key stored in the secret you entered in **API Key Name**. Next, add questions and save the evaluator, as described in [How to define a decision model evaluator](/langsmith/decision-model-evaluator).

## Base URL format

The **Base URL** should point to the root of the server's System One API. LangSmith appends `/v1/systemone` automatically. Do not include it in the Base URL.

### Example base URLs

| Provider                             | Model                  | Example Base URL                      |
| ------------------------------------ | ---------------------- | ------------------------------------- |
| [TypeSafe](https://docs.typesafe.ai) | `jev-latest`           | `https://api.typesafe.ai`             |
| [OpenRouter](https://openrouter.ai)  | `~typesafe/jev-latest` | `https://openrouter.ai/api`           |
| Self-hosted (remote)                 | Your model ID          | `https://my-model-server.example.com` |

## See also

* [How to define a decision model evaluator](/langsmith/decision-model-evaluator): Set up an evaluator that uses a decision model.
* [Decision models in the LLM Gateway](/langsmith/llm-gateway-decision-models): Call SemIf and Jev directly through the LLM Gateway.
* [Model configurations](/langsmith/model-configurations): Manage saved model configurations for your workspace.

***

<div className="source-links">
  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to your agent of choice via MCP for real-time answers.
  </Callout>

  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/langsmith/typesafe-compatible-model.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>
</div>
