Text Extraction
Image Extraction AI
Identifying and extracting text from images using machine learning
Function for extracting text from images. It sends a request to the Image Extraction AI Model and returns the extracted text. Read more about the Models and their use cases at: https://docs.worqhat.com/ai-models/text-extraction/image-extraction
Parameters
Parameter | Type | Description | Default |
---|---|---|---|
image | File or string | The existing image to extract data from. It can be a File object or a URL or base64 encoded image data. This is a required parameter. | |
output_format | string | The output format of the extracted text. Can be text or json . | text |
Initialize AI Modules
const worqhat = require('worqhat');
var config = new worqhat.Configuration({
apiKey: "your-api-key",
debug: true,
max_retries: 3,
});
worqhat.initializeApp(config);
let ai = worqhat.ai();
Implementation
ai.textExtraction.image({
image: "./image.jpeg",
output_format: "text"
}).then((response) => {
console.log(response);
}).catch((error) => {
console.log(error);
});
Was this page helpful?