Ocr
API Endpoint POST : https://aihub.dev/api/v1/ocr
AIHub's OCR API enables seamless text extraction from images and scanned documents, converting printed or handwritten text into machine-readable format. Ideal for automating data entry, document digitization, and AI-driven text analysis, our OCR API ensures high accuracy and efficiency for various business applications.
# Here is a curl example
curl --location --globoff \
'https://aihub.dev/api/v1/ocr' \
--header 'Accept: application/json' \
--header 'api-key: your-api-key' \
--form 'file=@"/path/to/file"' \
--form 'model="whisper-large-v3-turbo"' \
--form 'language="eng"'
Result fields:
{
"status": "string",
"data": {
"model": "string",
"text": "string",
"cost": "integer"
}
}
PARAMETERS
Field | Type | Required | Description |
---|---|---|---|
model | string | Yes | |
file | file | Yes | |
language | string | No |
Errors
The AiHub API uses the following error codes:
Error Code | Meaning |
---|---|
200 | The request is OK. |
400 | Bad Request. |
401 | Payment Required. |