Open AI realtime WS connections are cut off continuously
OpenAI Developer Community
May 20, 2026
Yes, I can reproduce this.
With OpenAI-Beta: realtime=v1, the WebSocket upgrade succeeds, but OpenAI then sends an error event and closes the connection with:
code=4000
reason=invalid_request_error.beta_api_shape_disabled
Using the same endpoint and model without the beta header succeeds and returns session.created.
So the practical next step appears to be removing:
OpenAI-Beta: realtime=v1
And then updating any beta Realtime event or session shapes to the GA version.
Discussion in the ATmosphere