Inspect Content Credentials on an image or video
curl --request POST \
--url https://api.zebratruth.ai/v1/media/provenance/inspect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileimport requests
url = "https://api.zebratruth.ai/v1/media/provenance/inspect"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.zebratruth.ai/v1/media/provenance/inspect', 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.zebratruth.ai/v1/media/provenance/inspect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zebratruth.ai/v1/media/provenance/inspect"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.zebratruth.ai/v1/media/provenance/inspect")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zebratruth.ai/v1/media/provenance/inspect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"requestId": "<string>",
"inspectedAt": "2023-11-07T05:31:56Z",
"c2pa": {
"status": "present_trusted",
"present": true,
"valid": true,
"trusted": true,
"embedded": true,
"claimGenerator": "<string>",
"title": "<string>",
"assertions": [
"<string>"
],
"trustVerification": {
"enabled": true,
"source": "refreshed",
"version": "<string>",
"fetchedAt": "2023-11-07T05:31:56Z",
"anchorCount": 123,
"signerVerdict": "trusted"
},
"inspectionError": "<string>"
},
"durableAttribution": {
"sha256Original": "<string>",
"perceptualFingerprint": "<string>",
"verificationUrl": "<string>",
"visibleWatermark": "none",
"invisibleWatermark": "not_supported"
},
"distributionDurability": {
"level": "fragile",
"reason": "<string>"
},
"asset": {
"kind": "image",
"contentType": "<string>",
"byteSize": 123,
"sourceUrl": "<string>"
},
"billing": {
"feature": "media.provenance.inspect",
"creditsCharged": 123,
"cached": true
}
}{
"statusCode": 123,
"message": "<string>",
"error": true,
"url": "<string>",
"statusMessage": "<string>",
"data": {
"code": "review_scope_not_enabled"
}
}{
"statusCode": 401,
"message": "Invalid API key",
"error": true,
"url": "https://api.zebratruth.ai/v1/whoami",
"statusMessage": "Invalid API key"
}{
"statusCode": 402,
"message": "Insufficient credits",
"error": true,
"url": "<string>",
"statusMessage": "Insufficient credits",
"data": {
"creditsRemaining": 3,
"creditsNeeded": 123,
"upgradeUrl": "https://developers.zebratruth.ai/dashboard/billing"
}
}{
"statusCode": 123,
"message": "<string>",
"error": true,
"url": "<string>",
"statusMessage": "<string>",
"data": {
"code": "review_scope_not_enabled"
}
}{
"statusCode": 123,
"message": "<string>",
"error": true,
"url": "<string>",
"statusMessage": "<string>",
"data": {
"code": "review_scope_not_enabled"
}
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"error": true,
"url": "<string>",
"statusMessage": "Rate limit exceeded",
"data": {
"retryAfter": 5,
"limit": 60,
"remaining": 0
}
}Provenance
Inspect Content Credentials on an image or video
Reads the C2PA manifest on an asset and reports whether it is present, valid and
signed by a trusted signer, together with a SHA-256 of the bytes and a distribution
durability assessment. Send the file as multipart, or a JSON body with a URL.
Synchronous. Credits are reserved before any fetch and committed on success.
Requires the provenance:inspect key scope.
POST
/
media
/
provenance
/
inspect
Inspect Content Credentials on an image or video
curl --request POST \
--url https://api.zebratruth.ai/v1/media/provenance/inspect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileimport requests
url = "https://api.zebratruth.ai/v1/media/provenance/inspect"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.zebratruth.ai/v1/media/provenance/inspect', 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.zebratruth.ai/v1/media/provenance/inspect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zebratruth.ai/v1/media/provenance/inspect"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.zebratruth.ai/v1/media/provenance/inspect")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zebratruth.ai/v1/media/provenance/inspect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"requestId": "<string>",
"inspectedAt": "2023-11-07T05:31:56Z",
"c2pa": {
"status": "present_trusted",
"present": true,
"valid": true,
"trusted": true,
"embedded": true,
"claimGenerator": "<string>",
"title": "<string>",
"assertions": [
"<string>"
],
"trustVerification": {
"enabled": true,
"source": "refreshed",
"version": "<string>",
"fetchedAt": "2023-11-07T05:31:56Z",
"anchorCount": 123,
"signerVerdict": "trusted"
},
"inspectionError": "<string>"
},
"durableAttribution": {
"sha256Original": "<string>",
"perceptualFingerprint": "<string>",
"verificationUrl": "<string>",
"visibleWatermark": "none",
"invisibleWatermark": "not_supported"
},
"distributionDurability": {
"level": "fragile",
"reason": "<string>"
},
"asset": {
"kind": "image",
"contentType": "<string>",
"byteSize": 123,
"sourceUrl": "<string>"
},
"billing": {
"feature": "media.provenance.inspect",
"creditsCharged": 123,
"cached": true
}
}{
"statusCode": 123,
"message": "<string>",
"error": true,
"url": "<string>",
"statusMessage": "<string>",
"data": {
"code": "review_scope_not_enabled"
}
}{
"statusCode": 401,
"message": "Invalid API key",
"error": true,
"url": "https://api.zebratruth.ai/v1/whoami",
"statusMessage": "Invalid API key"
}{
"statusCode": 402,
"message": "Insufficient credits",
"error": true,
"url": "<string>",
"statusMessage": "Insufficient credits",
"data": {
"creditsRemaining": 3,
"creditsNeeded": 123,
"upgradeUrl": "https://developers.zebratruth.ai/dashboard/billing"
}
}{
"statusCode": 123,
"message": "<string>",
"error": true,
"url": "<string>",
"statusMessage": "<string>",
"data": {
"code": "review_scope_not_enabled"
}
}{
"statusCode": 123,
"message": "<string>",
"error": true,
"url": "<string>",
"statusMessage": "<string>",
"data": {
"code": "review_scope_not_enabled"
}
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"error": true,
"url": "<string>",
"statusMessage": "Rate limit exceeded",
"data": {
"retryAfter": 5,
"limit": 60,
"remaining": 0
}
}Authorizations
API key starting with zt_live_ (production) or zt_test_ (sandbox).
Get your key at https://developers.zebratruth.ai
Headers
Body
multipart/form-dataapplication/json
An image/* (up to 20 MB) or video/* (up to 64 MB) file.
Response
Inspection result