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.

// Batch Example
fetch('', {
  method: 'POST',
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY',
    data: [
      'I love writing code',
      'Alexander and the Terrible, Horrible, No Good, Very Bad Day'
  .then(r => r.json())
  .then(response => {
  .catch(err => console.log(err));


// Batch Example Output
{ results: [