Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Improve doc for WebRTC

Sameer Kankutecf1d330e6345
diff --git a/docs/my-website/blog/realtime_webrtc_http_endpoints/index.md b/docs/my-website/blog/realtime_webrtc_http_endpoints/index.md
index 1316b5c7308..3ac300a6f3f 100644
--- a/docs/my-website/blog/realtime_webrtc_http_endpoints/index.md
+++ b/docs/my-website/blog/realtime_webrtc_http_endpoints/index.md
@@ -22,31 +22,16 @@ hide_table_of_contents: false
import WebRTCTester from '@site/src/components/WebRTCTester';
-Connect to the Realtime API via WebRTC from browser/mobile clients. LiteLLM handles auth and key management; audio streams directly to OpenAI/Azure.
+Connect to the Realtime API via WebRTC from browser/mobile clients. LiteLLM handles auth and key management.
-**Providers:** OpenAI · Azure OpenAI
+## How it works
-:::info **WebRTC vs WebSocket**
-- **WebSocket** (`/v1/realtime`) — server-to-server
-- **WebRTC** (`/v1/realtime/client_secrets` + `/v1/realtime/calls`) — browser/mobile, lower latency
-:::
+![WebRTC flow: Browser, LiteLLM Proxy, and OpenAI/Azure](../../img/webrtc_flow.png)
-## How it works
+**Flow of generating ephemeral token**
-LiteLLM issues tokens and relays SDP; audio never passes through the proxy.
+![Ephemeral token flow: Browser requests token, LiteLLM gets real token from OpenAI, returns encrypted token](../../img/ephemeral_token.png)
-```
-Browser LiteLLM Proxy OpenAI/Azure
- | | |
- |-- POST /v1/realtime/ | |
- | client_secrets -------->|-- POST sessions -------->|
- | |<-- { ek_... } -----------|
- |<-- { encrypted_token } ---| |
- |-- POST /v1/realtime/calls |-- POST calls ----------->|
- | [SDP + token] --------->| |
- |<-- SDP answer ------------|<-- SDP answer -----------|
- |===== audio P2P direct to OpenAI/Azure =============>|
-```
## Proxy Setup
diff --git a/docs/my-website/img/ephemeral_token.png b/docs/my-website/img/ephemeral_token.png
new file mode 100644
index 00000000000..28a05f9eb1b
Binary files /dev/null and b/docs/my-website/img/ephemeral_token.png differ
diff --git a/docs/my-website/img/webrtc_flow.png b/docs/my-website/img/webrtc_flow.png
new file mode 100644
index 00000000000..a53ec10a7b7
Binary files /dev/null and b/docs/my-website/img/webrtc_flow.png differ