> ## 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.

# Live / Realtime API (/live)

> Bidirectional realtime streaming (Live API) over WebSocket through TrueFoundry's AI Gateway

## Provider capabilities

The table below summarizes gateway support for this endpoint by provider.

<Info>
  Legend:

  * **✅** Supported by Provider and Truefoundry
  * <Icon icon="circle-xmark" iconType="regular" color="red" /> Provided by provider, but not by Truefoundry
  * <Icon icon="circle-minus" iconType="regular" /> Provider does not support this feature
</Info>

| Provider         | Live / Realtime API |
| ---------------- | ------------------- |
| Gemini           | ✅                   |
| Vertex           | ✅                   |
| OpenAI           | ✅                   |
| Azure AI Foundry | ✅                   |

For every gateway endpoint and provider, see [Supported APIs](/docs/ai-gateway/intro-to-llm-gateway#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.

| Approach                        | Supported providers                                                      | Base 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](/docs/ai-gateway/quick-start#gateway-base-url)) 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.

<Note>
  **Model names:** The model ID in code must match the **display name** of the model on your TrueFoundry provider account.
</Note>

<Note>
  **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.
</Note>

## Contents

| Section                                                  | Description                           |
| -------------------------------------------------------- | ------------------------------------- |
| [Overview](/docs/ai-gateway/live-api)                    | Provider capabilities and model setup |
| [Code snippets](/docs/ai-gateway/live-api-code-snippets) | WebSocket examples by provider        |
| [Tool calling](/docs/ai-gateway/live-api-tool-calling)   | Function 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.

| Provider         | Setup guide                                           |
| ---------------- | ----------------------------------------------------- |
| Google Gemini    | [Google Gemini](/docs/ai-gateway/google-gemini)       |
| Google Vertex AI | [Google Vertex](/docs/ai-gateway/google-vertex)       |
| OpenAI           | [OpenAI](/docs/ai-gateway/openai)                     |
| Azure AI Foundry | [Azure AI Foundry](/docs/ai-gateway/azure-ai-foundry) |
| Azure OpenAI     | [Azure OpenAI](/docs/ai-gateway/azure-openai)         |

## References

* [Google Gemini Live API documentation](https://ai.google.dev/gemini-api/docs/live)
* [Google Vertex AI Live API documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/live-api)
* [OpenAI Realtime API documentation](https://platform.openai.com/docs/guides/realtime)
* [Azure Voice Live API documentation](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/voice-live)
* [Azure AI VoiceLive Python SDK](https://learn.microsoft.com/en-us/python/api/overview/azure/ai-voicelive-readme)
