REST-powered API for analyzing media and text.
- Media analysis
<bind-address>/analysis/{reqType}/{type}/{id} - Text analysis
<bind-address>/analysis/{reqType} - Health check
<bind-address>/healthy
- Complete media analysis:
complete - Media fingerprinting:
fingerprinting - Media NSFW recognition:
nsfw - Gibberish text analysis:
gibberish
The data returned by the server when analyzing media is in the form:
type Analysis struct {
Fingerprint FingerprintResponse
NSFW NSFWResponse
FingerprintErrorString string
NSFWErrorString string
}The data returned by the server when analyzing text is in the form:
type GibberishResponse struct {
IsGibberish bool
}- API bind address and port:
API_BIND_ADDRESS(defaults tolocalhost:9999). - Path to configuration file:
API_CFG_PATH(defaults toconfig.toml).
fingerprintendpoint = "http://localhost:10000/fingerprinting"
nsfwendpoint = "http://localhost:10001/nsfw"
gibberishendpoint = "http://localhost:10002/gibberish"
testing = <testing-status>
[database]
authsource = "authsource"
collectionname = "collectionname"
databasename = "databasename"
hosts = ["localhost:27017"]
password = "password"
replicasetname = "replicasetname"
username = "username"
[redis]
Address = "localhost:6379"
NSFWDatabase = 2
FingerprintDatabase = 1