Share via


Content Analyzers - Analyze Binary

Extract content and fields from input.

POST {endpoint}/contentunderstanding/analyzers/{analyzerId}:analyzeBinary?api-version=2025-11-01
POST {endpoint}/contentunderstanding/analyzers/{analyzerId}:analyzeBinary?api-version=2025-11-01&stringEncoding={stringEncoding}&processingLocation={processingLocation}&range={range}

URI Parameters

Name In Required Type Description
analyzerId
path True

string

minLength: 1
maxLength: 64
pattern: ^[a-zA-Z0-9._-]{1,64}$

The unique identifier of the analyzer.

endpoint
path True

string (uri)

Content Understanding service endpoint.

api-version
query True

string

minLength: 1

The API version to use for this operation.

processingLocation
query

ProcessingLocation

The location where the data may be processed. Defaults to global.

range
query

string

Range of the input to analyze (ex. 1-3,5,9-). Document content uses 1-based page numbers, while audio visual content uses integer milliseconds.

stringEncoding
query

string

The string encoding format for content spans in the response. Possible values are 'codePoint', 'utf16', and utf8. Default is codePoint.")

Request Header

Media Types: "*/*"

Name Required Type Description
x-ms-client-request-id

string (uuid)

An opaque, globally-unique, client-generated string identifier for the request.

Request Body

Media Types: "*/*"

Name Type Description
input

string (binary)

The binary content of the document to analyze.

Responses

Name Type Description
202 Accepted

The request has been accepted for processing, but processing has not yet completed.

Headers

  • Operation-Location: string
  • x-ms-client-request-id: string
Other Status Codes

Azure.Core.Foundations.ErrorResponse

An unexpected error response.

Headers

x-ms-error-code: string

Security

Ocp-Apim-Subscription-Key

Key-based authentication using the access key of the Azure resource.

Type: apiKey
In: header

EntraIdToken

Microsoft Entra ID OAuth2 authentication using an access token.

Type: oauth2
Flow: accessCode
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize
Token URL: https://login.microsoftonline.com/common/oauth2/token

Scopes

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

Examples

Analyze File

Sample request

POST {endpoint}/contentunderstanding/analyzers/myAnalyzer:analyzeBinary?api-version=2025-11-01

"RXhhbXBsZSBGaWxl"

Sample response

Operation-Location: https://myendpoint.cognitiveservices.azure.com/contentunderstanding/analyzerResults/3b31320d-8bab-4f88-b19c-2322a7f11034?api-version=2025-11-01
{
  "id": "3b31320d-8bab-4f88-b19c-2322a7f11034",
  "status": "NotStarted"
}

Definitions

Name Description
Azure.Core.Foundations.Error

The error object.

Azure.Core.Foundations.ErrorResponse

A response containing error details.

Azure.Core.Foundations.InnerError

An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.

ProcessingLocation

The location where the data may be processed. Defaults to global.

Azure.Core.Foundations.Error

The error object.

Name Type Description
code

string

One of a server-defined set of error codes.

details

Azure.Core.Foundations.Error[]

An array of details about specific errors that led to this reported error.

innererror

Azure.Core.Foundations.InnerError

An object containing more specific information than the current object about the error.

message

string

A human-readable representation of the error.

target

string

The target of the error.

Azure.Core.Foundations.ErrorResponse

A response containing error details.

Name Type Description
error

Azure.Core.Foundations.Error

The error object.

Azure.Core.Foundations.InnerError

An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.

Name Type Description
code

string

One of a server-defined set of error codes.

innererror

Azure.Core.Foundations.InnerError

Inner error.

ProcessingLocation

The location where the data may be processed. Defaults to global.

Value Description
geography

Data may be processed in the same geography as the resource.

dataZone

Data may be processed in the same data zone as the resource.

global

Data may be processed in any Azure data center globally.