apicheats.dev openai/llms.txt Raw .md
POST

POST /realtime/translations/client_secrets — OpenAI API

OpenAI API key (required); https://api.openai.com/v1

OpenAI API

Create translation client secret

Base URL
https://api.openai.com/v1
Auth
Authorization: Bearer <OPENAI_API_KEY>
Last verified
2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 240 tokens · Vary: Accept

Critical gotchas

The Responses API is the primary interface for new text and tool workflows; Chat Completions remains a separate compatibility API.

Audio transcription uploads use multipart form data rather than a JSON request body.

cURL

curl -X POST 'https://api.openai.com/v1/realtime/translations/client_secrets' \  -H "Authorization: Bearer $OPENAI_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "session": {    "model": "example-model",    "audio": {      "input": {        "transcription": {          "model": "example-model"        },        "noise_reduction": {          "type": "near_field"        }      },      "output": {        "language": "example-language"      }    }  }}'

Parameters

Name In Type Required Description
expires_after body object No 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 body object Yes Realtime translation session configuration. Translation sessions stream source audio in and translated audio plus transcript deltas out continuously.

Response 200 OK

{
  "value": "string",
  "expires_at": 0,
  "session": {
    "id": "string",
    "type": "translation",
    "expires_at": 0,
    "model": "string",
    "audio": {
      "input": {
        "transcription": {
          "model": "string"
        },
        "noise_reduction": {
          "type": "near_field"
        }
      },
      "output": {
        "language": "string"
      }
    }
  }
}
Get a free OpenAI API key → sponsored

Affiliate link - we may earn a commission, at no extra cost to you.