Skip to content

Protocols and transport

client.chat().completions() uses the native Model Studio API. Java does not offer the Python SDK's protocol= setting. Pointing baseUrl(...) at a compatible-mode endpoint does not switch request formatting or response parsing to OpenAI or Anthropic compatibility.

Surface Transport Entry point
Regular chat Native request and HTTP/JSON response chat().completions().create(...); see the chat API.
Streaming chat Same native endpoint with an HTTP SSE response chat().completions().createStreaming(...); consume and close the stream.
Duplex speech and realtime voice WebSocket Choose the audio resource for your task; client.wsConnection() opens a shared low-level WebSocket.

Endpoints and resource exceptions

  • baseUrl(...) sets the HTTP endpoint; wsBaseUrl(...) sets the WebSocket endpoint. See configuration for precedence.
  • decision().create(...) uses the fixed compatible-mode resource path /compatible-mode/v1/systemone on the default gateway. This is a decision resource route, not a chat protocol switch.

Transport API

Type Role
HttpTransport Sends HTTP requests and handles shared responses and transport options.
SseStream Low-level SSE frames; application code generally uses ResponseStream<T> or Flowable<T>.
WsConnection Shared WebSocket connection that can multiplex audio tasks.