API calls for all endpoints tagged Responses.
Summary
Functions
Create a response Creates a response using the OpenAI Responses API format. Supports streaming via SSE.
Responses API over WebSocket
Upgrades the connection to a WebSocket and runs the OpenAI Responses API in WebSocket Mode. Clients send response.create events on the socket and receive streamed events through the standard inference pipeline (PreLLMHook, key selection, provider call, PostLLMHook). Auth is identical to the HTTP POST variant — Bearer/Basic/Virtual Key/API Key may be supplied as request headers on the upgrade request. The OpenAI SDK can also pass an API key via the openai-insecure-api-key.<key> WebSocket subprotocol. This GET endpoint shares its path with the POST inference endpoint; route selection is based on the Upgrade: websocket request header.
Functions
@spec create_response( Tesla.Env.client(), ExBifrost.Model.ResponsesRequest.t(), keyword() ) :: {:ok, ExBifrost.Model.ResponsesResponse.t()} | {:ok, ExBifrost.Model.BifrostError.t()} | {:error, Tesla.Env.t()}
Create a response Creates a response using the OpenAI Responses API format. Supports streaming via SSE.
Parameters
connection(ExBifrost.Connection): Connection to serverresponses_request(ResponsesRequest):opts(keyword): Optional parameters
Returns
{:ok, ExBifrost.Model.ResponsesResponse.t}on success{:error, Tesla.Env.t}on failure
@spec create_response_web_socket(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Responses API over WebSocket
Upgrades the connection to a WebSocket and runs the OpenAI Responses API in WebSocket Mode. Clients send response.create events on the socket and receive streamed events through the standard inference pipeline (PreLLMHook, key selection, provider call, PostLLMHook). Auth is identical to the HTTP POST variant — Bearer/Basic/Virtual Key/API Key may be supplied as request headers on the upgrade request. The OpenAI SDK can also pass an API key via the openai-insecure-api-key.<key> WebSocket subprotocol. This GET endpoint shares its path with the POST inference endpoint; route selection is based on the Upgrade: websocket request header.
Parameters
connection(ExBifrost.Connection): Connection to serverupgrade(String.t): Must bewebsocketopts(keyword): Optional parameters:"Sec-WebSocket-Protocol"(String.t): Optional WebSocket subprotocol. Useopenai-insecure-api-key.<key>to authenticate when headers cannot be supplied by the client.
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure