The JigLabs API is the interface where you can submit a request to receive the calculated response from a particular model based on your API Key.
API Calls can be made either with JSON payload or by sending multipart/form-data. The response is application/json -type.
To get your API Key, contact us at: info@jiglabs.io
The URL needed for an API call is:
https://api.jiglabs.io:443/classify/image
All API calls are authorized by using Caller ID, denoted in the examples as YOUR_API_KEY. The ID can be delivered in the HTTP header "Authorization" (standard way) or as html-form/JSON paramater "authorization".
Example HTTP header (Note: standard requires 'Bearer' before actual id):
Authorization: Bearer YOUR_API_KEY
Example HTML header:
<input type="text" name="authorization">
Example JSON parameter:
"authorization":"YOUR_API_KEY"
An HTML form can be used to make an API call. It must be delivered as "multipart/form-data" HTTP POST and the character encoding must be UTF-8. If the authorization ID is not delivered as part of the HTTP header, then it can be used with the parameter "authorization".
Click here to try an example implementation of fish species recognition (API Key = "test").The provided API Key. This is not needed if already trasmitted as part of HTTP headers
The returned number of results with their respective scores
The image to be classified. The actual parameter name does not matter as long as an image is found in the multipart form
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta charset="UTF-8">
</head>
<body>
<h2>JigLabs API Example</h2>
<form action="https://api.jiglabs.io:443/classify/image" enctype="multipart/form-data" method="post">
<p>
API-Key:
<br>
<input type="text" name="authorization">
<br>
Number of Results:
<br>
<input type="text" name="results">
</p>
<p>
Image:
<br>
<input type="file" name="datafile">
</p>
<div>
<input type="submit" value="Send">
</div>
</form>
</body>
</html>
A JSON message can be used to make an API call. It must be delivered as HTTP POST with "Content-type: application/json" and the character encoding must be UTF-8.
The provided API Key. This is not needed if already trasmitted as part of HTTP headers
The returned number of results with their respective scores
The image to be classified with Base64 encoding using "The Base64 Alphabet" as specified in Table 1 of RFC 4648 and RFC 2045
{
"authorization":"YOUR_API_KEY",
"results":5,
"image":"/9j/4AAQSkZJRgABAQEA ... JIFI//9k="
}
The API response is delivered in JSON format with the highest probability sorted at the top
The confidence the algorithm calculates for the given classification
The recognized classifcation of the image
[
{
"confidence": "99%",
"classification": "Walleye"
},
{
"confidence": "0%",
"classification": "Sauger"
},
{
"confidence": "0%",
"classification": "Largemouth Bass"
},
{
"confidence": "0%",
"classification": "White Sucker"
},
{
"confidence": "0%",
"classification": "Yellow Perch"
}
]