Chat Completions
Overview
This provides universal API for all the supported models via standard OpenAI /chat/completions
endpoint.
Universal OpenAI Compatible API
TrueFoundry AI Gateway allows you to use any chat based LLM model via standard OpenAI /chat/completions
endpoint. You can use standard OpenAI client to send requests to the gateway. Here is a sample code snippet for the same:
You will need to configure the following:
- base_url: This is the base URL of the TrueFoundry dashboard.
- api_key: This is the API key which can be generated from Personal Access Tokens
- model: This is the TrueFoundry model ID. This is of the format
provider_account/model_name
. You can find this on TrueFoundry LLM playground UI.
API Reference
For detailed API specifications, parameters, and response schemas, see the Chat Completions API Reference.