Skip to content

Commit e1f999c

Browse files
Merge pull request #4366 from eric-urban/eur/webrtc-3
realtime webrtc
2 parents ef9c649 + 3362656 commit e1f999c

File tree

9 files changed

+36
-28
lines changed

9 files changed

+36
-28
lines changed

articles/ai-services/openai/concepts/models.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Details about maximum request tokens and training data are available in the foll
258258
|`gpt-4o-mini-realtime-preview` (2024-12-17) <br> **GPT-4o audio** | **Audio model** for real-time audio processing. |Input: 128,000 <br> Output: 4,096 | Oct 2023 |
259259
|`gpt-4o-audio-preview` (2024-12-17) <br> **GPT-4o audio** | **Audio model** for audio and text generation. |Input: 128,000 <br> Output: 4,096 | Oct 2023 |
260260
|`gpt-4o-realtime-preview` (2024-12-17) <br> **GPT-4o audio** | **Audio model** for real-time audio processing. |Input: 128,000 <br> Output: 4,096 | Oct 2023 |
261-
|`gpt-4o-realtime-preview` (2024-10-01) <br> **GPT-4o audio** | **Audio model** for real-time audio processing. |Input: 128,000 <br> Output: 4,096 | Oct 2023 |
261+
|`gpt-4o-mini-realtime-preview` (2024-12-17) <br> **GPT-4o audio** | **Audio model** for real-time audio processing. |Input: 128,000 <br> Output: 4,096 | Oct 2023 |
262262

