---
title: "Create translation client secret"
method: POST
path: "/realtime/translations/client_secrets"
tags: ["Realtime"]
---

# Create translation client secret

`POST /realtime/translations/client_secrets`

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`.

## Request body

- RealtimeTranslationClientSecretCreateRequest — Create a translation session and client secret for the Realtime API.
  - `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.
    - `anchor` 'created_at' — The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.
    - `seconds` integer — The number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.
  - `session` RealtimeTranslationSessionCreateRequest, required — Realtime translation session configuration. Translation sessions stream source audio in and translated audio plus transcript deltas out continuously.
    - `model` string, required — The Realtime translation model used for this session.
    - `audio` object — Configuration for translation input and output audio.
      - `input` object
        - `transcription` object, nullable — Optional source-language transcription. When configured, the server emits `session.input_transcript.delta` events. Translation itself still runs from the input audio stream.
          - `model` string, required — The transcription model to use for source transcript deltas.
        - `noise_reduction` object, nullable — Optional input noise reduction. Set to `null` to disable it.
          - `type` 'near_field' | 'far_field', required — Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.
      - `output` object
        - `language` string — Target language for translated output audio and transcript deltas.

## Response `200`

Translation client secret created successfully.

- RealtimeTranslationClientSecretCreateResponse — Response from creating a translation session and client secret for the Realtime API.
  - `value` string, required — The generated client secret value.
  - `expires_at` integer, required — Expiration timestamp for the client secret, in seconds since epoch.
  - `session` RealtimeTranslationSession, required — A Realtime translation session. Translation sessions continuously translate input audio into the configured output language.
    - `id` string, required — Unique identifier for the session that looks like `sess_1234567890abcdef`.
    - `type` 'translation', required — The session type. Always `translation` for Realtime translation sessions.
    - `expires_at` integer, required — Expiration timestamp for the session, in seconds since epoch.
    - `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`.
    - `audio` object, required — Configuration for translation input and output audio.
      - `input` object
        - `transcription` object, nullable — Optional source-language transcription. When configured, the server emits `session.input_transcript.delta` events. Translation itself still runs from the input audio stream.
          - `model` string, required — The transcription model used for source transcript deltas.
        - `noise_reduction` object, nullable — Optional input noise reduction.
          - `type` 'near_field' | 'far_field', required — Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.
      - `output` object
        - `language` string — Target language for translated output audio and transcript deltas.

---

[API](https://skmtc.net/openai/apis/openai-api.md) · [All operations](https://skmtc.net/openai/apis/openai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openai/openai-api/versions/dcd35773a322/schema)
