POST
/realtime/translations/client_secretsCreate translation client secret
Create a Realtime translation client secret with an associated translation 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 Translation API without leaking your main API key. You can configure a custom TTL for each client secret.
Returns the created client secret and the effective translation session object.
The client secret is a string that looks like ek_1234.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
Create a client secret with the given translation session configuration.
expires_afterobjectoptional
Configuration for the client secret expiration. Expiration refers to the time after which
a client secret will no longer be valid for creating sessions. The session itself may
continue after that time once started. A secret can be used to create multiple sessions
until it expires.
sessionobjectrequired
Realtime translation session configuration. Translation sessions stream source
audio in and translated audio plus transcript deltas out continuously.
200Translation client secret created successfully.
valuestringrequired
The generated client secret value.
expires_atintegerrequired
Expiration timestamp for the client secret, in seconds since epoch.
sessionobjectrequired
A Realtime translation session. Translation sessions continuously translate input
audio into the configured output language.