Batch Requests

Each indicoio function can be called with a batch of data for analyzing many examples with a single network request. This can improve the speed of using the indico APIs significantly. Simply pass in a list of inputs and receive a list of results in return. The optimal balance between the size of the batch requests and the amount of network requests varies case by case, but performance is usually optimal between 20-100 examples.

Not using the latest package?
If you’re using an older version of our client libraries the syntax for batch calls is different. Namely, you’ll need to call a separate batch function as shown below.

var indico = require('');

var settings = {"api_key": "YOUR_API_KEY"};
var response = function(res) { console.log(res); }
var logError = function(err) { console.log(err); }

indico.sentiment(['indico is so easy to use!', 'Still really easy, yiss'], settings)

// [0.9782025594088044, 0.9895808115135271]