Skip to content

Commit 79e8a13

Browse files
committed
Updated API
1 parent 9ba42b8 commit 79e8a13

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

learn-pr/wwl-data-ai/analyze-content-ai-api/includes/03-create-analyzer.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Analyzers are based on schemas that define the fields you want to extract or gen
77
```json
88
{
99
"description": "Simple business card",
10-
"scenario": "document",
10+
"baseAnalyzerId": "prebuilt-documentAnalyzer",
1111
"config": {
1212
"returnDetails": true
1313
},
@@ -28,7 +28,7 @@ Analyzers are based on schemas that define the fields you want to extract or gen
2828
}
2929
```
3030

31-
This example schema for a *document* analysis scenario describes two fields that you would expect to find on a business card: *ContactName* and *EmailAddress*. Both fields are defined as string data types, and are expected to be *extracted* from a document (in other words, the string values are expected to exist in the document so they can be "read"; rather than being fields that can be *generated* by inferring information about the document).
31+
This example of a custom analyzer schema is based on the pre-built *document* analyzer, and describes two fields that you would expect to find on a business card: *ContactName* and *EmailAddress*. Both fields are defined as string data types, and are expected to be *extracted* from a document (in other words, the string values are expected to exist in the document so they can be "read"; rather than being fields that can be *generated* by inferring information about the document).
3232

3333
> [!NOTE]
3434
> This example is deliberately simple, with the minimal information needed to create a working analyzer. In reality, the schema would likely include more fields of different types, and the analyzer definition would include more configuration settings. The JSON might even include a sample document. See the [Azure AI Content Understanding REST API documentation](/rest/api/contentunderstanding/content-analyzers/create-or-replace) for more details.
@@ -56,7 +56,7 @@ headers = {
5656
"Ocp-Apim-Subscription-Key": "<YOUR_API_KEY>",
5757
"Content-Type": "application/json"}
5858

59-
url = f"{<YOUR_ENDPOINT>}/contentunderstanding/analyzers/{analyzer_name}?api-version=2024-12-01-preview"
59+
url = f"{<YOUR_ENDPOINT>}/contentunderstanding/analyzers/{analyzer_name}?api-version=2025-05-01-preview"
6060

6161
response = requests.put(url, headers=headers, data=json.dumps(schema_json))
6262

learn-pr/wwl-data-ai/analyze-content-ai-api/includes/04-analyze.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ headers = {
2323
"Ocp-Apim-Subscription-Key": "<YOUR_API_KEY>",
2424
"Content-Type": "application/octet-stream"}
2525

26-
url = f"{<YOUR_ENDPOINT>}/contentunderstanding/analyzers/{analyzer_name}:analyze?api-version=2024-12-01-preview"
26+
url = f"{<YOUR_ENDPOINT>}/contentunderstanding/analyzers/{analyzer_name}:analyze?api-version=2025-05-01-preview"
2727

2828
response = requests.post(url, headers=headers, data=image_data)
2929

@@ -32,7 +32,7 @@ response_json = response.json()
3232
id_value = response_json.get("id")
3333

3434
# Use a GET request to check the status of the analysis operation
35-
result_url = f"{<YOUR_ENDPOINT>}/contentunderstanding/analyzers/{analyzer_name}/results/{id_value}?api-version=2024-12-01-preview"
35+
result_url = f"{<YOUR_ENDPOINT>}/contentunderstanding/analyzerResults/{id_value}?api-version=2025-05-01-preview"
3636

3737
result_response = requests.get(result_url, headers=headers)
3838

@@ -70,7 +70,7 @@ Here's the complete JSON response for the business card analysis:
7070
"status": "Succeeded",
7171
"result": {
7272
"analyzerId": "biz_card_analyser_2",
73-
"apiVersion": "2024-12-01-preview",
73+
"apiVersion": "2025-05-01-preview",
7474
"createdAt": "2025-05-16T03:51:46Z",
7575
"warnings": [],
7676
"contents": [

0 commit comments

Comments
 (0)