Content Filtering

POST https://apiv2.indico.io/contentfiltering/[batch]
Determines whether or not an image contains mature content.
Available for version 0.8 and later.

Current Version: 2

Private cloud endpoint

POST https://[cloud].indico.domains/contentfiltering/[batch]/

Arguments

data – refer to img format guide – required
[v or version] – Integer – optional (defaults to 2) – specify model version

For an example of how to pass keyword arguments to the indico API in a post request, see the example below.

Output

This function will return a number between 0 and 1. This number is a probability representing the likelihood that the analyzed image has offensive content. Values greater than 0.5 indicate that the image most likely contains offensive content, while values less than 0.5 indicate that the image probably does not contain offensive content.

# single output
0.9782025594088044

# batch output
[
    0.9782025594088044, 
    0.3782025594088044
]

Example

// Single Example
fetch('https://apiv2.indico.io/contentfiltering', {
  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/contentfiltering/batch', {
  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));