Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt

Use this file to discover all available pages before exploring further.

Provider capabilities

The table below summarizes gateway support for this endpoint by provider.
Legend:
  • ✅ Supported by Provider and Truefoundry
  • Provided by provider, but not by Truefoundry
  • Provider does not support this feature
ProviderLive / Realtime API
Gemini
Vertex
OpenAI
Azure AI Foundry
For every gateway endpoint and provider, see Supported APIs. The Realtime API enables low-latency, bidirectional streaming over a persistent WebSocket connection. You can send and receive text and audio in real time, enabling use cases like voice assistants and interactive agents. The gateway proxies the WebSocket connection to the provider using each provider’s native SDK.
ApproachSupported providersBase path
Provider proxy (native SDK)Google Gemini, Google Vertex AI, OpenAI, Azure AI Foundry / Azure OpenAI{GATEWAY_BASE_URL}/live/{providerAccountName} (use wss:// protocol)
Before you start: Replace {GATEWAY_BASE_URL} with your AI Gateway Base URL (how to find it) and your-tfy-api-key with your TrueFoundry API key. Replace {providerAccountName} with the display name of your provider account on TrueFoundry. For WebSocket connections, use the wss:// protocol with the gateway host.
Model names: The model ID in code must match the display name of the model on your TrueFoundry provider account.
Which SDK to use: Use the google-genai Python SDK for Google Gemini and Google Vertex AI, the openai Python SDK for OpenAI and Azure AI Foundry, and the azure-ai-voicelive Python SDK for Azure AI Foundry (alternative) — all pointed at the gateway WebSocket URL above.

Contents

SectionDescription
OverviewProvider capabilities and model setup
Code snippetsWebSocket examples by provider
Tool callingFunction calling in live sessions

Add models to the gateway

Before you can use the Realtime API, add your realtime models to TrueFoundry through a provider account. When adding a model, select Realtime as the model type.
ProviderSetup guide
Google GeminiGoogle Gemini
Google Vertex AIGoogle Vertex
OpenAIOpenAI
Azure AI FoundryAzure AI Foundry
Azure OpenAIAzure OpenAI

References