Products

SIGN UPLOG IN

Models / Money & Cash Detection

Money & Cash Detection

Overview

The Money & cash detection model helps you determine if an image or video contains money in the form of banknotes (paper money). This includes all sorts of situations such as a person holding money, money displayed in pack, money displayed on furniture, in a wallet, etc.

The model supports banknotes and currencies from countries worldwide, including US dollars, Euros, UK pounds, Japanese Yen...

Use the model

If you haven't already, create an account to get your own API keys.

Detect Money

Let's say you want to moderate the following image:

You can either upload a public URL to the image, or upload the raw binary image. Here's how to proceed if you choose to share the image's public URL:


curl -X GET -G 'https://api.sightengine.com/1.0/check.json' \
    -d 'models=money' \
    -d 'api_user={api_user}&api_secret={api_secret}' \
    --data-urlencode 'url=https://sightengine.com/assets/img/doc/money/cash.jpg'


# this example uses requests
import requests
import json

params = {
  'url': 'https://sightengine.com/assets/img/doc/money/cash.jpg',
  'models': 'money',
  'api_user': '{api_user}',
  'api_secret': '{api_secret}'
}
r = requests.get('https://api.sightengine.com/1.0/check.json', params=params)

output = json.loads(r.text)


$params = array(
  'url' =>  'https://sightengine.com/assets/img/doc/money/cash.jpg',
  'models' => 'money',
  'api_user' => '{api_user}',
  'api_secret' => '{api_secret}',
);

// this example uses cURL
$ch = curl_init('https://api.sightengine.com/1.0/check.json?'.http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

$output = json_decode($response, true);


// this example uses axios
const axios = require('axios');

axios.get('https://api.sightengine.com/1.0/check.json', {
  params: {
    'url': 'https://sightengine.com/assets/img/doc/money/cash.jpg',
    'models': 'money',
    'api_user': '{api_user}',
    'api_secret': '{api_secret}',
  }
})
.then(function (response) {
  // on success: handle response
  console.log(response.data);
})
.catch(function (error) {
  // handle error
  if (error.response) console.log(error.response.data);
  else console.log(error.message);
});

The API will then return a JSON response such as this:

                    
                    
{
    "status": "success",
    "request": {
        "id": "req_1OjggusalNb2S7MxwLq2h",
        "timestamp": 1509132120.6988,
        "operations": 1
    },
    "money": {
        "prob": 0.98
    },
    "media": {
        "id": "med_1OjgEqvJtOhqP7sfNe3ga",
        "uri": "https://sightengine.com/assets/img/doc/money/cash.jpg"
    }
}
                    
                

Any other needs?

See our full list of Image/Video models for details on other filters and checks you can run on your images and videos. You might also want to check our Text models to moderate text-based content: messages, reviews, comments, usernames...

Was this page helpful?