Ottieni il risultato della classificazione di un video
curl --request GET \
--url https://backend.identifai.net/api/classification_video/{identifier} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://backend.identifai.net/api/classification_video/{identifier}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://backend.identifai.net/api/classification_video/{identifier}', 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://backend.identifai.net/api/classification_video/{identifier}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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://backend.identifai.net/api/classification_video/{identifier}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://backend.identifai.net/api/classification_video/{identifier}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.identifai.net/api/classification_video/{identifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"hash": "<string>",
"identifier": "<string>",
"api_version": "<string>",
"status": "new",
"deferred_status": "pending",
"deferred_progress": {
"current_idx": 123,
"total": 123
},
"deferred_errors": [
"<string>"
],
"errors": "<string>",
"name": "<string>",
"ref_id": "<string>",
"result_url": "<string>",
"is_nsfw": true,
"verdict": {
"heuristic": "<string>",
"confidence": 123,
"classification": "human",
"count": 123,
"models": [
"<string>"
],
"unknown": true
},
"verdicts": [
{
"heuristic": "<string>",
"confidence": 123,
"classification": "human",
"count": 123,
"models": [
"<string>"
],
"unknown": true
}
],
"force_classification": "human",
"results": {
"images": [
{
"hash": "<string>",
"identifier": "<string>",
"api_version": "<string>",
"status": "new",
"deferred_status": "pending",
"deferred_progress": {
"current_idx": 123,
"total": 123
},
"deferred_errors": [
"<string>"
],
"errors": "<string>",
"name": "<string>",
"ref_id": "<string>",
"result_url": "<string>",
"is_nsfw": true,
"c2pa": {
"manifests": {},
"active_manifest": "<string>",
"validation_state": "Valid",
"validation_status": [
{
"url": "<string>",
"code": "<string>",
"explanation": "<string>"
}
],
"validation_results": {
"activeManifest": {
"failure": [
{}
],
"success": [
{}
],
"informational": [
{}
]
},
"ingredientDeltas": [
{}
]
}
},
"has_heatmap": true,
"verdict": {
"heuristic": "<string>",
"confidence": 123,
"classification": "human",
"models": [
"<string>"
]
},
"verdicts": [
{
"heuristic": "<string>",
"confidence": 123,
"classification": "human",
"models": [
"<string>"
]
}
],
"force_classification": "human",
"results": [
{
"model": "<string>",
"unknown": true,
"elapsed_time": 123,
"classification": [
{
"label": "human",
"score": 123
}
],
"classification_details": {},
"explanations": [
{
"type": "attention_map",
"method": "<string>",
"description": "<string>"
}
]
}
],
"details": [
{
"detections": [
{
"box": {
"x1": 123,
"x2": 123,
"y1": 123,
"y2": 123
},
"results": [
{
"model": "<string>",
"unknown": true,
"elapsed_time": 123,
"classification": [
{
"label": "<string>",
"score": 123
}
],
"classification_details": {
"confidence": 123
}
}
],
"verdict": {
"heuristic": "<string>",
"confidence": 123,
"classification": "<string>"
}
}
]
}
]
}
],
"audios": [
{
"hash": "<string>",
"identifier": "<string>",
"api_version": "<string>",
"status": "new",
"deferred_status": "pending",
"deferred_progress": {
"current_idx": 123,
"total": 123
},
"deferred_errors": [
"<string>"
],
"errors": "<string>",
"name": "<string>",
"ref_id": "<string>",
"result_url": "<string>",
"verdict": {
"heuristic": "<string>",
"confidence": 123,
"classification": "human",
"models": [
"<string>"
]
},
"verdicts": [
{
"heuristic": "<string>",
"confidence": 123,
"classification": "human",
"models": [
"<string>"
]
}
],
"force_classification": "human",
"results": [
{
"model": "<string>",
"unknown": true,
"elapsed_time": 123,
"classification": [
{
"label": "human",
"score": 123
}
],
"classification_details": {}
}
],
"details": {
"clips": [
{
"index": 123,
"start": 123,
"end": 123,
"results": [
{
"model": "<string>",
"unknown": true,
"elapsed_time": 123,
"classification": [
{
"label": "human",
"score": 123
}
],
"classification_details": {}
}
],
"verdict": {
"heuristic": "<string>",
"confidence": 123,
"classification": "human",
"models": [
"<string>"
]
}
}
]
}
}
]
}
}{
"error": "Unauthorized"
}{
"error": "Forbidden"
}{
"error": "Too Many Attempts."
}Classificazione
Ottieni il risultato della classificazione di un video
Recupera il risultato della classificazione di un video specifico.
Ottieni il risultato della classificazione di un video
curl --request GET \
--url https://backend.identifai.net/api/classification_video/{identifier} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://backend.identifai.net/api/classification_video/{identifier}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://backend.identifai.net/api/classification_video/{identifier}', 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://backend.identifai.net/api/classification_video/{identifier}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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://backend.identifai.net/api/classification_video/{identifier}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://backend.identifai.net/api/classification_video/{identifier}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.identifai.net/api/classification_video/{identifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"hash": "<string>",
"identifier": "<string>",
"api_version": "<string>",
"status": "new",
"deferred_status": "pending",
"deferred_progress": {
"current_idx": 123,
"total": 123
},
"deferred_errors": [
"<string>"
],
"errors": "<string>",
"name": "<string>",
"ref_id": "<string>",
"result_url": "<string>",
"is_nsfw": true,
"verdict": {
"heuristic": "<string>",
"confidence": 123,
"classification": "human",
"count": 123,
"models": [
"<string>"
],
"unknown": true
},
"verdicts": [
{
"heuristic": "<string>",
"confidence": 123,
"classification": "human",
"count": 123,
"models": [
"<string>"
],
"unknown": true
}
],
"force_classification": "human",
"results": {
"images": [
{
"hash": "<string>",
"identifier": "<string>",
"api_version": "<string>",
"status": "new",
"deferred_status": "pending",
"deferred_progress": {
"current_idx": 123,
"total": 123
},
"deferred_errors": [
"<string>"
],
"errors": "<string>",
"name": "<string>",
"ref_id": "<string>",
"result_url": "<string>",
"is_nsfw": true,
"c2pa": {
"manifests": {},
"active_manifest": "<string>",
"validation_state": "Valid",
"validation_status": [
{
"url": "<string>",
"code": "<string>",
"explanation": "<string>"
}
],
"validation_results": {
"activeManifest": {
"failure": [
{}
],
"success": [
{}
],
"informational": [
{}
]
},
"ingredientDeltas": [
{}
]
}
},
"has_heatmap": true,
"verdict": {
"heuristic": "<string>",
"confidence": 123,
"classification": "human",
"models": [
"<string>"
]
},
"verdicts": [
{
"heuristic": "<string>",
"confidence": 123,
"classification": "human",
"models": [
"<string>"
]
}
],
"force_classification": "human",
"results": [
{
"model": "<string>",
"unknown": true,
"elapsed_time": 123,
"classification": [
{
"label": "human",
"score": 123
}
],
"classification_details": {},
"explanations": [
{
"type": "attention_map",
"method": "<string>",
"description": "<string>"
}
]
}
],
"details": [
{
"detections": [
{
"box": {
"x1": 123,
"x2": 123,
"y1": 123,
"y2": 123
},
"results": [
{
"model": "<string>",
"unknown": true,
"elapsed_time": 123,
"classification": [
{
"label": "<string>",
"score": 123
}
],
"classification_details": {
"confidence": 123
}
}
],
"verdict": {
"heuristic": "<string>",
"confidence": 123,
"classification": "<string>"
}
}
]
}
]
}
],
"audios": [
{
"hash": "<string>",
"identifier": "<string>",
"api_version": "<string>",
"status": "new",
"deferred_status": "pending",
"deferred_progress": {
"current_idx": 123,
"total": 123
},
"deferred_errors": [
"<string>"
],
"errors": "<string>",
"name": "<string>",
"ref_id": "<string>",
"result_url": "<string>",
"verdict": {
"heuristic": "<string>",
"confidence": 123,
"classification": "human",
"models": [
"<string>"
]
},
"verdicts": [
{
"heuristic": "<string>",
"confidence": 123,
"classification": "human",
"models": [
"<string>"
]
}
],
"force_classification": "human",
"results": [
{
"model": "<string>",
"unknown": true,
"elapsed_time": 123,
"classification": [
{
"label": "human",
"score": 123
}
],
"classification_details": {}
}
],
"details": {
"clips": [
{
"index": 123,
"start": 123,
"end": 123,
"results": [
{
"model": "<string>",
"unknown": true,
"elapsed_time": 123,
"classification": [
{
"label": "human",
"score": 123
}
],
"classification_details": {}
}
],
"verdict": {
"heuristic": "<string>",
"confidence": 123,
"classification": "human",
"models": [
"<string>"
]
}
}
]
}
}
]
}
}{
"error": "Unauthorized"
}{
"error": "Forbidden"
}{
"error": "Too Many Attempts."
}Risposta
Il risultato della classificazione.
La risposta della classificazione di un video
Stato dei risultati differiti (passaggi eseguiti dopo i risultati principali, ad es. le spiegazioni testuali delle mappe XAI e della heatmap). Presente solo quando l'invio ha risultati differiti: pending (analisi principale ancora in corso), inprogress, done, errored (almeno un passaggio differito è fallito, i risultati principali restano validi), skipped (l'analisi principale è fallita), expired (non completati in tempo; possono comunque passare a done o errored in seguito). Non modifica mai status: un invio è done prima dei suoi risultati differiti.
Opzioni disponibili:
pending, inprogress, done, errored, skipped, expired