Analyze Image

POST https://apiv2.indico.io/apis/multiapi/[batch]
Make calls to many APIs in parallel.

Private cloud endpoint

POST https://[cloud].indico.domains/apis/multiapi/[batch]/

Arguments

data – image or list of images – required – images to be analyzed
apis – list – required – the list of APIs to run in parallel

Output

A dictionary where each key maps to the specified models’ results. If used on a single input (not recommemnded as using multiple APIs quickly uses up your allotted calls!) you’ll get the default response, otherwise a list of the default.

# single image output
{
    'image_features': [
        0.0, 
        1.84086012840271, 
        ...
    ],
    'fer': {
        'happy': 0.00004324968926091062,
        'sad': 0.007702528578033991,
        'angry': 0.0002575132225946431,
        'fear': 0.2071775132225946431,
        'surprise': 0.008160047807935744,
        'neutral': 0.00015069427192724994
    }
}

# batch output
{
    'image_features': [
        [0.0, 1.84086012840271, ...],
        [0.0, 1.84086012840271, ...]
    ]
    'fer': [
        {
            'happy': 0.00004324968926091062,
            'sad': 0.007702528578033991,
            'angry': 0.0002575132225946431,
            'fear': 0.2071775132225946431,
            'surprise': 0.008160047807935744,
            'neutral': 0.00015069427192724994
        }, 
        {
            'happy': 0.00004324968926091062,
            'sad': 0.007702528578033991,
            'angry': 0.0002575132225946431,
            'fear': 0.2071775132225946431,
            'surprise': 0.008160047807935744,
            'neutral': 0.00015069427192724994
        }
    ]
}

Example

// Single Example
fetch('https://apiv2.indico.io/apis/multiapi?apis=image_features,fer', {
  method: 'POST',
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY',
    data: '<IMAGE>'
  })
})
  .then(r => r.json())
  .then(response => {
    console.log(response);
  })
  .catch(err => console.log(err));

// Batch Example
fetch('https://apiv2.indico.io/apis/multiapi/batch?apis=image_features,fer', {
  method: 'POST',
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY',
    data: [
      '<IMAGE>',
      '<IMAGE>'
    ]
  })
})
  .then(r => r.json())
  .then(response => {
    console.log(response);
  })
  .catch(err => console.log(err));