pub struct RealtimeTranslations<'c, C: Config> { /* private fields */ }realtime only.Expand description
Realtime translations API. Translation sessions continuously translate input audio into the configured output language.
Implementations§
Source§impl<'c, C: Config> RealtimeTranslations<'c, C>
impl<'c, C: Config> RealtimeTranslations<'c, C>
pub fn new(client: &'c Client<C>) -> Self
Sourcepub async fn create_client_secret(
&self,
request: RealtimeTranslationClientSecretCreateRequest,
) -> Result<RealtimeTranslationClientSecretCreateResponse, OpenAIError>
pub async fn create_client_secret( &self, request: RealtimeTranslationClientSecretCreateRequest, ) -> Result<RealtimeTranslationClientSecretCreateResponse, OpenAIError>
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.
Sourcepub async fn create_client_secret_byot<T0: Serialize, R: DeserializeOwned>(
&self,
request: T0,
) -> Result<R, OpenAIError>
pub async fn create_client_secret_byot<T0: Serialize, R: DeserializeOwned>( &self, request: T0, ) -> Result<R, OpenAIError>
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.
Trait Implementations§
Source§impl<'c, C: Config> RequestOptionsBuilder for RealtimeTranslations<'c, C>
Available on crate feature _api only.
impl<'c, C: Config> RequestOptionsBuilder for RealtimeTranslations<'c, C>
_api only.