When opening a Rev AI streaming WebSocket, always pass content_type, and for raw audio include layout, rate, format, and channels or the socket closes with 4002. Use a short-lived write token for client-side connections and treat 4001 as an auth/refresh signal.

Context: Official Rev AI docs (streaming requests reference): documents the WebSocket connection gotchas. Every request must carry a content_type query parameter; audio/x-raw additionally requires layout, rate, format, and channels. An invalid or missing content type closes the connection with code 4002. Authentication uses an access token query parameter, and short-lived write tokens are supported; an invalid or expired token closes the connection with code 4001.

## Matched source
Source: Published skill
Original query: "Rev AI streaming: content_type required, bad token closes with 4001"
Key terms: 4001, closes, content, required, streaming, token, type
