npm.io
0.1.1 • Published 18h agoCLI

chronoverify

Licence
MIT
Version
0.1.1
Deps
0
Size
16 kB
Vulns
0
Weekly
138

chronoverify

TypeScript/JavaScript client for the ChronoVerify image capture-time and provenance verification API. Send any image, get one plain verdict (provenance_confirmed, consistent, inconclusive, metadata_anomaly, or manipulation_indicated) with a 0 to 100 confidence and the signals behind it. It reads C2PA Content Credentials when present and falls back to EXIF, XMP, and pixel forensics when they are not, so it works on any image, signed or not.

Get an API key (the first 100 verifications each month are included, then a flat $0.003 per image, no per-operation multipliers): https://chronoverify.com/pricing

ChronoVerify is provenance-first and deliberately not a deepfake detector. Verdicts are investigative triage to support human review, not proof.

Install

npm install chronoverify

Requires Node 18+ (uses the built-in fetch and FormData).

Use

import { ChronoVerify } from "chronoverify";

const cv = new ChronoVerify("cv_live_...");      // or omit the key for the free, rate-limited public path
const result = await cv.verify({ file: "photo.jpg" });

console.log(result.verdict, result.confidence);  // e.g. "consistent" 58
console.log(result.capture_time);                // { value, source, consistent }

Verify a remote image by URL (the server fetches it):

const result = await cv.verify({ url: "https://example.com/photo.jpg" });

You can pass a path, a Uint8Array/Buffer, or a Blob:

const bytes = await fs.promises.readFile("photo.jpg");
const result = await cv.verify({ file: bytes, filename: "photo.jpg" });

The key can also come from the CHRONOVERIFY_API_KEY environment variable. Errors throw ChronoVerifyError with status and detail.

Signed audit report

Get a shareable, independently verifiable PDF audit record for one image (an Ed25519 signature over the canonical verdict, with an optional RFC 3161 timestamp). A report requires an API key. It is the premium artifact: included within a paid plan's monthly quota, otherwise $0.20 from your prepaid balance. report() returns the PDF as a Uint8Array.

import { writeFile } from "node:fs/promises";

const pdf = await cv.report({ file: "photo.jpg" });
await writeFile("report.pdf", pdf);

Verify a report's signature against the public key at https://chronoverify.com/v1/key .

Command line

chronoverify verify photo.jpg
chronoverify verify --url https://example.com/photo.jpg
chronoverify verify photo.jpg --json
chronoverify report photo.jpg -o report.pdf

Response

The verdict object is documented in full, with field reference and examples, at https://chronoverify.com/method#api . A clean result means a file's saved data is internally consistent, not that the scene it shows is real.

License

MIT

Keywords