다음을 통해 공유


Document Models - Analyze Document From Stream

문서 모델을 사용하여 문서를 분석합니다.

POST {endpoint}/documentintelligence/documentModels/{modelId}:analyze?api-version=2024-07-31-preview
POST {endpoint}/documentintelligence/documentModels/{modelId}:analyze?api-version=2024-07-31-preview&pages={pages}&locale={locale}&stringIndexType={stringIndexType}&features={features}&queryFields={queryFields}&outputContentFormat={outputContentFormat}&output={output}

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
endpoint
path True

string

uri

문서 인텔리전스 서비스 엔드포인트입니다.

modelId
path True

string

고유한 문서 모델 이름입니다.

regex 패턴: ^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$

api-version
query True

string

이 작업에 사용할 API 버전입니다.

features
query

DocumentAnalysisFeature[]

선택적 분석 기능 목록입니다.

locale
query

string

텍스트 인식 및 문서 분석에 대한 로캘 힌트입니다. 값은 언어 코드(예: "en", "fr") 또는 BCP 47 언어 태그(예: "en-US")만 포함할 수 있습니다.

output
query

AnalyzeOutputOption[]

분석 중에 생성할 추가 출력입니다.

outputContentFormat
query

ContentFormat

분석 결과 최상위 콘텐츠의 형식입니다.

pages
query

string

분석할 1부터 시작하는 페이지 번호 목록입니다. 전. "1-3,5,7-9"

regex 패턴: ^(\d+(-\d+)?)(,\s*(\d+(-\d+)?))*$

queryFields
query

string[]

추출할 추가 필드 목록입니다. 전. "NumberOfGuests,StoreNumber"

stringIndexType
query

StringIndexType

문자열 오프셋 및 길이를 계산하는 데 사용되는 메서드입니다.

요청 본문

Media Types: "application/octet-stream", "application/pdf", "image/jpeg", "image/png", "image/tiff", "image/bmp", "image/heif", "text/html", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.presentationml.presentation"

Name 형식 Description
input

string

입력 콘텐츠입니다.

응답

Name 형식 Description
202 Accepted

처리를 위해 요청이 수락되었지만 처리가 아직 완료되지 않았습니다.

헤더

  • Operation-Location: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

예기치 않은 오류 응답입니다.

보안

Ocp-Apim-Subscription-Key

형식: apiKey
In(다음 안에): header

OAuth2Auth

형식: oauth2
Flow: accessCode
권한 부여 URL: https://login.microsoftonline.com/common/oauth2/authorize
토큰 URL: https://login.microsoftonline.com/common/oauth2/token

범위

Name Description
https://cognitiveservices.azure.com/.default

예제

Analyze Document from Url

샘플 요청

POST https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels/customModel:analyze?api-version=2024-07-31-preview&pages=1-2,4&locale=en-US&stringIndexType=textElements

"{binaryFile}"

샘플 응답

Operation-Location: https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels/customModel/analyzeResults/3b31320d-8bab-4f88-b19c-2322a7f11034?api-version=2024-07-31-preview

정의

Name Description
AnalyzeOutputOption

분석 중에 생성할 추가 출력입니다.

ContentFormat

분석된 결과의 콘텐츠 형식입니다.

DocumentAnalysisFeature

사용하도록 설정할 문서 분석 기능입니다.

Error

오류 개체입니다.

ErrorResponse

오류 응답 개체입니다.

InnerError

오류에 대한 보다 구체적인 정보를 포함하는 개체입니다.

StringIndexType

문자열 오프셋 및 길이를 계산하는 데 사용되는 메서드입니다.

AnalyzeOutputOption

분석 중에 생성할 추가 출력입니다.

Name 형식 Description
figures

string

검색된 그림의 잘린 이미지를 생성합니다.

pdf

string

검색 가능한 PDF 출력을 생성합니다.

ContentFormat

분석된 결과의 콘텐츠 형식입니다.

Name 형식 Description
markdown

string

구역 머리글, 표 등을 사용하여 문서 콘텐츠의 Markdown 표현

text

string

서식이 없는 문서 내용의 일반 텍스트 표현입니다.

DocumentAnalysisFeature

사용하도록 설정할 문서 분석 기능입니다.

Name 형식 Description
barcodes

string

문서에서 바코드 검색을 사용하도록 설정합니다.

formulas

string

문서에서 수학적 식을 검색할 수 있도록 설정합니다.

keyValuePairs

string

문서에서 일반 키 값 쌍(양식 필드)을 검색할 수 있도록 설정합니다.

languages

string

텍스트 콘텐츠 언어의 검색을 사용하도록 설정합니다.

ocrHighResolution

string

고해상도로 OCR을 수행하여 문서를 세밀하게 인쇄할 수 있습니다.

queryFields

string

queryFields 쿼리 매개 변수를 통해 추가 필드 추출을 사용하도록 설정합니다.

styleFont

string

다양한 글꼴 스타일을 인식할 수 있습니다.

Error

오류 개체입니다.

Name 형식 Description
code

string

서버에서 정의한 오류 코드 집합 중 하나입니다.

details

Error[]

이 보고된 오류로 이어진 특정 오류에 대한 세부 정보 배열입니다.

innererror

InnerError

오류에 대한 현재 개체보다 더 구체적인 정보를 포함하는 개체입니다.

message

string

사람이 읽을 수 있는 오류 표현입니다.

target

string

오류의 대상입니다.

ErrorResponse

오류 응답 개체입니다.

Name 형식 Description
error

Error

오류 정보입니다.

InnerError

오류에 대한 보다 구체적인 정보를 포함하는 개체입니다.

Name 형식 Description
code

string

서버에서 정의한 오류 코드 집합 중 하나입니다.

innererror

InnerError

내부 오류입니다.

message

string

사람이 읽을 수 있는 오류 표현입니다.

StringIndexType

문자열 오프셋 및 길이를 계산하는 데 사용되는 메서드입니다.

Name 형식 Description
textElements

string

유니코드 8.0.0에 정의된 사용자 인식 표시 문자 또는 그래프 클러스터입니다.

unicodeCodePoint

string

단일 유니코드 코드 포인트로 표현되는 문자 단위입니다. Python 3에서 사용됩니다.

utf16CodeUnit

string

16비트 유니코드 코드 단위로 표현되는 문자 단위입니다. JavaScript, Java 및 .NET에서 사용됩니다.