Realtime

Create a client secret

Changed on

Create a short-lived ephemeral key for a browser, mobile app, or other client-side Higgs Realtime connection. Call this endpoint from a trusted server with a valid Boson API key, then pass the returned key to the client.

post/v1/realtime/client_secrets

Request

  • Base URL
    https://api.boson.ai
  • URL
    https://api.boson.ai/v1/realtime/client_secrets
  • Auth
    HTTP bearer

Request body

Example request

{
  "expires_after": {
    "seconds": 300
  }
}

Response

A short-lived Realtime client secret.

object'realtime.client_secret' required
valuestring required

Ephemeral key beginning with bai-eph-.

expires_atinteger required

Expiration time as Unix seconds.

Example response

{
  "value": "bai-eph-<hash>",
  "expires_at": 1712345678,
  "session": {
    "id": "sess_ab12cd34"
  }
}

Changes