Skip to content

Commit c961a92

Browse files
committed
update
1 parent 34862c5 commit c961a92

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

articles/ai-services/openai/how-to/batch.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@ Refer to the [models page](../concepts/models.md) for the most up-to-date inform
7777
| | API Version |
7878
|---|---|
7979
|**Latest GA API release:**| `2024-10-21`|
80-
|**Latest Preview API release:**| `2025-01-01-preview`|
80+
|**Latest Preview API release:**| `2025-03-01-preview`|
8181

82-
Support first added in: `2024-07-01-preview`
82+
> [!NOTE]
83+
> While Global Batch supports older API versions, some models require newer preview API versions. For example, `o3-mini` is not supported with `2024-10-21` since it was released after this date. To access the newer models with global batch use the latest preview API version.
8384
8485
### Feature support
8586

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ token_provider = get_bearer_token_provider(
9595
client = AzureOpenAI(
9696
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"),
9797
azure_ad_token_provider=token_provider,
98-
api_version="2024-10-21"
98+
api_version="2025-03-01-preview"
9999
)
100100

101101
# Upload a file with a purpose of "batch"
@@ -118,7 +118,7 @@ from openai import AzureOpenAI
118118

119119
client = AzureOpenAI(
120120
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
121-
api_version="2024-10-21",
121+
api_version="2025-03-01-preview",
122122
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
123123
)
124124

@@ -441,7 +441,7 @@ token_credential = DefaultAzureCredential()
441441
token = token_credential.get_token('https://cognitiveservices.azure.com/.default')
442442

443443
endpoint = "https://{YOUR_RESOURCE_NAME}.openai.azure.com/"
444-
api_version = "2024-10-01-preview"
444+
api_version = "2025-03-01-preview"
445445
url = f"{endpoint}openai/batches"
446446
order = "created_at asc"
447447
time_filter = lambda: generate_time_filter("past 8 hours")
@@ -502,7 +502,7 @@ from datetime import datetime, timedelta
502502

503503
api_key = os.getenv("AZURE_OPENAI_API_KEY"),
504504
endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
505-
api_version = "2024-10-01-preview"
505+
api_version = "2025-03-01-preview"
506506
url = f"{endpoint}openai/batches"
507507
order = "created_at asc"
508508

articles/ai-services/openai/includes/batch/batch-rest.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Once your input file is prepared, you first need to upload the file to then be a
7474
[!INCLUDE [Azure key vault](~/reusable-content/ce-skilling/azure/includes/ai-services/security/azure-key-vault.md)]
7575

7676
```http
77-
curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/files?api-version=2024-10-21 \
77+
curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/files?api-version=2025-03-01-preview \
7878
-H "Content-Type: multipart/form-data" \
7979
-H "api-key: $AZURE_OPENAI_API_KEY" \
8080
-F "purpose=batch" \
@@ -104,7 +104,7 @@ The above code assumes a particular file path for your test.jsonl file. Adjust t
104104
Depending on the size of your upload file it might take some time before it's fully uploaded and processed. To check on your file upload status run:
105105

106106
```http
107-
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/files/{file-id}?api-version=2024-10-21 \
107+
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/files/{file-id}?api-version=2025-03-01-preview \
108108
-H "api-key: $AZURE_OPENAI_API_KEY"
109109
```
110110

@@ -128,7 +128,7 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/files/{file-id}?api-vers
128128
Once your file has uploaded successfully you can submit the file for batch processing.
129129

130130
```http
131-
curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/batches?api-version=2024-10-21 \
131+
curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/batches?api-version=2025-03-01-preview \
132132
-H "api-key: $AZURE_OPENAI_API_KEY" \
133133
-H "Content-Type: application/json" \
134134
-d '{
@@ -177,7 +177,7 @@ curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/batches?api-vers
177177
Once you have created batch job successfully you can monitor its progress either in the Studio or programatically. When checking batch job progress we recommend waiting at least 60 seconds in between each status call.
178178

179179
```http
180-
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/batches/{batch_id}?api-version=2024-10-21 \
180+
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/batches/{batch_id}?api-version=2025-03-01-preview \
181181
-H "api-key: $AZURE_OPENAI_API_KEY"
182182
```
183183

@@ -229,7 +229,7 @@ The following status values are possible:
229229
## Retrieve batch job output file
230230

231231
```http
232-
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/files/{output_file_id}/content?api-version=2024-10-21 \
232+
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/files/{output_file_id}/content?api-version=2025-03-01-preview \
233233
-H "api-key: $AZURE_OPENAI_API_KEY" > batch_output.jsonl
234234
```
235235

@@ -240,7 +240,7 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/files/{output_file_id}/c
240240
Cancels an in-progress batch. The batch will be in status `cancelling` for up to 10 minutes, before changing to `cancelled`, where it will have partial results (if any) available in the output file.
241241

242242
```http
243-
curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/batches/{batch_id}/cancel?api-version=2024-10-21 \
243+
curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/batches/{batch_id}/cancel?api-version=2025-03-01-preview \
244244
-H "api-key: $AZURE_OPENAI_API_KEY"
245245
```
246246

@@ -249,7 +249,7 @@ curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/batches/{batch_i
249249
List existing batch jobs for a given Azure OpenAI resource.
250250

251251
```http
252-
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/batches?api-version=2024-10-21 \
252+
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/batches?api-version=2025-03-01-preview \
253253
-H "api-key: $AZURE_OPENAI_API_KEY"
254254
```
255255

@@ -262,7 +262,7 @@ The list API call is paginated. The response contains a boolean `has_more` to in
262262
Use the REST API to list all batch jobs with additional sorting/filtering options.
263263

264264
```http
265-
curl "YOUR_RESOURCE_NAME.openai.azure.com/batches?api-version=2024-10-01-preview&$filter=created_at%20gt%201728773533%20and%20created_at%20lt%201729032733%20and%20status%20eq%20'Completed'&$orderby=created_at%20asc" \
265+
curl "YOUR_RESOURCE_NAME.openai.azure.com/batches?api-version=2025-03-01-preview&$filter=created_at%20gt%201728773533%20and%20created_at%20lt%201729032733%20and%20status%20eq%20'Completed'&$orderby=created_at%20asc" \
266266
-H "api-key: $AZURE_OPENAI_API_KEY"
267267
```
268268

0 commit comments

Comments
 (0)