You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4adad5e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: examples/realtime/app/README.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,27 @@ cd examples/realtime/app && uv run python server.py
20
20
21
21
Then open your browser to: http://localhost:8000
22
22
23
+
### Local-use boundary and limits
24
+
25
+
Run this demo only on your own trusted machine. The launch command binds to
26
+
`127.0.0.1`. WebSocket connections require a `localhost` or `127.0.0.1` Host and a
27
+
matching HTTP Origin, so open the page from this server. Missing or unrelated
28
+
browser origins are rejected before the server opens an OpenAI session.
29
+
30
+
These checks do not authenticate local processes, which can forge HTTP headers.
31
+
Do not expose this demo through a public bind address, proxy, or tunnel. A deployed
32
+
service needs its own authentication, authorization, rate limits, account quotas,
33
+
and transport security before opening sessions with server credentials.
34
+
35
+
The demo allows four simultaneous sessions, including sessions still connecting.
36
+
Each client text message is limited to 1 MiB and each audio message to 24,000 int16
37
+
samples (one second at 24 kHz). Each connection can assemble one image at a time,
38
+
up to 4 MiB of ASCII data URL content in at most 128 chunks; the UI sends images in 60,000-character
39
+
chunks. A direct image message must also fit the text-message limit. These are
40
+
demo limits, not OpenAI API limits. Invalid or excessive input closes the socket
41
+
and releases its session. Keep the launch command's WebSocket backend and queue
42
+
limits when running the example.
43
+
23
44
### Debugging Realtime usage
24
45
25
46
Set `LOG_LEVEL=DEBUG` to log the raw `response.done` usage, the typed per-response usage with modality details, and the cumulative session usage:
0 commit comments