GET
https://octopusx.ai
/
v1
/
realtime
Realtime API
curl --request GET \
  --url https://octopusx.ai/v1/realtime \
  --header 'Authorization: Bearer <token>'

Realtime API

The Realtime route uses a WebSocket connection and is suitable for low-latency voice conversations, real-time event streams, and bidirectional interaction scenarios. This route goes through TokenAuth, model rate limiting, and channel distribution.

Connection URL

wss://https://octopusx.ai/v1/realtime

Authentication

Authorization: Bearer YOUR_API_KEY
If the client cannot conveniently set WebSocket request headers, you can use a supported temporary token or have the proxy layer inject the authentication header according to your gateway configuration.

Connection Example

const ws = new WebSocket("wss://https://octopusx.ai/v1/realtime", [], {
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
  },
});

ws.onopen = () => {
  ws.send(JSON.stringify({
    type: "session.update",
    session: {
      modalities: ["text"],
      instructions: "You are a real-time voice assistant."
    }
  }));
};

ws.onmessage = (event) => {
  console.log(JSON.parse(event.data));
};

Common Events

eventDescription
session.updateUpdate session configuration
conversation.item.createCreate a conversation item
response.createTrigger a model response
response.text.deltaText delta
response.doneResponse complete