curl --request POST \
--url https://api.anam.ai/v1/watermark/checks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size_bytes": 26214400
}
'import requests
url = "https://api.anam.ai/v1/watermark/checks"
payload = { "size_bytes": 26214400 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({size_bytes: 26214400})
};
fetch('https://api.anam.ai/v1/watermark/checks', 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.anam.ai/v1/watermark/checks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'size_bytes' => 26214400
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.anam.ai/v1/watermark/checks"
payload := strings.NewReader("{\n \"size_bytes\": 26214400\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.anam.ai/v1/watermark/checks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"size_bytes\": 26214400\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/watermark/checks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"size_bytes\": 26214400\n}"
response = http.request(request)
puts response.read_body{
"check_id": "<string>",
"upload_url": "<string>",
"status_url": "<string>"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}create watermark check
Reserves a check of whether a video carries Anam’s invisible watermark and returns a one-time upload link. Send only the file size here; the file itself goes straight to the EU validator and never passes through this API. The API key needs write access to watermark checks.
- Call this operation with the file’s exact
size_bytes. - Within 10 minutes,
PUTthe file toupload_urlfrom a server, with itsContent-Typeand an exactContent-Length, and without chunked transfer encoding. Do not send anAuthorizationheader. The validator answers202when it has the file. Browsers cannot upload directly because the validator only allows Lab origins. - Poll
status_url(Get a watermark check) about every 2 seconds untilstatusisdone,rejectedorfailed.
Accepted files are MP4, MOV, WebM or MKV videos with a video track, up to 50 MB (52,428,800 bytes) and at least 10 seconds long. The validator analyses the start of the file: up to 5 minutes for videos up to 720p, and less at higher resolutions (about 166 seconds at 1080p and 48 seconds at 4K).
Each organization can create 100 checks per UTC day, counting checks that are never uploaded, and have 3 in progress at once. A check stops counting as in progress when you fetch its done, rejected or failed status, so poll each check until it finishes. A check that is never uploaded holds its slot for up to about 45 minutes after it was created. A check you stop polling before it finishes holds its slot for up to 36 minutes after your last poll.
Upload errors come from the validator as {"error_code": "..."}: invalid_link, link_expired or link_used (create a new check), length_required (send Content-Length) and size_mismatch (the body must match size_bytes), both checked before the link is used, so fix the request and retry the same link, file_too_large, busy (HTTP 429; retry the same link after Retry-After seconds while it is still valid), upload_incomplete and upload_timeout (create a new check and upload again), and internal_error (HTTP 500; create a new check). The upload must finish within min(300, 30 + size_bytes / 250000) seconds, which needs about 2 Mbit/s upstream for a 50 MB file.
curl --request POST \
--url https://api.anam.ai/v1/watermark/checks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size_bytes": 26214400
}
'import requests
url = "https://api.anam.ai/v1/watermark/checks"
payload = { "size_bytes": 26214400 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({size_bytes: 26214400})
};
fetch('https://api.anam.ai/v1/watermark/checks', 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.anam.ai/v1/watermark/checks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'size_bytes' => 26214400
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.anam.ai/v1/watermark/checks"
payload := strings.NewReader("{\n \"size_bytes\": 26214400\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.anam.ai/v1/watermark/checks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"size_bytes\": 26214400\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/watermark/checks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"size_bytes\": 26214400\n}"
response = http.request(request)
puts response.read_body{
"check_id": "<string>",
"upload_url": "<string>",
"status_url": "<string>"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}Authorizations
Body
Response
Check created. Upload the file to upload_url.

