document-understanding
latest
false
Document Understanding API ガイド
- 基本情報
- Document Understanding™ Cloud API v1 の使用例
- ライセンス
- トラブルシューティング
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。
新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。
Document Understanding で生成 AI 分類器を使用するための API の例。プロジェクト ID を使用した curl 要求のサンプルを含む。
生成分類器を使用してドキュメントの分類を開始する
ヒント:
プロジェクト ID は、プロジェクトの情報の取得呼び出しから受け取った応答から取得します。
curl -X 'POST' \
'{AutomationCloudURL}/<Organization_Name>/<Tenant_Name>/du_/api/framework/projects/<Project_ID>/classifiers/generative_classifier/classification?api-version=1' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"documentId": "fa83da2a-1498-ee11-8925-000d3a67a01e",
"prompts": [
{
"name": "Invoice",
"description": "A detailed statement of goods or services provided, with individual prices, the total charge, and payment terms."
},
{
"name": "Receipt",
"description": "A written acknowledgment of having received a specified amount of money, goods, or services."
}
]
}'
curl -X 'POST' \
'{AutomationCloudURL}/<Organization_Name>/<Tenant_Name>/du_/api/framework/projects/<Project_ID>/classifiers/generative_classifier/classification?api-version=1' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"documentId": "fa83da2a-1498-ee11-8925-000d3a67a01e",
"prompts": [
{
"name": "Invoice",
"description": "A detailed statement of goods or services provided, with individual prices, the total charge, and payment terms."
},
{
"name": "Receipt",
"description": "A written acknowledgment of having received a specified amount of money, goods, or services."
}
]
}'
生成分類器を使用してたドキュメントの分類の応答
{
"classificationResults": [
{
"DocumentTypeId": "Invoice",
"DocumentId": "fa83da2a-1498-ee11-8925-000d3a67a01e",
"Confidence": 0.9,
"OcrConfidence": -1,
"Reference": {
"TextStartIndex": 0,
"TextLength": 0,
"Tokens": []
},
"DocumentBounds": {
"StartPage": 0,
"PageCount": 1,
"TextStartIndex": 0,
"TextLength": 864
},
"ClassifierName": "Generative Classifier"
}
]
}
{
"classificationResults": [
{
"DocumentTypeId": "Invoice",
"DocumentId": "fa83da2a-1498-ee11-8925-000d3a67a01e",
"Confidence": 0.9,
"OcrConfidence": -1,
"Reference": {
"TextStartIndex": 0,
"TextLength": 0,
"Tokens": []
},
"DocumentBounds": {
"StartPage": 0,
"PageCount": 1,
"TextStartIndex": 0,
"TextLength": 864
},
"ClassifierName": "Generative Classifier"
}
]
}