cURL
curl --request GET \
--url https://api.contentmod.io/image/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contentmod.io/image/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.contentmod.io/image/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.contentmod.io/image/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.contentmod.io/image/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.contentmod.io/image/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contentmod.io/image/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"summary": {
"totalFlags": 1,
"contentRating": "G",
"language": "en"
},
"isSafe": true,
"confidence": 90,
"description": "This is a description",
"riskScores": {
"overall": 90,
"spam": 90,
"toxicity": 90
},
"topics": [
"politics",
"sports"
],
"nsfwCategories": [
{
"category": "sexual",
"severity": 90
}
],
"suggestedActions": {
"reject": true,
"review": true
},
"hash": "93a08bd10cd367bf83f12ba6590fcaef2f8deec8a47ce4ce88a15c7dda325ffa",
"meta": "This is the metadata"
}Image Moderation
Get Image Mod
GET
/
image
/
{id}
cURL
curl --request GET \
--url https://api.contentmod.io/image/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contentmod.io/image/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.contentmod.io/image/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.contentmod.io/image/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.contentmod.io/image/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.contentmod.io/image/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contentmod.io/image/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"summary": {
"totalFlags": 1,
"contentRating": "G",
"language": "en"
},
"isSafe": true,
"confidence": 90,
"description": "This is a description",
"riskScores": {
"overall": 90,
"spam": 90,
"toxicity": 90
},
"topics": [
"politics",
"sports"
],
"nsfwCategories": [
{
"category": "sexual",
"severity": 90
}
],
"suggestedActions": {
"reject": true,
"review": true
},
"hash": "93a08bd10cd367bf83f12ba6590fcaef2f8deec8a47ce4ce88a15c7dda325ffa",
"meta": "This is the metadata"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Minimum string length:
3Example:
"27fbdc0b-b295-46ce-93f5-81b2fc08a381"
Response
200 - application/json
Fetch a image moderation by its ID
Show child attributes
Show child attributes
Whether the image is considered safe
Example:
true
Confidence of the safety of the image from 1-100
Example:
90
A short description of what the image depicts
Example:
"This is a description"
Show child attributes
Show child attributes
General topics the image depicts, lowercase and no punctuation
Example:
["politics", "sports"]
Show child attributes
Show child attributes
Example:
[{ "category": "sexual", "severity": 90 }]
Show child attributes
Show child attributes
SHA-256 hash of the image
Example:
"93a08bd10cd367bf83f12ba6590fcaef2f8deec8a47ce4ce88a15c7dda325ffa"
The metadata of the request
Example:
"This is the metadata"