Responses WebSocket
Opens a persistent websocket session for OpenAI Responses WebSocket mode. This route is currently experimental on AI Stats Gateway and is not recommended for production workloads.
WebSocket handshake uses HTTP GET upgrade semantics and returns 101 Switching Protocols
on success (not 200).
This endpoint is OpenAI-only, requires openai/<model> format, and accepts
response.create websocket messages.
The gateway enforces store=false, allows one in-flight response per connection,
and forwards OpenAI Responses streaming events back to the client.
After upgrade, runtime failures are emitted as websocket error events
(for example invalid_response_create, openai_routing_failed,
response_already_in_flight, model_mismatch, upstream_websocket_*)
rather than additional HTTP response codes.
Documentation Index
Fetch the complete documentation index at: https://docs.ai-stats.phaseo.app/llms.txt
Use this file to discover all available pages before exploring further.
openai/<model> format only, and prefer POST /v1/responses for production workloads.101 Switching Protocols (not 200). After upgrade, failures are emitted as WebSocket error events.
If websocket mode is disabled for the current deployment, the handshake returns HTTP 501 with error.code = "responses_websocket_disabled" before upgrade or auth processing begins.
For a full gateway walkthrough (connect, send turns, continue with previous_response_id, and recover from errors), see WebSocket Mode guide.Authorizations
Bearer token authentication
Response
WebSocket upgrade accepted.