263263
To compare the availability of GPT-4o audio models across all regions, see the [models table](#global-standard-model-availability).
264264

articles/ai-services/openai/how-to/realtime-audio-webrtc.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ Use the [Realtime API via WebSockets](./realtime-audio-websockets.md) if you nee
3333
The GPT 4o real-time models are available for global deployments in [East US 2 and Sweden Central regions](../concepts/models.md#global-standard-model-availability).
3434
- `gpt-4o-mini-realtime-preview` (2024-12-17)
3535
- `gpt-4o-realtime-preview` (2024-12-17)
36-
- `gpt-4o-realtime-preview` (2024-10-01)
36+
37+
You should use API version `2025-04-01-preview` in the URL for the Realtime API. The API version is included in the sessions URL.
3738

3839
For more information about supported models, see the [models and versions documentation](../concepts/models.md#audio-models).
3940

@@ -51,21 +52,28 @@ You use different URLs to get an ephemeral API key and connect to the Realtime A
5152

5253
| URL | Description |
5354
|---|---|
54-
| Sessions URL | The `/realtime/sessions` URL is used to get an ephemeral API key. The sessions URL includes the Azure OpenAI resource URL, deployment name, the `/realtime/sessions` path, and the API version. |
55-
| WebRTC URL | The WebRTC URL is used to establish a WebRTC peer connection with the Realtime API. The WebRTC URL includes the region and the `realtimeapi-preview.ai.azure.com/v1/realtimertc` path.<br/><br/>The supported regions are `eastus2` and `swedencentral`. |
55+
| Sessions URL | The `/realtime/sessions` URL is used to get an ephemeral API key. The sessions URL includes the Azure OpenAI resource URL, deployment name, the `/realtime/sessions` path, and the API version.<br/><br/>You should use API version `2025-04-01-preview` in the URL.<br/><br/>For an example and more information, see the [Sessions URL](#sessions-url) section below.|
56+
| WebRTC URL | The WebRTC URL is used to establish a WebRTC peer connection with the Realtime API. The WebRTC URL includes the region and the `realtimeapi-preview.ai.azure.com/v1/realtimertc` path.<br/><br/>The supported regions are `eastus2` and `swedencentral`.<br/><br/>For an example and more information, see the [Sessions URL](#webrtc-url) section below.|
5657

58+
### Sessions URL
5759
Here's an example of a well-constructed `realtime/sessions` URL that you use to get an ephemeral API key:
5860

5961
```http
60-
https://YourAzureOpenAIResourceName.openai.azure.com/openai/deployments/gpt-4o-mini-realtime-preview/realtime/sessions?api-version=2025-02-01-preview
62+
https://YourAzureOpenAIResourceName.openai.azure.com/openai/realtimeapi/sessions?api-version=2025-04-01-preview
6163
```
62-
64+
### WebRTC URL
6365
Make sure the region of the WebRTC URL matches the region of your Azure OpenAI resource.
6466

6567
For example:
6668
- If your Azure OpenAI resource is in the swedencentral region,
67-
the WebRTC URL should be `https://swedencentral.realtimeapi-preview.ai.azure.com/v1/realtimertc`.
68-
- If your Azure OpenAI resource is in the eastus2 region, the WebRTC URL should be `https://eastus2.realtimeapi-preview.ai.azure.com/v1/realtimertc`.
69+
the WebRTC URL should be:
70+
```http
71+
https://swedencentral.realtimeapi-preview.ai.azure.com/v1/realtimertc
72+
```
73+
- If your Azure OpenAI resource is in the eastus2 region, the WebRTC URL should be:
74+
```http
75+
https://eastus2.realtimeapi-preview.ai.azure.com/v1/realtimertc
76+
```
6977
7078
The sessions URL includes the Azure OpenAI resource URL, deployment name, the `/realtime/sessions` path, and the API version. The Azure OpenAI resource region isn't part of the sessions URL.
7179
@@ -141,7 +149,7 @@ The sample code is an HTML page that allows you to start a session with the GPT-
141149
// The SESSIONS_URL includes the Azure OpenAI resource URL,
142150
// deployment name, the /realtime/sessions path, and the API version.
143151
// The Azure OpenAI resource region isn't part of the SESSIONS_URL.
144-
const SESSIONS_URL="https://YourAzureOpenAIResourceName.openai.azure.com/openai/deployments/gpt-4o-mini-realtime-preview/realtime/sessions?api-version=2025-02-01-preview"
152+
const SESSIONS_URL="https://YourAzureOpenAIResourceName.openai.azure.com/openai/realtimeapi/sessions?api-version=2025-04-01-preview"
145153
146154
// The API key of the Azure OpenAI resource.
147155
const API_KEY = "YOUR_API_KEY_HERE";

articles/ai-services/openai/how-to/realtime-audio-websockets.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ Use the Realtime API via WebSockets in server-to-server scenarios where low late
3030
The GPT-4o real-time models are available for global deployments in [East US 2 and Sweden Central regions](../concepts/models.md#global-standard-model-availability).
3131
- `gpt-4o-mini-realtime-preview` (2024-12-17)
3232
- `gpt-4o-realtime-preview` (2024-12-17)
33-
- `gpt-4o-realtime-preview` (2024-10-01)
33+
34+
You should use API version `2025-04-01-preview` in the URL for the Realtime API.
3435

3536
For more information about supported models, see the [models and versions documentation](../concepts/models.md#audio-models).
3637

articles/ai-services/openai/how-to/realtime-audio.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ You can use the Realtime API via WebRTC or WebSocket to send audio input to the
2929
The GPT 4o real-time models are available for global deployments in [East US 2 and Sweden Central regions](../concepts/models.md#global-standard-model-availability).
3030
- `gpt-4o-mini-realtime-preview` (2024-12-17)
3131
- `gpt-4o-realtime-preview` (2024-12-17)
32-
- `gpt-4o-realtime-preview` (2024-10-01)
32+
33+
You should use API version `2025-04-01-preview` in the URL for the Realtime API.
3334

3435
See the [models and versions documentation](../concepts/models.md#audio-models) for more information.
3536

articles/ai-services/openai/includes/realtime-javascript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ For the recommended keyless authentication with Microsoft Entra ID, you need to:
7373
const endpoint = process.env.AZURE_OPENAI_ENDPOINT || "AZURE_OPENAI_ENDPOINT";
7474
// Required Azure OpenAI deployment name and API version
7575
const deploymentName = process.env.AZURE_OPENAI_DEPLOYMENT_NAME || "gpt-4o-mini-realtime-preview";
76-
const apiVersion = process.env.OPENAI_API_VERSION || "2024-10-01-preview";
76+
const apiVersion = process.env.OPENAI_API_VERSION || "2025-04-01-preview";
7777
// Keyless authentication
7878
const credential = new DefaultAzureCredential();
7979
const scope = "https://cognitiveservices.azure.com/.default";
@@ -156,7 +156,7 @@ For the recommended keyless authentication with Microsoft Entra ID, you need to:
156156
const apiKey = process.env.AZURE_OPENAI_API_KEY || "Your API key";
157157
// Required Azure OpenAI deployment name and API version
158158
const deploymentName = process.env.AZURE_OPENAI_DEPLOYMENT_NAME || "gpt-4o-mini-realtime-preview";
159-
const apiVersion = process.env.OPENAI_API_VERSION || "2024-10-01-preview";
159+
const apiVersion = process.env.OPENAI_API_VERSION || "2025-04-01-preview";
160160
const azureOpenAIClient = new AzureOpenAI({
161161
apiKey: apiKey,
162162
apiVersion: apiVersion,

articles/ai-services/openai/includes/realtime-python.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ For the recommended keyless authentication with Microsoft Entra ID, you need to:
109109
client = AsyncAzureOpenAI(
110110
azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"],
111111
azure_ad_token_provider=token_provider,
112-
api_version="2024-10-01-preview",
112+
api_version="2025-04-01-preview",
113113
)
114114
async with client.beta.realtime.connect(
115115
model="gpt-4o-realtime-preview", # name of your deployment
@@ -181,7 +181,7 @@ For the recommended keyless authentication with Microsoft Entra ID, you need to:
181181
client = AsyncAzureOpenAI(
182182
azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"],
183183
api_key=os.environ["AZURE_OPENAI_API_KEY"],
184-
api_version="2024-10-01-preview",
184+
api_version="2025-04-01-preview",
185185
)
186186
async with client.beta.realtime.connect(
187187
model="gpt-4o-realtime-preview", # deployment name of your model

articles/ai-services/openai/includes/realtime-typescript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ For the recommended keyless authentication with Microsoft Entra ID, you need to:
8484
8585
// Required Azure OpenAI deployment name and API version
8686
const deploymentName = process.env.AZURE_OPENAI_DEPLOYMENT_NAME || "gpt-4o-mini-realtime-preview";
87-
const apiVersion = process.env.OPENAI_API_VERSION || "2024-10-01-preview";
87+
const apiVersion = process.env.OPENAI_API_VERSION || "2025-04-01-preview";
8888
8989
// Keyless authentication
9090
const credential = new DefaultAzureCredential();
@@ -197,7 +197,7 @@ For the recommended keyless authentication with Microsoft Entra ID, you need to:
197197
198198
// Required Azure OpenAI deployment name and API version
199199
const deploymentName = process.env.AZURE_OPENAI_DEPLOYMENT_NAME || "gpt-4o-mini-realtime-preview";
200-
const apiVersion = process.env.OPENAI_API_VERSION || "2024-10-01-preview";
200+
const apiVersion = process.env.OPENAI_API_VERSION || "2025-04-01-preview";
201201
202202
const azureOpenAIClient = new AzureOpenAI({
203203
apiKey: apiKey,

articles/ai-services/openai/realtime-audio-quickstart.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@ Most users of the Realtime API need to deliver and receive audio from an end-use
2626
The GPT 4o real-time models are available for global deployments.
2727
- `gpt-4o-realtime-preview` (version `2024-12-17`)
2828
- `gpt-4o-mini-realtime-preview` (version `2024-12-17`)
29-
- `gpt-4o-realtime-preview` (version `2024-10-01`)
3029

3130
See the [models and versions documentation](./concepts/models.md#audio-models) for more information.
3231

3332
## API support
3433

35-
Support for the Realtime API was first added in API version `2024-10-01-preview`. Use version `2024-10-01-preview` to access the Realtime API.
34+
Support for the Realtime API was first added in API version `2024-10-01-preview` (retired). Use version `2025-04-01-preview` to access the latest Realtime API features.
3635

3736
::: zone pivot="ai-foundry-portal"
3837

articles/ai-services/openai/toc.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,14 @@ items:
112112
href: ./how-to/assistants-logic-apps.md
113113
- name: File search
114114
href: ./how-to/file-search.md
115+
- name: Audio
116+
items:
117+
- name: Realtime API for speech and audio (preview)
118+
href: ./how-to/realtime-audio.md
119+
- name: Realtime API via WebRTC (preview)
120+
href: ./how-to/realtime-audio-webrtc.md
121+
- name: Realtime API via WebSockets (preview)
122+
href: ./how-to/realtime-audio-websockets.md
115123
- name: Batch
116124
href: ./how-to/batch.md
117125
- name: Responses & chat completions
@@ -192,15 +200,6 @@ items:
192200
- name: Troubleshooting guidance
193201
href: ./how-to/fine-tuning-troubleshoot.md
194202
displayName: finetuning, fine-tuning
195-
196-
- name: Realtime API for speech and audio (preview)
197-
items:
198-
- name: Realtime API overview
199-
href: ./how-to/realtime-audio.md
200-
- name: Realtime API via WebRTC
201-
href: ./how-to/realtime-audio-webrtc.md
202-
- name: Realtime API via WebSockets
203-
href: ./how-to/realtime-audio-websockets.md
204203
- name: Stored completions
205204
href: ./how-to/stored-completions.md
206205
- name: Use your data

0 commit comments

Comments
 (0)