ValentineChoco

FREEMIUM
By boomin614
Updated 3 months ago
Machine Learning
-/10
Popularity Score
-
Latency
-
Success Rate

ValentineChoco API Documentation

バレンタインにもらったチョコの画像から、そのチョコが本命なのか義理なのかを判定します。

View API Details
POSTsend image to judge
POSTsend image to judge

You can judge whether presented chocolate is a favorite or a moral obligation.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
imageSTRING
REQUIREDThe Image Data which is resized to 48x48 pixels should be encoded to base64URL string, such as "base64,iVBORw0KGg......".
nameSTRING
REQUIREDName of image file
Code Snippet
unirest.post("https://valentinechoco.p.rapidapi.com/img")
.header("X-RapidAPI-Host", "valentinechoco.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("image=<required>")
.send("name=<required>")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://valentinechoco.p.rapidapi.com/img
Request Method: POST
Response Headers
Response Body

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://valentinechoco.p.rapidapi.com/img")
.header("X-RapidAPI-Host", "valentinechoco.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("image=<required>")
.send("name=<required>")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication