- Gateway Base URL — the endpoint for the AI Gateway service
- Model ID — the identifier of the model you want to call
- API Key — a TrueFoundry authentication token (PAT or VAT)


Gateway Base URL
The Gateway Base URL is the single endpoint your application sends all LLM requests to. Instead of calling each provider (OpenAI, Anthropic, Azure, etc.) at their own endpoints, you point every request at this one URL. The Gateway routes it to the right provider behind the scenes.| Deployment | Base URL |
|---|---|
| TrueFoundry SaaS | https://gateway.truefoundry.ai |
| Self-hosted | Found in the Code Snippets section of the Playground |
Model ID
Every model accessible through the Gateway has a unique identifier in the formatprovider_account/model_name.
For example, openai-main/gpt-4o-mini means the model gpt-4o-mini available through the provider account named openai-main. The provider account represents a configured connection to an LLM provider — your organization may have multiple accounts for the same provider (e.g., openai-main for production and openai-dev for testing).
You can find available Model IDs in:
- The Playground model selector
- The Models tab under AI Gateway
- The Model Discovery API
API Key (Authentication)
To access models through the AI Gateway, you authenticate with a TrueFoundry API key — not the original provider keys (OpenAI, Anthropic, etc.). The Gateway manages provider credentials centrally, so developers only need a single TrueFoundry token. TrueFoundry supports two types of API keys:| Token type | Best for |
|---|---|
| Personal Access Token (PAT) | Development and testing |
| Virtual Account Token (VAT) | Production applications |
Getting Code Snippets from the Playground
The fastest way to start making requests is to copy a code snippet directly from the Playground. The generated snippets come pre-filled with the correct Base URL, Model ID, and your API key — so you can paste and run immediately.- Open the Playground and select a model
- Click the Code button in the top bar
- Choose your language or framework
- Copy the generated code into your application
OpenAI SDK, Langchain, Langgraph, Google ADK, Stream API, Rest API, Go-OpenAI, Rust-OpenAI, cURL, Node.js, LlamaIndex, Langchain4j
