Read In Stream - Read In Stream
Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results.
POST {Endpoint}/vision/v3.1/read/analyze
POST {Endpoint}/vision/v3.1/read/analyze?overload=stream&language={language}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
Endpoint
|
path | True |
string |
Supported Cognitive Services endpoints. |
language
|
query |
The BCP-47 language code of the text in the document. Currently, only English ('en'), Dutch (‘nl’), French (‘fr’), German (‘de’), Italian (‘it’), Portuguese (‘pt), and Spanish ('es') are supported. Read supports auto language identification and multi-language documents, so only provide a language code if you would like to force the documented to be processed as that specific language. |
Request Header
Media Types: "application/octet-stream"
Name | Required | Type | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Request Body
Media Types: "application/octet-stream"
Name | Type | Description |
---|---|---|
Image |
object |
An image stream. |
Responses
Name | Type | Description |
---|---|---|
202 Accepted |
The service has accepted the request and will start processing later. Headers Operation-Location: string |
|
Other Status Codes |
Error response. |
Security
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
Examples
Successful Analyze request
Sample request
POST {Endpoint}/vision/v3.1/read/analyze?overload=stream&language=en
"{binary}"
Sample response
Definitions
Name | Description |
---|---|
Computer |
Details about the API request error. |
Computer |
The error code. |
Ocr |
The BCP-47 language code of the text in the document. Currently, only English ('en'), Dutch (‘nl’), French (‘fr’), German (‘de’), Italian (‘it’), Portuguese (‘pt), and Spanish ('es') are supported. Read supports auto language identification and multi-language documents, so only provide a language code if you would like to force the documented to be processed as that specific language. |
ComputerVisionError
Details about the API request error.
Name | Type | Description |
---|---|---|
code |
The error code. |
|
message |
string |
A message explaining the error reported by the service. |
requestId |
string |
A unique request identifier. |
ComputerVisionErrorCodes
The error code.
Name | Type | Description |
---|---|---|
BadArgument |
string |
|
CancelledRequest |
string |
|
DetectFaceError |
string |
|
FailedToProcess |
string |
|
InternalServerError |
string |
|
InvalidDetails |
string |
|
InvalidImageFormat |
string |
|
InvalidImageSize |
string |
|
InvalidImageUrl |
string |
|
InvalidModel |
string |
|
InvalidThumbnailSize |
string |
|
NotSupportedFeature |
string |
|
NotSupportedImage |
string |
|
NotSupportedLanguage |
string |
|
NotSupportedVisualFeature |
string |
|
StorageException |
string |
|
Timeout |
string |
|
Unspecified |
string |
|
UnsupportedMediaType |
string |
OcrDetectionLanguage
The BCP-47 language code of the text in the document. Currently, only English ('en'), Dutch (‘nl’), French (‘fr’), German (‘de’), Italian (‘it’), Portuguese (‘pt), and Spanish ('es') are supported. Read supports auto language identification and multi-language documents, so only provide a language code if you would like to force the documented to be processed as that specific language.
Name | Type | Description |
---|---|---|
de |
string |
|
en |
string |
|
es |
string |
|
fr |
string |
|
it |
string |
|
nl |
string |
|
pt |
string |