Oops!
Something went wrong. Please try again later.
Success!
We have sent you an email verification. Please confirm your email before you can login.
OCR
By: Qymera
Our OCR APIs help translate your images and scanned documents by converting it to plain text. It supports English, Japanese, and Filipino languages.
Overview
- Convert scanned images into text.
- Data is available in JSON, XML, or HTML format
Using the API
We built the API documentation to be as self-documenting as possible, but if you find yourself overwhelmed, we organized this site into four major areas.
- Getting started introduces you to the operations offered by the API.
- API calls gives you a hands-on experience of those operations with an interactive console.
- Field reference lists and describes the type of information provided by the API.
- Frequently Asked Questions (FAQ) Here are answers to some frequently asked questions.
- Contact Us If you need support or need to get in touch, this is the place to look.
Getting Started
The current version of the API lives at https://gateway.qymera.tech/qymera/sb/ocr/v1/.
-
https://gateway.qymera.tech/qymera/sb/ocr/v1/text?url=C:\Users\Local\Desktop\lorem-ipsum.png
-
https://gateway.qymera.tech/qymera/sb/ocr/v1/text?url=https://i.imgur.com/KoNJpm8.png
Endpoints
Endpoint | What it does |
---|---|
/text |
Extracts the text from the image. |
API Calls
Headers
Key | Value Description |
---|---|
accept |
application/json |
x-ibm-client-id |
Use the given application credential id |
x-ibm-client-secret |
Use the given application credential secret |
/text
Implementation Notes
Calling this endpoint for the first time will have a considerable delay especially when changing to a language other than English.
For url parameter, the value should be something that is similar to an image. This "image" depends on whether it is being run from the browser or through NodeJS.
On a browser, an image can be:
- an
img
,video
, orcanvas
element - a
File
object (from a file<input>
) - a
Blob
object - a path or URL to an accessible image
- a base64 encoded image fits
data:image\/([a-zA-Z]*);base64,([^"]*)
regexp
In Node.js, an image can be
- a path to a local image
- a Buffer storing binary image
- a base64 encoded image fits
data:image\/([a-zA-Z]*);base64,([^"]*)
regexp
Parameter lang currently accepts language codes eng
, fil
, and jpn
.
Parameters:
Parameter | Data Type | Necessity | Location | Description |
---|---|---|---|---|
url |
string | required | query | A URL link or path to a local image e.g.(url=C:\Users\Local\Desktop\lorem-ipsum.png, url=https://i.imgur.com/KoNJpm8.png) |
lang |
string | not required | query | Language code. The language to be recognized and extracted. e.g.(lang=eng, lang=jpn, lang=fil) Default: lang=eng |
Sample Request:
curl --request GET \text
--url 'https://gateway.qymera.tech/qymera/sb/ocr/v1/text?url=C:\Users\Local\Picture\lorem-ipsum.png&lang=eng'
--header 'accept: application/json' \
--header 'x-ibm-client-id: REPLACE_THIS_VALUE' \
--header 'x-ibm-client-secret: REPLACE_THIS_VALUE'
Request
GET
https://gateway.qymera.tech/qymera/sb/ocr/v1/text?url=https://i.imgur.com/KoNJpm8.png
Response:
200
{
"message":"Success.",
"data":"\"Lorem ipsum dolor sit amet, consectetur\nadipiscing elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua.\nUt enim ad minim veniam, quis nostrud\nexercitation ullamco laboris nisi ut aliquip ex\nea commodo consequat. Duis aute irure dolor\nin reprehenderit in voluptate velit esse cillum\ndolore eu fugiat nulla pariatur. Excepteur sint\noccaecat cupidatat non proident, sunt in\nculpa qui officia deserunt mollit anim id est\nlaborum.\"” 1234 567 8901\n"
}
500
{
"code": -21,
"message": "Something went wrong to ocr service."
}
400
{
"code": -22,
"message": "Missing image file/link/url query parameter."
}