DocsGet started
Concepts
The words Truehands uses, what each one means in the code, and how they fit together.
Programs#
A program is one collection effort: a list of tasks contributors are paid to film, a pay rate, and the limits a clip must meet. Every clip is audited against its program, and copies are searched for across the program's runs.
For a local audit (and in your own AWS account) a program is a folder with a program.json:
| Key | Required | What it does |
|---|---|---|
tasks | yes | Non-empty list of task names. The task check ranks the claimed task among these. |
pay_rate_usd_per_hour | yes | Dollars per accepted hour; used for the money in the summary. |
name | no | Display name. Default: the folder name. |
capture_app | no | The capture_app tag your capture app writes into files. When set, a file without it is flagged not_from_capture_app. |
max_clip_seconds | no | Longest clip analysed, in seconds. Default 3600. |
max_clip_bytes | no | Largest file analysed. Default 8 GiB. |
window_start, window_end | no | ISO 8601 times of the collection window. Signed capture checks the recording time against them. |
attestation | no | {"mode": "required" | "optional", "devices": "devices.json"} turns on signed capture. |
A program.json that is missing, not JSON, or lacks tasks or a numeric pay rate fails the whole run (ProgramError, exit 2). Anything wrong with a single clip never does.
In Truehands Cloud a program is created once with POST /v1/programs (slug, name, tasks, pay rate, capture app, clip-length limit) and runs refer to it by its slug: 2-48 lowercase letters, digits or hyphens.
Clips#
A clip is one submitted video file: what a contributor filmed and asks to be paid for. It has an id, a contributor, a device, a claimed task, a submission time and, optionally, a motion-sensor (IMU) log and a signed capture document. Ids (clip_id, contributor_id, device_id) must match ^[A-Za-z0-9_-]{1,64}$.
The engine accepts one container and two codecs: MP4/MOV with exactly one H.264 or HEVC video stream, at most 8,294,400 pixels per frame (3840×2160). Everything else is refused at intake, before anything is decoded.
Manifests#
A manifest (manifest.csv) lists a batch of clips, one row per submission. The engine reads these columns:
| Column | Required | Meaning |
|---|---|---|
clip_id | yes | Unique within the manifest. A repeated id is rejected as invalid_manifest. |
contributor_id | yes | Who filmed it. Copies by the same contributor and by others are told apart. |
device_id | yes | The phone or camera. Contributors sharing a device are linked. |
file | yes | Path of the video, relative to the program folder. Must stay inside it. |
claimed_task | for the task check | One of the program's tasks. A clip whose claim is empty or not a program task is flagged task_mismatch. |
submitted_at | for ordering | ISO 8601 time. Clips are audited in submission order, so a copy is always the later clip. |
imu_file | no | Path of the motion-sensor CSV, relative to the program folder. Empty means none. |
attestation_file | no | Path of the signed capture document. See signed capture. |
Other columns are kept but not used: the demo manifest's duration_s and pay_rate_usd_per_hour are ignored, because paid seconds are measured from the video and the rate comes from program.json.
The hosted CLI (truehands run, truehands inbox push) is stricter: it needs clip_id, contributor_id, device_id, claimed_task, submitted_at, file and accepts imu_file. The API refuses a run whose claimed_task is not one of the program's tasks or whose submitted_at has no time zone.
An IMU log is a CSV with the header t,gx,gy,gz,ax,ay,az: time in seconds from the first video frame, gyro in rad/s, accelerometer in m/s². The engine reads the time and gyro columns; the checks page lists the validation rules.
Runs#
A run audits one batch of clips: every clip of the manifest goes through intake, the engine and the program's policy, and the run ends with a verdict per clip and a summary.
Locally, python -m truehands.audit is one run and writes audit.json. In Truehands Cloud a run is created by POST /v1/runs (or truehands run), waits in a queue, and moves through queued, running, then done, failed or cancelled. Each run executes the engine in its own child process, so one run's crash never touches another.
- Retry (
truehands retry) queues a failed run again under the same id. - Re-run (
truehands rerun) audits a run's clips again with the current engine, reference library and policy. It is free and does not count for payouts until a person promotes it in the console; then the rest of its lineage stops counting. - Idempotency: with an
Idempotency-Keyheader (the CLI sends one automatically in CI), a retried request returns the run it already created instead of auditing and billing the same footage twice.
Verdicts#
Every clip ends with one of four verdicts:
| Verdict | Paid seconds | Meaning |
|---|---|---|
| accept | the clip's full length | Nothing found. |
| partial | length minus the cut seconds | Idle time, replayed footage or repeated frames are cut from pay; the rest is paid. |
| review | 0 until a person decides | Something needs a human: a weak copy match, a task that does not match, a provenance flag, a check the engine could not finish. |
| reject | 0 | A copy, public-dataset footage, a sensor log from another recording, a forged signature, or a file refused at intake. |
Each finding carries a reason code with a severity (reject, review or partial), and the clip takes the most severe one. A policy can change what each code does, within limits: intake failures and exact copies are always rejected. The full list is on Reason codes.
Engine verdicts are marked "provisional": true: a policy, the cross-run step or a reviewer can still change them, and every change is recorded.
Paid seconds and billable seconds#
Two numbers per clip, which answer different questions.
payable_sis what the contributor should be paid for.acceptpays the full length,partialthe length minus idle, replayed and repeated-frame seconds,reviewandrejectnothing.billable_sis what the audit itself costs: the clip's length when the engine checked it fully, 0 for clips refused at intake and for clips where a step failed inside the engine (engine_error) or decoding timed out (decode_timeout). Billing is per audited hour, and follows the footage that was audited, never its verdicts.
The length itself (duration_s) is measured from the video stream: the packet count over the declared frame rate clamped to 15-120 fps, never more than the stream's own timestamps, and never more than what actually decoded. The container's duration is not used, so a long silent audio track or a header that claims 1 fps cannot add paid time. When frame count and timestamps disagree by more than 5%, the clip is flagged timing_mismatch and paid on the smaller.
Each run also writes usage.json: billable hours in total and by submission day, the engine version and model hash, and the SHA-256 of audit.json, which ties a bill to the audit it came from.
Evidence#
Every finding says why, with numbers a reviewer can check:
- Copies: the matched clip, the share of this clip that lines up with it in order (
coverage), how far that alignment beats every other time offset (distinct), the playback speed, the time offset, the variant (as-is, mirrored, reversed) and the share of frames that are pixel-identical. Two evidence frames, one from each clip at a matched timecode. - Idle time: the per-second motion trace and the idle runs that were cut.
- Replays and slowed playback: which stretch repeats where, and the share of repeated frames.
- Task: the claimed task's rank and probability, the top three tasks, and how close the clip sits to the program's other clips claiming that task.
- Sensor: the correlation and lag between gyro and image motion, and both series for a chart.
- Provenance: the encoder and the tags of the file.
All continuous measurements also land in each clip's signals, so thresholds can be re-evaluated without decoding the video again and drift can be tracked week by week. Evidence frames and thumbnails are face-blurred before they are written anywhere a reviewer can see them. In Truehands Cloud, video and evidence images are served through signed links that expire after 1 hour.
Contributors and risk#
Contributors are linked when they share footage (one copies another) or a device. In a local audit the summary marks each contributor high (two or more rejected clips, or half their clips flagged), medium (anything flagged) or low.
Truehands Cloud computes one explainable score per contributor, risk-v1, from 0 to 100, across every finished run of the organisation: a weighted share of flagged clips (up to 45 points), hard findings such as copies, public footage and sensor mismatches (up to 35), and membership of a group with two or more copiers (up to 20). Bands: high from 55, medium from 25. Risk never changes a verdict or a paid second; it directs attention and can lead to a hold.
Cross-run memory#
A copy submitted a month later, or by a contributor in another batch, is still a copy. In Truehands Cloud every finished run is compared with everything the organisation audited before, in two layers:
- Exact: the same video-stream hash as an earlier clip. Remuxing, retagging or a new audio track does not change it.
- Near: each clip is summarised as 2-second sketches (the mean of 4 frame embeddings). Sketches within cosine 0.9 of an indexed sketch vote for earlier clips; at most 8 candidates per clip are then verified with the engine's own time-consistent alignment.
A match adds cross_run_duplicate. An exact match is a reject. A near match is a reject when it meets the engine's copy thresholds (coverage 0.5, distinct 0.45) and its frames are pixel-identical at least 50% of the time or 0.93 similar on average; a partial overlap goes to review. When the earlier-indexed clip was actually submitted after this one, the finding is capped at review, because this clip may be the original. A run's page lists the clips "seen in earlier runs", and an owner or admin can remove a run from memory under Library (its past verdicts stay).
Local audits (truehands.audit, Mode A) compare a clip with the earlier clips of the same run and with the reference library; cross-run memory is part of the hosted service.
The review desk and the two-person rule#
Clips held for review become items on the review desk in the console. A reviewer claims an item (the claim lasts 10 minutes and can be renewed), watches the clip next to its evidence, and decides: accept, pay in part (choosing which seconds stay unpaid) or reject, with one of these reasons:
| Decision | Code | Key | Label | What the contributor is told |
|---|---|---|---|---|
| accept | false_positive | 1 | False positive | Approved after a person checked it |
| accept | verified_ok | 2 | Verified OK | Approved after a person checked it |
| partial | idle_padding | 1 | Idle padding | Paid in part: time with no activity was removed |
| partial | off_task_segment | 2 | Off-task segment | Paid in part: footage of other activity was removed |
| partial | privacy_cut | 3 | Privacy cut | Paid in part: private footage was removed |
| reject | confirmed_copy | 1 | Confirmed copy | Not paid: the footage was copied |
| reject | public_footage | 2 | Public footage | Not paid: the footage comes from a public source |
| reject | wrong_task | 3 | Wrong task | Not paid: the footage does not show the task |
| reject | staged_or_fake | 4 | Staged or fake | Not paid: the footage was staged |
| reject | sensor_tamper | 5 | Sensor tampering | Not paid: the motion data does not match the video |
| reject | unusable | 6 | Unusable | Not paid: the footage cannot be used |
| reject | privacy_violation | 7 | Privacy violation | Not paid: the footage breaks the privacy rules |
| reject | other | 8 | Other (see note) | Not paid after review |
The rules the server enforces:
- Only people decide. Decisions need a person whose role holds
review.decide(owners, admins, reviewers, or a custom role that includes it) signed in to the console with a password. A key pair, a session opened with one, or a CI service account cannot decide, so a script or an agent can never pay a clip. - The server computes the money. Payable seconds and dollars come from the clip and the decision, never from numbers the client sends.
- Two-person rule. Accepting or part-paying a clip whose engine verdict was reject, or that carries a reject-severity finding (even one a policy downgraded to review), needs a second person. The decision waits as
pending_seconduntil someone other than the reviewer confirms it, or disagrees with a note and reopens it. - Append-only. Undo marks a decision reverted and restores the clip: the reviewer within 2 minutes, an owner or admin at any time with a note. Nothing is deleted.
- SLA. Items are due 48 hours after they open; the desk shows what is breaching.
From CI, truehands review status prints the backlog and truehands review wait RUN blocks until people have finished a run (exit 0) or times out (exit 6).
Payout holds#
A hold stops money, not verdicts. There are three kinds:
- Contributor holds.
truehands hold ID… --reason … --note …(orPOST /v1/holds) holds a contributor's payouts across the organisation. Reasons:suspected_copying,public_footage,sensor_tampering,device_ring,duplicate_resubmission,identity_check,other. The note says what the footage shows, with no names, emails, phone numbers or links. Releasing a hold needs an owner or admin signed in to the console, with a note. - Run holds. A quality gate with
hold_payout: trueholds the run's payout when it fails or warns, until an owner or admin releases it in the console. See Policies and gates. - Review holds. Clips still in review are held out of payout batches until they are decided.
- Cross-run holds. When the cross-run comparison could not run for a finished run, its payout is held (
cross_run_unchecked) rather than paid unchecked.
Payout batches turn a program's verdicts for a time window into amounts in integer cents, bound to a SHA-256. A batch needs two approvals by two different people, each approving the exact hash they reviewed; only then do the payout files exist, and a clip can be paid once.
Pilots and spot checks#
A pilot measures Truehands on your own footage for an agreed period, before you rely on it. The usual first step is a free two-week shadow pilot: Truehands flags clips as it would in production, your reviewers decide the flags, and at the end a report shows what was found, what it would have changed in pay, what was flagged wrongly and what was missed. The same report, run again for a later period, is a periodic evaluation.
An owner or admin sets a pilot up with its programs, its first and last day, the success criteria agreed before the start (for example "found copies or idle time we paid for", "cut manual review by 10 hours a week") and the customer's contact. Criteria changed after the first day are recorded, and the report says so.
Which runs count. A run is in the pilot when its audit finished between 00:00 UTC on the first day and the end of the last day, in one of the pilot's programs, and it counts for payouts (a re-run that was not promoted does not). It is the audit date that counts, not the date contributors submitted their clips: a shadow pilot often audits footage you have already paid for. Whole runs count, so the report's money adds up to the runs' own summaries. The report is computed live, so decisions made after the last day still show.
Two numbers, two questions.
- Precision, the share of flags your reviewers confirmed, answers "when Truehands flags a clip, how often is it right?" A flag is a clip Truehands rejected, held for review or paid in part. Your reviewers confirm it by rejecting or part-paying the clip, and overturn it by accepting it. Only reviewed flags count. Clips held for review reach people first; a rejected or part-paid clip is reviewed only when someone reopens it, and the report says how many never were.
- Miss rate answers "of the clips Truehands accepted, how many should it have flagged?" Precision cannot answer this. Reviewers only see what Truehands flags, so a clip it wrongly accepted never reaches them.
Why spot checks. The only way to find what an audit missed is to look at clips it accepted. Checking all of them would cost what Truehands is meant to save, so a pilot draws a random sample of them: spot checks. Each one goes to the review queue as its own kind of item, and a reviewer watches the clip and answers OK or Should have been flagged, with a reason and a note. Because the sample is random, the share of misses in it estimates the share among all accepted clips; the report also turns it into a projected number of missed clips.
A spot check changes no verdict and no pay: an answer only records what the reviewer saw, and spot checks never hold up a run's review or payout. A reviewer who may reopen decisions can also send a missed clip to a normal review, where a decision can change its pay. Draws are split across programs in proportion to their accepted clips, never pick a clip twice, and can be repeated from their seed (see Pilots).
How to read the intervals. Each share comes with a 95% range, a Wilson score interval: the true share lies inside it with 95% confidence. Few answers give a wide range. If your reviewers confirmed 4 of 5 reviewed flags, precision is 80%, but the range runs from 38% to 96%, so it says little yet. Under 30 answers the report says so in words. No miss in a small sample is not proof of no misses: after 20 spot checks with no miss, up to 16% of accepted clips could still be misses. The projected number of missed clips uses the same range, never below the misses already found and never above the clips not answered OK.
Manual review time. Without Truehands, a person would watch every audited hour once; with it, a person watches the clips held for review or paid in part. The report shows both, the hours a week saved, and, when an owner or admin has set the manual review rate on the Overview, the estimated saving with the same formula as the Overview's Est. saved. Its assumptions are printed next to it.
Who may do what#
Every action in Truehands Cloud is a permission: runs.start, review.decide, backups.manage, sources.manage (setting up watchers, where footage comes from), and reading too (runs.view). A person's role is a set of permissions. The built-in roles are owner, admin, reviewer, viewer and operator, who runs tests (uploads footage, starts and cancels runs, sees results) and changes no settings; service accounts have the ci role.
An organisation can add its own roles from the permissions it picks, such as a "QA runner" or a "Data engineer" with backups and exports but nothing about the team. Managing the team, roles and service accounts never goes into a custom role: only owners and admins grant access, and only owners make owners. A key pair can be limited to a few permissions; it can then do only what both its limit and its owner's role allow, at the moment of each request. The matrix of who holds what, and the endpoints, are under Roles and permissions.
A person, a service account or a key pair can also be limited to some programs, for example a contractor who works on one program only. They then see that program's runs, review queue, payouts and totals, and nothing of the others: another program's run is not found, and starting one there is refused. What a key may see is its own list intersected with its owner's. Owners and admins are never limited, and what acts on the whole organisation (the team, webhooks, backups, creating programs) stays with people who see every program. A key's limits can be changed later: narrowed with a password, widened with a fresh one. See Program scopes.
An organisation can sign in with its own identity provider (Okta, Microsoft Entra ID, Google Workspace) and give roles from its groups: an ordered list of rules, where the first rule that names one of a person's groups decides their role and programs. People the rules give a role to are managed by the identity provider and change there, and SCIM can create and deactivate them. Owners are never managed, and when single sign-on is required, owners keep their password as the way in if the identity provider is down. See Single sign-on and SCIM.