Personality

POST https://apiv2.indico.io/personality
Predicts the personality traits of a text’s author.

Current Version: 1

Private cloud endpoint

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

Arguments

data – String | List – required – text to be analyzed
[v or version] – Integer – optional (defaults to 1) – specify model version

Output

This function returns a dictionary that maps the following personality traits to their likelihood of describing the author: extraversion, openness, agreeableness, conscientiousness. These values are independent, meaning the probabilities don’t effect each other. For example, somebody could score 0.9 (90%) on extraversion and 0.86 (86%) on openness.

# single output
{
    'extraversion': 0.384...,
    'openness': 0.730...,
    'agreeableness': 0.439...,
    'conscientiousness': 0.103...
}

# batch output
[
    {
        'extraversion': 0.384...,
        'openness': 0.730...,
        'agreeableness': 0.439...,
        'conscientiousness': 0.103...
    }, 
    {
        'extraversion': 0.384...,
        'openness': 0.730...,
        'agreeableness': 0.439...,
        'conscientiousness': 0.103...
    }
]

Example

// Single Example
fetch('https://apiv2.indico.io/personality', {
  method: 'POST',
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY',
    data: 'I love my friends'
  })
})
  .then(r => r.json())
  .then(response => {
    console.log(response);
  })
  .catch(err => console.log(err));

// Batch Example
fetch('https://apiv2.indico.io/personality/batch', {
  method: 'POST',
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY',
    data: [
      'I love my friends',
      'Everything is awesome!'
    ]
  })
})
  .then(r => r.json())
  .then(response => {
    console.log(response);
  })
  .catch(err => console.log(err));