Docs
Send a video URL, check the job, then download the redacted video.
Quickstart
The base URL is https://api.anon.bycrux.com/v1.
Send your key in an Authorization: Bearer <key> header. Keys start with anon_.
Put your key in ANON_KEY, send a video URL, then check the job with the id you get back.
curl -X POST https://api.anon.bycrux.com/v1/jobs \
-H "Authorization: Bearer $ANON_KEY" \
-H "Content-Type: application/json" \
-d '{"video_url": "https://example.com/clip.mp4"}'
curl https://api.anon.bycrux.com/v1/jobs/JOB_ID -H "Authorization: Bearer $ANON_KEY"Get a key
Send a job
Send POST /v1/jobs with a JSON body that holds the video_url.
curl -X POST https://api.anon.bycrux.com/v1/jobs \
-H "Authorization: Bearer $ANON_KEY" \
-H "Content-Type: application/json" \
-d '{"video_url": "https://example.com/clip.mp4"}'The answer is 201 with the job id and its status.
{
"id": "9b2f6c1e-4d3a-4f8b-a1c2-7e5d0f3b8a64",
"status": "queued"
}Anon downloads the video from that URL. See Video URLs for the rules.
Check a job
Send GET /v1/jobs/:id to see how the job is going.
curl https://api.anon.bycrux.com/v1/jobs/JOB_ID -H "Authorization: Bearer $ANON_KEY"status is queued, running, done or failed.
trimmed and duration_s are set once the job is done. Until then they are null.
A done job has a result with three links. A failed job has an error instead.
{
"id": "9b2f6c1e-4d3a-4f8b-a1c2-7e5d0f3b8a64",
"status": "done",
"trimmed": false,
"duration_s": 312.4,
"result": {
"video_url": "https://storage.googleapis.com/…/redacted.mp4?X-Goog-Signature=…",
"labels_url": "https://storage.googleapis.com/…/labels.json.gz?X-Goog-Signature=…",
"report_url": "https://storage.googleapis.com/…/report.json?X-Goog-Signature=…"
}
}{
"id": "9b2f6c1e-4d3a-4f8b-a1c2-7e5d0f3b8a64",
"status": "failed",
"trimmed": null,
"duration_s": null,
"error": "could not download the video"
}Poll every 10 to 30 seconds.
This loop sends a job, then checks it until it is done or failed. It needs jq.
JOB_ID=$(curl -s -X POST https://api.anon.bycrux.com/v1/jobs \
-H "Authorization: Bearer $ANON_KEY" \
-H "Content-Type: application/json" \
-d '{"video_url": "https://example.com/clip.mp4"}' | jq -r .id)
status=queued
while [ "$status" = queued ] || [ "$status" = running ]; do
sleep 15
job=$(curl -s https://api.anon.bycrux.com/v1/jobs/$JOB_ID -H "Authorization: Bearer $ANON_KEY")
status=$(echo "$job" | jq -r .status)
done
echo "$job" | jq .Results
A done job has three links in result.
redacted.mp4video_url- The video with faces, logos, screens and text blurred, as MP4.
labels.json.gzlabels_url- Gzipped JSON listing every blurred region frame by frame, with its category, shape, confidence and track id.
report.jsonreport_url- A summary with the duration, frames, fps, whether the video was trimmed, and the version.
Each link is valid for 24 hours from the request. Every GET signs the links again, so fetch the job for fresh ones.
Download what you need within 7 days. After 7 days, the job returns 404.
Usage and billing
Send GET /v1/usage to see your hours. Every field counts seconds of video.
curl https://api.anon.bycrux.com/v1/usage -H "Authorization: Bearer $ANON_KEY"{
"quota_seconds": 36000,
"used_seconds": 4980.2,
"reserved_seconds": 3600,
"available_seconds": 27419.8
}quota_seconds- The hours you bought. It is
nullfor an unlimited invited key. used_seconds- The seconds of video processed so far.
reserved_seconds- The seconds held by running jobs.
available_seconds- What a new job can use. It is also
nullfor an unlimited invited key.
You pay for the seconds of video processed. When a job starts, it reserves 60 minutes or the hours you have left, whichever is less. It is charged only for the seconds it processed. Failed jobs are free.
Video URLs
Anon downloads the video from the URL you send. The URL must follow these rules.
httpsonly, on port 443.- No user name or password in the URL.
- At most 2048 characters.
- The host must resolve to public addresses only.
Presigned links from cloud storage, such as S3, GCS or R2, work. The video can be MP4, MOV or WebM.
The file must download within 30 minutes and be at most 20 GB.
A URL that breaks these rules gets a 400.
Limits
| Limit | Value |
|---|---|
| Video per job | 60 minutes |
| Active jobs per account | 2 |
| Failed jobs per account per day | 10 |
POST /v1/jobs requests per key | 20 a minute |
GET /v1/jobs/:id requests per key | 120 a minute |
GET /v1/usage requests per key | 60 a minute |
| Jobs kept for | 7 days |
| Result links valid for | 24 hours |
| Live keys per account | 5 |
Videos longer than 60 minutes are trimmed to the first 60 minutes, and trimmed is true.
Going over the job or request limits gets a 429. Wait and retry.
Errors
An error has a JSON body with statusCode, message and sometimes code.
{
"statusCode": 402,
"message": "No hours left.",
"code": "no_hours"
}Branch on the status and code, not on message. The message is for people and can change.
| Status | code | Meaning |
|---|---|---|
| 400 | A bad body, a malformed job id, or a video_url that breaks the URL rules. | |
| 401 | The key is missing, unknown or revoked. | |
| 402 | no_hours | No hours left. Buy more at https://anon.bycrux.com/buy. |
| 403 | frozen | The account is on hold. Book a call. |
| 404 | An unknown job id, another account's job, or a job older than 7 days. | |
| 429 | active_capfailed_caprate_limited | Too many active jobs, too many failed jobs today, or too many requests. Wait and retry. |
| 502 | The job could not be started. Retry later. | |
| 503 | pausedat_capacityself_serve_offnot_configured | Anon is paused or at capacity. Retry later. |