NAME

OpenAPI::Client::OpenAI::Path::realtime-translations-client_secrets - Documentation for the /realtime/translations/client_secrets path.

OPERATIONS

POST /realtime/translations/client_secrets

create-realtime-translation-client-secret

$client->create_realtime_translation_client_secret({
    body => { ... },
});

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 .

Responses

200 - Translation client secret created successfully.

Content-Type: application/json

Example:

{
   "expires_at" : 1756310470,
   "session" : {
      "audio" : {
         "input" : {
            "noise_reduction" : null,
            "transcription" : null
         },
         "output" : {
            "language" : "es"
         }
      },
      "expires_at" : 1756310470,
      "id" : "sess_C9CiUVUzUzYIssh3ELY1d",
      "model" : "gpt-realtime-translate",
      "type" : "translation"
   },
   "value" : "ek_68af296e8e408191a1120ab6383263c2"
}

SCHEMAS

RealtimeTranslationClientSecretCreateRequest

Properties:

  • expires_after (object) - 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.

  • session (RealtimeTranslationSessionCreateRequest, required)

    See "RealtimeTranslationSessionCreateRequest" below for shape.

RealtimeTranslationClientSecretCreateResponse

Properties:

  • expires_at (integer, required) - Expiration timestamp for the client secret, in seconds since epoch.

  • session (RealtimeTranslationSession, required)

    See "RealtimeTranslationSession" below for shape.

  • value (string, required) - The generated client secret value.

RealtimeTranslationSession

Properties:

  • audio (object, required) - Configuration for translation input and output audio.

  • expires_at (integer, required) - Expiration timestamp for the session, in seconds since epoch.

  • id (string, required) - Unique identifier for the session that looks like sess_1234567890abcdef .

  • model (string, required) - The Realtime translation model used for this session. This field is set at session creation and cannot be changed with session.update .

  • type (string, required) - The session type. Always translation for Realtime translation sessions.

    Allowed values: translation

RealtimeTranslationSessionCreateRequest

Properties:

  • audio (object) - Configuration for translation input and output audio.

  • model (string, required) - The Realtime translation model used for this session.

SEE ALSO

OpenAPI::Client::OpenAI::Path

COPYRIGHT AND LICENSE

Copyright (C) 2023-2026 by Nelson Ferraz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.