Create client secret
Changed onCreate a Realtime client secret with an associated session configuration.
Client secrets are short-lived tokens that can be passed to a client app, such as a web frontend or mobile client, which grants access to the Realtime API without leaking your main API key. You can configure a custom TTL for each client secret.
You can also attach session configuration options to the client secret, which will be applied to any sessions created using that client secret, but these can also be overridden by the client connection.
Learn more about authentication with client secrets over WebRTC.
Returns the created client secret and the effective session object. The client secret is a string that looks like ek_1234.
Request
- Base URLhttps://api.openai.com/v1
- URLhttps://api.openai.com/v1/realtime/client_secrets
- AuthHTTP bearer
Request body
Response
Client secret created successfully.
Changes
- info
added the new optional request property
///////// - info
added the new optional request property
///////// - info
added the new optional request property
///////// - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status
- info
- info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- info