OhMyGPT

Create Realtime client secret

POST
/v1/realtime/client_secrets

Creates a short-lived client secret for browsers and mobile apps: open a session at wss://api.ohmygpt.com/v1/realtime with it in place of your API key. The model and session settings are fixed when it is created and applied when the session opens. Set the model in session.model or the top-level model field.

Authorization

ApiKeyAuth
headerAuthorization<token>

Request Body

application/json
  1. body
expires_after?
model?string

OhMyGPT model ID. Used when session.model is omitted.

session?
[key: string]?any

Response Body

The client secret and its session configuration.

application/json
  1. response
expires_at*integer

Unix time when the client secret expires.

Formatint64
session*

The session settings, applied when a session opens with this client secret.

value*string

The client secret. Connect to wss://api.ohmygpt.com/v1/realtime with it in place of an API key.

[key: string]?any
Example Request
curl -X POST 'https://api.ohmygpt.com/v1/realtime/client_secrets' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "expires_at": 0,  "session": {},  "value": "string"}