GET
/api/v1/moderation/{id}/censoredDownloads a censored copy, which hides what flags with positions found: the copy made by a request with mode: "censor" (an image or a video), or kept for a moment of a live session in censor mode (a JPEG; {id} is the moment id), for any API key of the account. For a request, the URL is also returned as censored.url in the moderation result.
Path parameters#
| Parameter | Type | Description |
|---|---|---|
id required |
integer |
The moderation request's id. |
Responses#
200#
The file: a JPEG for images, an H.264 MP4 for videos.
Body: image/jpeg, video/mp4.
401#
Missing, unknown, revoked or expired API key, or the account is not active.
{
"error": "unauthorized",
"message": "The API key is not valid."
}403#
The key may not do this: a read key on a write endpoint, or a restricted key.
{
"error": "forbidden",
"message": "This API key does not have write permission"
}404#
No censored copy with this id for this account.
{
"error": "not_found",
"message": "No censored copy of this request."
}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/moderation/{id}/censored \
-H "Api-Key: $DETECTIVISION_API_KEY"import os, requests
r = requests.get(
"https://api.detectivision.ai/api/v1/moderation/{id}/censored",
headers={"Api-Key": os.environ["DETECTIVISION_API_KEY"]},
)
print(r.status_code, r.json())const res = await fetch("https://api.detectivision.ai/api/v1/moderation/{id}/censored", {
method: "GET",
headers: {
"Api-Key": process.env.DETECTIVISION_API_KEY,
},
});
console.log(res.status, await res.json());