Responses

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.

GET
/v1/responses
AuthorizationBearer <token>

Bearer token authentication. Use your MPilot virtual-key JWT or admin JWT. Virtual keys (prefixed with sk-bf-) can also be passed here.

In: header

Header Parameters

Upgradestring

Must be websocket

Value in"websocket"
Sec-WebSocket-Protocol?string

Optional WebSocket subprotocol. Use openai-insecure-api-key.<key> to authenticate when headers cannot be supplied by the client.

Response Body

curl -X GET "https://loading/{AI_GATEWAY_URL}/v1/responses" \  -H "Upgrade: websocket" \  -H "Sec-WebSocket-Protocol: string"
Empty
Empty
Empty
On this page

On this page

No Headings