Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge
microsoft-foundry.rest.security.o-auth2-auth

Realtime

Create a transcription session

POST /openai/v1/realtime/transcription_sessions

Creates an ephemeral API token and Realtime transcription session for use in client-side applications.

Request Body

Create an ephemeral API key with the given session configuration.

Content-Type: application/json
turn_detection OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetection
type enum
server_vad
threshold number
prefix_padding_ms integer
silence_duration_ms integer
input_audio_noise_reduction OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction
type enum

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.

near_fieldfar_field
input_audio_format enum

The format of input audio. Options are pcm16, g711_ulaw, or g711_alaw. For pcm16, input audio must be 16-bit PCM at a 24kHz sample rate, single channel (mono), and little-endian byte order.

pcm16g711_ulawg711_alaw
input_audio_transcription OpenAI.AudioTranscription
model string | enum

The model to use for transcription. Current options are whisper-1, gpt-transcribe, gpt-live-transcribe, gpt-4o-mini-transcribe, gpt-4o-mini-transcribe-2025-12-15, gpt-4o-transcribe, gpt-4o-transcribe-diarize, and gpt-realtime-whisper. Use gpt-4o-transcribe-diarize when you need diarization with speaker labels.

Any of the following:
string
enum
whisper-1gpt-transcribegpt-live-transcribegpt-4o-mini-transcribegpt-4o-mini-transcribe-2025-12-15gpt-4o-transcribegpt-4o-transcribe-diarizegpt-realtime-whisper
language string

The language of the input audio. Supplying the input language in ISO-639-1 (e.g. en) format will improve accuracy and latency.

languages string[]

Possible languages of the input audio, in ISO-639-1 format. Supported by gpt-transcribe and gpt-live-transcribe.

keywords string[]

Words or phrases to guide transcription of the input audio. Supported by gpt-transcribe and gpt-live-transcribe.

prompt string

An optional text to guide the model's style or continue a previous audio segment. For whisper-1, the prompt is a list of keywords. For gpt-4o-transcribe models (excluding gpt-4o-transcribe-diarize), the prompt is a free text string, for example "expect words related to technology". Prompt is not supported with gpt-realtime-whisper in GA Realtime sessions.

delay enum

Controls how long the model waits before emitting transcription text. Higher values can improve transcription accuracy at the cost of latency. Only supported with gpt-realtime-whisper in GA Realtime sessions.

minimallowmediumhighxhigh
include enum[]

The set of items to include in the transcription. Current available items are: item.input_audio_transcription.logprobs

Responses

The request has succeeded.

Body

Content-Type: application/json
client_secret OpenAI.RealtimeTranscriptionSessionCreateResponseClientSecret required
value string required
expires_at integer required
modalities enum[]

The set of modalities the model can respond with. To disable audio, set this to ["text"].

input_audio_format string

The format of input audio. Options are pcm16, g711_ulaw, or g711_alaw.

input_audio_transcription OpenAI.AudioTranscriptionResponse
model string | enum

The model used for transcription. Current options are whisper-1, gpt-transcribe, gpt-live-transcribe, gpt-4o-mini-transcribe, gpt-4o-mini-transcribe-2025-12-15, gpt-4o-transcribe, gpt-4o-transcribe-diarize, and gpt-realtime-whisper.

Any of the following:
string
enum
whisper-1gpt-transcribegpt-live-transcribegpt-4o-mini-transcribegpt-4o-mini-transcribe-2025-12-15gpt-4o-transcribegpt-4o-transcribe-diarizegpt-realtime-whisper
language string | null

The language of the input audio.

languages string[]

The possible input audio languages configured for transcription, in ISO-639-1 format.

prompt string

The prompt configured for input audio transcription, when present.

turn_detection OpenAI.RealtimeTranscriptionSessionCreateResponseTurnDetection
type string
threshold number
prefix_padding_ms integer
silence_duration_ms integer
type enum required
transcription

Client error

Body

Content-Type: application/json
error OpenAI.Error required
code string | null required
message string required
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Any of the following:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string required

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Server error

Body

Content-Type: application/json
error OpenAI.Error required
code string | null required
message string required
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Any of the following:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string required

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Request

curl -X POST https://api.openai.com/v1/realtime/transcription_sessions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Response

{
  "id": "sess_BBwZc7cFV3XizEyKGDCGL",
  "object": "realtime.transcription_session",
  "modalities": ["audio", "text"],
  "turn_detection": {
    "type": "server_vad",
    "threshold": 0.5,
    "prefix_padding_ms": 300,
    "silence_duration_ms": 200
  },
  "input_audio_format": "pcm16",
  "input_audio_transcription": {
    "model": "gpt-4o-transcribe",
    "language": null,
    "prompt": ""
  },
  "client_secret": null
}
en-us
Your Privacy Choices
  • AI Disclaimer
  • Previous Versions
  • Blog
  • Contribute
  • Privacy
  • Consumer Health Privacy
  • Terms of Use
  • Trademarks
  • © Microsoft 2026