Nudity Detection

Models / Gambling Detection

Gambling Detection


The Gambling detection model helps you determine if an image or video depicts situations related to gambling or casino games. This includes:

  • images or videos taken on a casino floor
  • roulettes and spin wheels
  • slot machines and pachinko
  • raffles and bingo
  • casino chips, such as when used in games
  • lottery tickets or receipts

This model focuses on situations most likely depict games involving money. This means that the following situations or games will not be flagged:

  • card games, dice, dominos with no money, no chips and not in a casino setting
  • trading cards, sports cards
  • video games
  • other games (chess, board games...)

To detect the presence of money such as banknotes, use the Money Detection model.


The gambling value returned is between 0 and 1, images with a value close to 1 will contain displays of gambling, while images with a value closer to 0 are considered to be safe.

Here are a few examples:

Roulettes and spin wheels

Displays of roulette wheels or roulette tables, such as in casino settings


Casino interiors

Images taken inside casinos, whether in a section devoted to card games, spin wheels or slot machines


Slot machines and pachinko

Gambling machines, poker machines, either stand-alone or in the context of a casino


Casino chips

Money chips used when betting money in card games or casino games


Bingo, lottery & raffles

Evidence of bingo or lottery playing


Use the model

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

Detect Gambling

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 '' \
    -d 'models=gambling' \
    -d 'api_user={api_user}&api_secret={api_secret}' \
    --data-urlencode 'url='

# this example uses requests
import requests
import json

params = {
  'url': '',
  'models': 'gambling',
  'api_user': '{api_user}',
  'api_secret': '{api_secret}'
r = requests.get('', params=params)

output = json.loads(r.text)

$params = array(
  'url' =>  '',
  'models' => 'gambling',
  'api_user' => '{api_user}',
  'api_secret' => '{api_secret}',

// this example uses cURL
$ch = curl_init(''.http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

$output = json_decode($response, true);

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

axios.get('', {
  params: {
    'url': '',
    'models': 'gambling',
    'api_user': '{api_user}',
    'api_secret': '{api_secret}',
.then(function (response) {
  // on success: handle response
.catch(function (error) {
  // handle error
  if (error.response) console.log(;
  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
    "gambling": {
        "prob": 0.97
    "media": {
        "id": "med_1OjgEqvJtOhqP7sfNe3ga",
        "uri": ""

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?