Image Analysis

Notice – All publicly available Indico APIs will be deprecated on Jan 1, 2020

Use our models to analyze text in a variety of contexts!

Arguments

data :Filepath or Base64 Encoded Image: required: The API processes strings as a single piece of text and return a single result. You can also send a list of phrases to be processed all in one call(more efficient).
[apiKey] :String: required/optional: Your API key for authenticating your usage. If you haven’t set your API key in another way, this is required.
[privateCloud] :String: optional: If specified, calls will be made to the private cloud address provided. If you haven’t purchased private infrastructure from us then this input is irrelevant.

Input Image Format

Images can be sent to the indicoio image analysis functions as URLs, file paths, base64 encoded images, numpy array objects, or skimage image objects. Sample code for loading in an image using skimage or PIL is provided below. Although images are scaled on our servers, use square crops for optimal performance. Both single and batch image requests of over 15 MB will be rejected.


Specifying Image URL

var indico = require('indico.io')
indico.apiKey = "YOUR_API_KEY";

indico.fer("https://IMAGE_URL")
  .then(function(res) {
    console.log(res);
  }).catch(function(err) {
    console.warn(err);
  });

Sending an image using fs

var indico = require('indico.io');
var fs = require('fs');

indico.apiKey = "YOUR_API_KEY";

var filename = "PATH_TO_YOUR_IMAGE";

fs.readFile(filename, function(err, data) {
  base64data = new Buffer(data).toString('base64');
  indico.fer(base64data)
  .then(function(res) {
    console.log(res);
  }).catch(function(err) {
    console.warn(err);
  });
});