ClarifaiPublicModels

FREE
By dimashirokov
Updated a year ago
Visual Recognition
-/10
Popularity Score
-
Latency
-
Success Rate

ClarifaiPublicModels API Overview

Connect to the Clarifai Public Model API to tag image objects with public models (ex. Food, NSFW, Wedding) . Test an API call and export the code into your app. Clarifai has trained visual artificial intelligence models (Food, Travel, NSFW, Wedding, Image Color, Faces, Age/Gender/Ethnicity) to return values based on certain categories of images and videos.

Use cases include NSFW image detection, classifying food items/ingredients, and general visual recognition and tagging.

Clarifai has free and paid plans. See their pricing here: https://developer.clarifai.com/pricing/

Contact API Provider
star-blueRate

ClarifaiPublicModels

ClarifaiPublicModels Package

Identify and tag objects in images with Clarifai's models (Wedding, Image Color, Faces, Age/Gender/Ethnicity))/

  • Domain: clarifai.com
  • Credentials: clientId, clientSecret

How to get credentials:

  1. Signup in clarifai.com
  2. Go to Developer Dashboard
  3. Press Create a New Application button
  4. Copy and save your client_id and and client_secret
  5. Press Generate Access Token button or use getAccessToken method.

ClarifaiPublicModels.analyzeImageGeneral

The General model contains a wide range of tags across many different topics. In most cases, tags returned from the general model will sufficiently recognize what's inside your image.

Field Type Description
clientId credentials This identifies which application is trying to access the API. This is unique and generated once for each application in your account.
clientSecret credentials This provides security when authorizing with the API. This is unique and generated once for each application in your account.
image File Image to analyze

ClarifaiPublicModels.analyzeImageFood

The Food model analyzes images and videos and returns probability scores on the likelihood that the image contains a recognized food ingredient and dish.

Field Type Description
clientId credentials This identifies which application is trying to access the API. This is unique and generated once for each application in your account.
clientSecret credentials This provides security when authorizing with the API. This is unique and generated once for each application in your account.
image File Image to analyze

ClarifaiPublicModels.analyzeImageTravel

The Travel model analyzes images and returns probability scores on the likelihood that the image contains a recognized travel related category.

Field Type Description
clientId credentials This identifies which application is trying to access the API. This is unique and generated once for each application in your account.
clientSecret credentials This provides security when authorizing with the API. This is unique and generated once for each application in your account.
image File Image to analyze

ClarifaiPublicModels.analyzeImageNSFW

The NSFW (Not Safe For Work) model analyzes images and videos and returns probability scores on the likelihood that the image contains pornography.

Field Type Description
clientId credentials This identifies which application is trying to access the API. This is unique and generated once for each application in your account.
clientSecret credentials This provides security when authorizing with the API. This is unique and generated once for each application in your account.
image File Image to analyze

ClarifaiPublicModels.analyzeImageWedding

The Wedding model knows all about weddings including brides, grooms, dresses, flowers, etc.

Field Type Description
clientId credentials This identifies which application is trying to access the API. This is unique and generated once for each application in your account.
clientSecret credentials This provides security when authorizing with the API. This is unique and generated once for each application in your account.
image File Image to analyze

ClarifaiPublicModels.analyzeImageColor

The Color model is used to retrieve the dominant colors present in your images. Color predictions are returned in the hex format. A density value is also returned to let you know how much of the color is present. In addition, colors are also mapped to their closest W3C counterparts.

Field Type Description
clientId credentials This identifies which application is trying to access the API. This is unique and generated once for each application in your account.
clientSecret credentials This provides security when authorizing with the API. This is unique and generated once for each application in your account.
image File Image to analyze

ClarifaiPublicModels.detectFaces

The Face Detection model analyzes images, GIFs and videos and returns probability scores on the likelihood that the media contains human faces. If human faces are detected, the model will also return the coordinate locations of those faces with a bounding box.

Field Type Description
clientId credentials This identifies which application is trying to access the API. This is unique and generated once for each application in your account.
clientSecret credentials This provides security when authorizing with the API. This is unique and generated once for each application in your account.
image File Image to analyze

ClarifaiPublicModels.detectAgeGenderEtnicity

The 'Age, Gender and Ethnicity' model analyzes images and returns bounding box locations of detected human faces. For each of found cropped faces, a prediction as to the person's age (1-100), gender (male, female) and ethnicity (asian, black, indian, latino, middle-eastern, white).

Field Type Description
clientId credentials This identifies which application is trying to access the API. This is unique and generated once for each application in your account.
clientSecret credentials This provides security when authorizing with the API. This is unique and generated once for each application in your account.
image File Image to analyze

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://ClarifaiPublicModelsdimashirokovV1.p.rapidapi.com/analyzeImageColor")
.header("X-RapidAPI-Host", "ClarifaiPublicModelsdimashirokovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication