apyhub
ARTIFICIAL INTELLIGENCE · DATA EXTRACTION

AI Image Optical Character Recognition (OCR)

What it does

Image Text Extraction turns images into text using OCR. Send an image by URL or upload a file, and choose whether to process it with ApyHub OCR or Azure Vision Read API.

Use the /url endpoint when the image already lives at a public URI, or /file when you have a binary upload. Both endpoints accept an optional language field with a BCP-47 code so you can hint at the text language in the image. The URL-based endpoint also supports requested_service and an azure object for custom Azure credentials, while the file upload endpoint exposes the equivalent Azure fields as azure_key, azure_region, azure_endpoint, azure_account_id, and azure_access_token.

The response contains a data object with azure and apyhub sections, depending on which extraction service you request. That makes it straightforward to plug into receipt capture, document digitisation, form reading, or any workflow that needs machine-readable text from screenshots and photos.

Use Image Text Extraction when you need to index image content, prefill forms from scans, or pull text out of uploaded assets without building your own OCR pipeline.

▣ ENDPOINT 01 / 02
POST
Extract text from image (URL input)
https://api.eu.apyverse.com/apyhub/extract-text-from-image/url

QUICKSTART

GUIDE

Quickstart

Extract text from an image URL with the default ApyHub OCR service.

curl -X POST "https://api.eu.apyverse.com/apyhub/extract-text-from-image/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/receipt.png"
  }'

What you'll get back

Returns a JSON object with a data object field. The data object contains the extracted text results from the selected service (azure or apyhub), depending on the requested_service used.

{
  "data": {
    "apyhub": {}
  }
}
TRY ITLIVE · 500 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
azure
Custom credentials for Azure services.
Azure subscription key.
Azure service region.
Azure endpoint URL.
Azure account ID.
OAuth access token for Azure service.
BCP-47 language code of the text in the image.

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

ParameterTypeMandatoryDescription
urlStringYesImage URL to process. Must be a URI.
azureObjectNoCustom credentials for Azure services. Contains optional key, region, endpoint, account_id, and access_token fields.
azure.keyStringNoAzure subscription key.
azure.regionStringNoAzure service region.
azure.endpointStringNoAzure endpoint URL.
azure.account_idStringNoAzure account ID.
azure.access_tokenStringNoOAuth access token for Azure service.
languageStringNoBCP-47 language code of the text in the image.
requested_serviceENUMNoWhich 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.

ParameterTypeMandatoryDescription
dataObjectYesOCR result wrapper. Contains azure and apyhub fields.
data.azureObjectNoText elements extracted via Azure Vision Read API.
data.apyhubObjectNoText elements extracted via ApyHub OCR.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 02
POST
Extract text from image (file upload)
https://api.eu.apyverse.com/apyhub/extract-text-from-image/file

QUICKSTART

GUIDE

Quickstart

Upload an image file to extract text from it.

curl -X POST "https://api.eu.apyverse.com/apyhub/extract-text-from-image/file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/image.jpg"

What you'll get back

Returns a JSON object with a data object. Inside data, the API may include an azure object with text extracted via Azure Vision Read API and/or an apyhub object with text extracted via ApyHub OCR.

{
  "data": {
    "azure": {},
    "apyhub": {}
  }
}
TRY ITLIVE · 500 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
BCP-47 language code of the text in the image.

About this endpoint

What it does

Uploads an image file and extracts text from it. The response is a JSON object with a data object containing azure and apyhub fields for the extracted text results.

Request Body

ParameterTypeMandatoryDescription
fileStringYesImage file to process. Binary upload.
languageStringNoBCP-47 language code of the text in the image.
azure_keyStringNoAzure key to use for Azure-based extraction.
azure_regionStringNoAzure region.
azure_endpointStringNoAzure endpoint URL.
azure_account_idStringNoAzure account identifier.
requested_serviceENUMNoService to use for extraction. Allowed values: azure, apyhub. Default: apyhub.
azure_access_tokenStringNoAzure access token.

Response

Returns a JSON object with a data object. The data object may contain azure and apyhub object fields with the extracted text results.

ParameterTypeMandatoryDescription
dataObjectNoWrapper for the extraction results.
data.azureObjectNoText elements extracted via Azure Vision Read API.
data.apyhubObjectNoText elements extracted via ApyHub OCR.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.