Skip to main content
TrueFoundry AI Gateway provides a universal API for all supported models via the standard OpenAI /chat/completions endpoint. This unified interface allows you to seamlessly work with models from different providers through a consistent API. API Reference: POST /chat/completions

Provider capabilities

The gateway maps the OpenAI Chat Completions contract to each provider. The table below summarizes feature support by provider for this endpoint.
Legend:
  • Supported by Provider and Truefoundry
  • Provided by provider, but not by Truefoundry
  • Provider does not support this feature

Contents

Getting Started

You can use the standard OpenAI client to send requests to the gateway:

Configuration

You will need to configure the following:
  1. base_url: The base URL of the TrueFoundry AI Gateway
  2. api_key: API key generated from Personal Access Tokens
  3. model: TrueFoundry model ID in the format provider_account/model_name (available in the LLM playground UI)
See Integrate with code for instructions on obtaining these values. For using native provider SDKs (OpenAI, Google Gen AI, Anthropic, boto3), see Native SDK Support.

Input Controls

System Prompts

System prompts set the behavior and context for the model by defining the assistant’s role, tone, and constraints:

Request Parameters

Fine-tune model behavior with these common parameters:
Some models don’t support all parameters. For example, temperature is not supported by o series models like o3-mini.