Create client secret
Create 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 body
Example request
{
"session": {
"audio": {
"output": {
"voice": {
"id": "voice_1234"
}
}
}
}
}Response
Client secret created successfully.
Changes
Changed in 5 of the 163 revisions of this API.730
- ○
added the non-success response with the status
response-non-success-status-added
- ○
added the non-success response with the status
response-non-success-status-added
- ○
added the non-success response with the status
response-non-success-status-added
- ○
- ○
added
realtimetranscriptiondiscriminator mapping keys to theresponse property for the response statusresponse-property-discriminator-mapping-added
- ○
- ○
request property
/////deprecatedrequest-property-deprecated
- ○
response property
session/oneOf[subschema #1: Realtime session configuration object]/tools/items/oneOf[subschema #2: MCP tool]/connector_iddeprecatedresponse-property-deprecated
- ○
- ●
added the new
autoenum value to the////////response property for the response statusresponse-property-enum-value-added
- ●
added the new
gpt-live-transcribeenum value to the//////response property for the response statusresponse-property-enum-value-added
- ●
added the new
gpt-live-transcribeenum value to the//////response property for the response statusresponse-property-enum-value-added
- ●
added the new
gpt-realtime-2.1enum value to the///response property for the response statusresponse-property-enum-value-added
- ●
added the new
gpt-realtime-2.1-minienum value to the///response property for the response statusresponse-property-enum-value-added
- ●
added the new
gpt-transcribeenum value to the//////response property for the response statusresponse-property-enum-value-added
- ●
added the new
gpt-transcribeenum value to the//////response property for the response statusresponse-property-enum-value-added
- ○
added the new optional request property
/////new-optional-request-property
- ○
added the new optional request property
/////new-optional-request-property
- ○
added the new optional request property
////////new-optional-request-property
- ○
added the new optional request property
////////new-optional-request-property
- ○
added the new optional request property
////////new-optional-request-property
- ○
added the new optional request property
/////new-optional-request-property
- ○
added the new optional request property
/////new-optional-request-property
- ○
added the new optional request property
/////new-optional-request-property
- ○
added the new optional request property
/////new-optional-request-property
- ○
added the new
autoenum value to the request property////////request-property-enum-value-added
- ○
added the new
gpt-live-transcribeenum value to the request property//////request-property-enum-value-added
- ○
added the new
gpt-live-transcribeenum value to the request property//////request-property-enum-value-added
- ○
added the new
gpt-realtime-2.1enum value to the request property///request-property-enum-value-added
- ○
added the new
gpt-realtime-2.1-minienum value to the request property///request-property-enum-value-added
- ○
added the new
gpt-transcribeenum value to the request property//////request-property-enum-value-added
- ○
added the new
gpt-transcribeenum value to the request property//////request-property-enum-value-added
- ○
added the optional property
/////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////////to the response with the statusresponse-optional-property-added
- ○
added the optional property
/////to the response with the statusresponse-optional-property-added
- ○
added the optional property
/////to the response with the statusresponse-optional-property-added
- ○
added the optional property
/////to the response with the statusresponse-optional-property-added
This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ●
- ○
endpoint added
endpoint-added
This revision also has 40 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○