Dexter
Dexter
Docs

Realtime Sessions

POST /realtime/sessions creates an OpenAI Realtime session with Dexter identity, wallet context, and MCP tools injected.

Request

URL: https://api.dexter.cash/realtime/sessions

{
  "model": "gpt-realtime",
  "voice": "verse",
  "supabaseAccessToken": "eyJhbGciOiJIUzI1NiIs..."
}
FieldTypeRequiredDescription
modelstringNoRealtime model (default: server-configured)
voicestringNoVoice ID — cedar, verse, alloy, etc. Default: cedar
supabaseAccessTokenstringNoFor authenticated sessions. Omit for guest.
guestProfileobjectNoOverride guest label and instructions

Guest sessions require no auth — just send an empty body {}.

Response (200)

{
  "id": "sess_abc123",
  "object": "realtime.session",
  "model": "gpt-realtime",
  "client_secret": {
    "value": "ek_ephemeral_token_here",
    "expires_at": 1738742400
  },
  "voice": "cedar",
  "tools": [...],
  "dexter_session": {
    "type": "guest",
    "user": null,
    "guest": { "session_id": "550e8400-..." },
    "wallet": null,
    "prompt_profile": null
  }
}
FieldTypeDescription
client_secret.valuestringEphemeral token for WebRTC connection
client_secret.expires_atnumberExpiry timestamp (seconds)
dexter_session.typestring"guest" or "user"
dexter_session.walletobject{ public_key, label } if wallet assigned
toolsarrayMCP tools available in the session

WebRTC Setup

Use the ephemeral token to connect to the OpenAI Realtime WebSocket:

wss://api.openai.com/v1/realtime
Authorization: Bearer <client_secret.value>
OpenAI-Beta: realtime=v1

The session includes Dexter MCP tools, so the voice agent can search the marketplace, check pricing, and execute payments through the conversation.

On this page