-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDocIntel.http
102 lines (79 loc) · 3.9 KB
/
DocIntel.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
########################################################
# DOCUMENT INTEL (Previously Known as Forms Recognizer #
########################################################
# https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/?view=doc-intel-3.1.0
# Training done via the GUI in the portal here:
# https://documentintelligence.ai.azure.com/studio?source=azureportal
############################################
# Pre-Built Read API Example (Using a PNG) #
############################################
# Sample doc
GET https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/rest-api/read.png
######
# POST Call to start ASYNC analysis
# @name docIntelReadReq
POST {{docIntelEndpoint}}/formrecognizer/documentModels/prebuilt-read:analyze?api-version=2023-07-31
Content-Type: application/json
Ocp-Apim-Subscription-Key: {{docIntelSubscription}}
{
"urlSource": "https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/rest-api/read.png"
}
#######
# GET Call to obtain ASYNC analysis result
GET {{docIntelReadReq.response.headers.Operation-Location}}
Ocp-Apim-Subscription-Key: {{docIntelSubscription}}
########################################################
# Pre-Built General Document API Example (Using a PDF) #
########################################################
# Sample doc (open in browser to view)
https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-layout.pdf
######
# POST Call to start ASYNC analysis
# @name docIntelGeneralDocReq
POST {{docIntelEndpoint}}/formrecognizer/documentModels/prebuilt-document:analyze?api-version=2023-07-31
Content-Type: application/json
Ocp-Apim-Subscription-Key: {{docIntelSubscription}}
{
"urlSource": "https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-layout.pdf"
}
#######
# GET Call to obtain ASYNC analysis result
GET {{docIntelGeneralDocReq.response.headers.Operation-Location}}
Ocp-Apim-Subscription-Key: {{docIntelSubscription}}
##############################################
# Pre-Built ID/DLN API Example (Using a PNG) #
##############################################
# Sample doc
GET https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/rest-api/identity_documents.png
######
# POST Call to start ASYNC analysis
# @name docIntelIdDocReq
POST {{docIntelEndpoint}}/formrecognizer/documentModels/prebuilt-document:analyze?api-version=2023-07-31
Content-Type: application/json
Ocp-Apim-Subscription-Key: {{docIntelSubscription}}
{
"urlSource": "https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/rest-api/identity_documents.png"
}
#######
# GET Call to obtain ASYNC analysis result
GET {{docIntelIdDocReq.response.headers.Operation-Location}}
Ocp-Apim-Subscription-Key: {{docIntelSubscription}}
#############################
# Custom Model API Template #
#############################
# Template only and will require one to train a custom model with the model ID updated appropriately and the test document URL updated appropriately
# https://documentintelligence.ai.azure.com/studio
@modelId = "CustomModelName"
@docUrl = "https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/rest-api/identity_documents.png"
# POST call to start ASYNC analysis
# @name cusomModelReq
POST {{docIntelEndpoint}}/formrecognizer/documentModels/{{modelId}}:analyze?api-version=2023-07-31
Content-Type: application/json
Ocp-Apim-Subscription-Key: {{docIntelSubscription}}
{
"urlSource": "{{docUrl}}"
}
#######
# GET Call to obtain ASYNC analysis result
GET {{cusomModelReq.response.headers.Operation-Location}}
Ocp-Apim-Subscription-Key: {{docIntelSubscription}}