Skip to main content
If you run LLMs on your own infrastructure — on-premises GPUs, private cloud instances, or any model server not deployed through TrueFoundry — you can connect them to the AI Gateway by providing the endpoint URL and authentication details. Once registered, these models appear in the AI Gateway model catalog alongside cloud providers and benefit from all gateway features: routing, guardrails, rate limiting, cost tracking, and observability.

Prerequisites

Your model server must expose an HTTP endpoint. The AI Gateway works best with OpenAI-compatible APIs, which is the default output format for popular inference frameworks:

Adding Self-Hosted Models to the AI Gateway

Follow these steps to add a self-hosted or external model (deployed on TrueFoundry or elsewhere) to the AI Gateway.
1

Select Self-Hosted Model as the provider

From the TrueFoundry dashboard, go to AI Gateway > Models, click Add Model and choose To New Provider Account. Select Self-Hosted Model from the provider list.
Add Provider Account page listing the supported model providers

Choose a provider in Add Provider Account

2

Name the account

Give the account a unique name and click Continue to Models Selection. The name is the prefix of every model ID in this account.
Self-Hosted Model Configure Account form in the provider account setup drawer

Configure Account for Self-Hosted Model

3

Configure Model Details

Click Add Model Manually. Give a name to your hosted model and add ModelId, add the URL to the hosted model. Choose the correct Model Server for your model and optionally add Auth Data which will be used for Authentication of request to the model.Configuration form showing fields for model ID, URL, and authentication
4

Save and grant access

Click Test Credentials to check the account against the selected models, or click Save without Testing. To keep the account in Git instead, click Apply using YAML and apply the generated spec with tfy apply.To let other users, teams or virtual accounts use or manage these models, open Manage Accounts, click ⋮ on the account and choose Access Control > Grant Access. See Access control.

Inference

After adding the models, you can perform inference using an OpenAI-compatible API via the Playground or by integrating with your own application.
Code Snippet and Try in Playground Buttons for each
model

Inference with Self-Hosted Model

Decision (System One)

A self-hosted vLLM server can answer System One choice questions on POST /v1/systemone (and /v1/decisions, translated) when the vLLM build includes vllm#59299 (after v0.31.0). Set Model Server to vLLM and Model Types to Decision. vLLM rejects noul and score questions itself; that upstream 400 is forwarded.
Python
Full request and response schemas: Decisions API.