OpenCode adds an experimental API for voice sessions

OpenCode 2.0.32 adds an experimental voice session API that uses credentials on the OpenCode server. The October 16 changelog lists support for OpenAI and xAI voice connections.
The server starts the connection
The API reference documents POST /api/experimental/voice/session. A request identifies the model and transport, with an optional session settings object. The endpoint returns the connection information a client needs, either an SDP answer for WebRTC or a temporary token for WebSocket. The reference lists error responses for invalid requests, unauthorized access, missing locations and unavailable services. Those separate outcomes give integrators more to handle than whether a call starts successfully.
Which providers and credentials work
The SDK exposes client.voice.session. OpenAI GPT Live supports WebRTC. OpenAI Realtime supports WebRTC and WebSocket, while Grok Voice supports WebSocket. Credentials come from a stored server API key or the OPENAI_API_KEY and XAI_API_KEY environment variables. ChatGPT sign in credentials are not used.
Audio still travels directly to the provider
The merged implementation separates connection setup from the conversation. The client builds the provider’s session settings and sends audio and events directly to the provider. OpenCode starts the call but stays outside the media path. The WebSocket connection token lasts 60 seconds.
The change covers starting a call only. Console managed keys, metering, events and model catalog entries are outside its scope, as are Gemini and ElevenLabs. The author describes moving the iOS app onto this route as subsequent work. The release therefore does not establish that existing mobile clients have stopped using their own provider keys.
Live testing remains limited
The author reports mocked provider tests and successful live OpenAI connections through a local helper. Those live checks did not cover the HTTP route or iOS app. Grok was not verified live, and its temporary token handling assumes an OpenAI style response shape. ByteForward has not independently installed or tested this release.
For changes to the everyday coding interface, ByteForward’s OpenCode 2.0.30 review guide covers docked diffs and session navigation. This later API addition serves a different audience, developers building voice clients around OpenCode.
Illustrative archival audio equipment photograph taken in 2020. Photo by Jeremy Enns on Pexels, used under the Pexels License. The photograph does not depict OpenCode.



