Create Realtime client secret
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.
ApiKeyAuthAuthorization<token>application/json- body
expires_after?model?stringOhMyGPT model ID. Used when session.model is omitted.
session?[key: string]?anyThe client secret and its session configuration.
application/json- response
expires_at*integerUnix time when the client secret expires.
int64session*The session settings, applied when a session opens with this client secret.
value*stringThe client secret. Connect to wss://api.ohmygpt.com/v1/realtime with it in place of an API key.
[key: string]?anycurl -X POST 'https://api.ohmygpt.com/v1/realtime/client_secrets' \ -H 'Content-Type: application/json' \ -d '{}'{ "expires_at": 0, "session": {}, "value": "string"}Start a Realtime WebRTC call POST
Exchanges a WebRTC SDP offer for an OpenAI Realtime SDP answer. Audio and the `oai-events` data channel then flow between the client and the model; each response is billed as it finishes. Authenticate with an API key or a client secret. Send the offer as `multipart/form-data` with `sdp` and `session` fields, or as `application/sdp` with the model in the `model` query parameter. With a client secret, the model and session settings come from the secret.
Decisions
Typed answers to classification questions with OpenAI Decisions, and TypeSafe System One.