/api/v1/flagsPer moderation type, every flag a request (or a live session) of your account may name in flags, including flags set up for your account only. A flag that is not in this list is refused with 400. Not cached: the list is your account's.
Responses#
200#
Your flags, per type.
-
text_moderationarray of AccountFlag -
image_moderationarray of AccountFlag -
video_moderationarray of AccountFlag -
audio_moderationarray of AccountFlag -
live_stream_moderationarray of AccountFlag
text_moderation[] (AccountFlag)
-
keystring requiredThe flag's key: what
flagstakes. -
namestring requiredIts display name.
-
availableboolean requiredWhether it can be checked right now. A flag that is not is still accepted; it comes back in
unchecked.
image_moderation[] (AccountFlag)
-
keystring requiredThe flag's key: what
flagstakes. -
namestring requiredIts display name.
-
availableboolean requiredWhether it can be checked right now. A flag that is not is still accepted; it comes back in
unchecked.
video_moderation[] (AccountFlag)
-
keystring requiredThe flag's key: what
flagstakes. -
namestring requiredIts display name.
-
availableboolean requiredWhether it can be checked right now. A flag that is not is still accepted; it comes back in
unchecked.
audio_moderation[] (AccountFlag)
-
keystring requiredThe flag's key: what
flagstakes. -
namestring requiredIts display name.
-
availableboolean requiredWhether it can be checked right now. A flag that is not is still accepted; it comes back in
unchecked.
live_stream_moderation[] (AccountFlag)
-
keystring requiredThe flag's key: what
flagstakes. -
namestring requiredIts display name.
-
availableboolean requiredWhether it can be checked right now. A flag that is not is still accepted; it comes back in
unchecked.
401#
Missing, unknown, revoked or expired API key, or the account is not active.
{
"error": "unauthorized",
"message": "The API key is not valid."
}429#
Too many requests in a minute. Wait Retry-After seconds. See Rate limits.
Header Retry-After: Seconds to wait.
{
"error": "too_many_requests",
"message": "Too many requests. Try again in a minute."
}Request
curl -X GET https://api.detectivision.ai/api/v1/flags \
-H "Api-Key: $DETECTIVISION_API_KEY"import os, requests
r = requests.get(
"https://api.detectivision.ai/api/v1/flags",
headers={"Api-Key": os.environ["DETECTIVISION_API_KEY"]},
)
print(r.status_code, r.json())const res = await fetch("https://api.detectivision.ai/api/v1/flags", {
method: "GET",
headers: {
"Api-Key": process.env.DETECTIVISION_API_KEY,
},
});
console.log(res.status, await res.json());Response 200
{
"text_moderation": [
{
"key": "hate",
"name": "Hate",
"available": true
},
{
"key": "insult",
"name": "Insult",
"available": true
}
],
"image_moderation": [
{
"key": "scam",
"name": "Scam",
"available": true
}
]
}