Anon

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.

shell
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

Sign in, buy hours and create a key on your dashboard.

A key is shown once, when you create it. Store it somewhere safe. An account can have up to 5 live keys.

Rotate or revoke keys on your dashboard. Rotating a key revokes the old one at once.

Send a job

Send POST /v1/jobs with a JSON body that holds the video_url.

shell
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.

json · response
{
  "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.

shell
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.

json · done job
{
  "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=…"
  }
}
json · failed job
{
  "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.

shell · poll until done
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.

shell
curl https://api.anon.bycrux.com/v1/usage -H "Authorization: Bearer $ANON_KEY"
json · response
{
  "quota_seconds": 36000,
  "used_seconds": 4980.2,
  "reserved_seconds": 3600,
  "available_seconds": 27419.8
}
quota_seconds
The hours you bought. It is null for 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 null for 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.

  • https only, 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

LimitValue
Video per job60 minutes
Active jobs per account2
Failed jobs per account per day10
POST /v1/jobs requests per key20 a minute
GET /v1/jobs/:id requests per key120 a minute
GET /v1/usage requests per key60 a minute
Jobs kept for7 days
Result links valid for24 hours
Live keys per account5

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.

json · error
{
  "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.

StatuscodeMeaning
400A bad body, a malformed job id, or a video_url that breaks the URL rules.
401The key is missing, unknown or revoked.
402no_hoursNo hours left. Buy more at https://anon.bycrux.com/buy.
403frozenThe account is on hold. Book a call.
404An unknown job id, another account's job, or a job older than 7 days.
429active_capfailed_caprate_limitedToo many active jobs, too many failed jobs today, or too many requests. Wait and retry.
502The job could not be started. Retry later.
503pausedat_capacityself_serve_offnot_configuredAnon is paused or at capacity. Retry later.