Content Classifiers - Classify Binary
Classify content with optional splitting.
POST {endpoint}/contentunderstanding/classifiers/{classifierId}:classify?_overload=classifyBinary&api-version=2025-05-01-preview
POST {endpoint}/contentunderstanding/classifiers/{classifierId}:classify?_overload=classifyBinary&api-version=2025-05-01-preview&stringEncoding={stringEncoding}&processingLocation={processingLocation}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
classifier
|
path | True |
string pattern: ^[a-zA-Z0-9._-]{1,64}$ |
The unique identifier of the classifier. |
endpoint
|
path | True |
string (uri) |
Content Understanding service endpoint. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
processing
|
query |
The location where the data may be processed. |
||
string
|
query |
The encoding format for content spans in the response. |
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 classify. |
Responses
Name | Type | Description |
---|---|---|
202 Accepted |
The request has been accepted for processing, but processing has not yet completed. Headers
|
|
Other Status Codes |
An unexpected error response. Headers x-ms-error-code: string |
Security
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
OAuth2Auth
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
Classify File
Sample request
POST {endpoint}/contentunderstanding/classifiers/myClassifier:classify?_overload=classifyBinary&api-version=2025-05-01-preview
"RXhhbXBsZSBGaWxl"
Sample response
Operation-Location: https://myendpoint.cognitiveservices.azure.com/contentunderstanding/classifierResults/3b31320d-8bab-4f88-b19c-2322a7f11034?api-version=2025-05-01-preview
{
"id": "3b31320d-8bab-4f88-b19c-2322a7f11034",
"status": "NotStarted"
}
Definitions
Name | Description |
---|---|
Azure. |
The error object. |
Azure. |
A response containing error details. |
Azure. |
An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors. |
Processing |
The location where the data may be processed. |
String |
The string encoding used for content spans. |
Azure.Core.Foundations.Error
The error object.
Name | Type | Description |
---|---|---|
code |
string |
One of a server-defined set of error codes. |
details |
An array of details about specific errors that led to this reported error. |
|
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 |
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 |
Inner error. |
ProcessingLocation
The location where the data may be processed.
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. |
StringEncoding
The string encoding used for content spans.
Value | Description |
---|---|
codePoint |
Unicode code point (UTF-32) encoding, used by languages such as Python, etc. |
utf16 |
UTF-16 encoding, used by languages such as C#, JavaScript, Java, etc. |
utf8 |
UTF-8 encoding, used by languages such as Go, Rust, Ruby, PHP, etc. |