Image-to-Text (OCR)
Image-to-text models translate images into written output. The most common uses are image captioning and OCR, which describe scenes and extract text, respectively.
Endpoint for requesting image2text (OCR) inference
Image file to extract text from
The OCR model to use for text extraction
Nanonets_Ocr_S_F16
Language code for OCR processing (optional)
en
Output format for extracted text
text
Possible values: ID of the inference request.
Unauthorized user.
Unauthorized user.
POST /api/v1/client/img2txt HTTP/1.1
Host: api.deapi.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/json
Content-Type: multipart/form-data
Content-Length: 79
{
"image": "binary",
"model": "Nanonets_Ocr_S_F16",
"language": "en",
"format": "text"
}
{
"data": {
"request_id": 1
}
}
Endpoint for calculating price for image2text (OCR) inference
Image file to extract text from
The OCR model to use for text extraction. Available models can be retrieved via the GET /api/v1/client/models endpoint.
Nanonets_Ocr_S_F16
Language code for OCR processing (optional)
en
Output format for extracted text
text
Possible values: Calculated price for img2txt inference.
Unauthorized user.
Unauthorized user.
POST /api/v1/client/img2txt/price-calculation HTTP/1.1
Host: api.deapi.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/json
Content-Type: application/json
Content-Length: 79
{
"image": "binary",
"model": "Nanonets_Ocr_S_F16",
"language": "en",
"format": "text"
}
{
"data": {
"price": 0.15
}
}
Last updated