About this endpoint
What it does
Extracts text from an image fetched from a URL. The request body includes the image url and can optionally specify OCR provider settings; the response returns a JSON object with a data object containing OCR results for azure and/or apyhub.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| url | String | Yes | Image URL to process. Must be a URI. |
| azure | Object | No | Custom credentials for Azure services. Contains optional key, region, endpoint, account_id, and access_token fields. |
| azure.key | String | No | Azure subscription key. |
| azure.region | String | No | Azure service region. |
| azure.endpoint | String | No | Azure endpoint URL. |
| azure.account_id | String | No | Azure account ID. |
| azure.access_token | String | No | OAuth access token for Azure service. |
| language | String | No | BCP-47 language code of the text in the image. |
| requested_service | ENUM | No | Which OCR service to use. Allowed values: azure, apyhub. Default: apyhub. |
Response
Returns a JSON object with a data object field. Inside data, the response may include azure and/or apyhub object fields containing the extracted text elements from the corresponding OCR service.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| data | Object | Yes | OCR result wrapper. Contains azure and apyhub fields. |
| data.azure | Object | No | Text elements extracted via Azure Vision Read API. |
| data.apyhub | Object | No | Text elements extracted via ApyHub OCR. |