Skip to main content
Glama
README.md
# whomade

Who made this image? `whomade` verifies C2PA Content Credentials against the official C2PA trust list, reads the metadata AI generators leave behind and spots Gemini's visible watermark. It runs locally: nothing is uploaded unless you ask for OpenAI's check.

```console
$ npx whomade amsterdam.png gemini.png
amsterdam.png
  AI-generated by ChatGPT (gpt-image): verified
  verified c2pa      Signed by OpenAI OpCo, LLC, chaining to Trufo C2PA Root CA (2025, ECC P384) on the C2PA trust list. Declares trainedAlgorithmicMedia. Declares an invisible watermark.

gemini.png
  AI-generated by Google Gemini: unverified, easy to fake or strip
  claimed  watermark Gemini's visible sparkle watermark, 96 px, 64 px from the corner (match 0.79).
```

## Use

**CLI**

```sh
npx whomade photo.jpg https://example.com/image.png
npx whomade photo.jpg --json     # one JSON report per line
npx whomade photo.jpg --openai   # also ask OpenAI for its SynthID watermark (uploads the image)
```

**MCP server** — lets an assistant answer "who made this image?"

```sh
claude mcp add whomade -- npx -y whomade mcp
```

For Claude Desktop, Cursor and other clients:

```json
{ "mcpServers": { "whomade": { "command": "npx", "args": ["-y", "whomade", "mcp"] } } }
```

The server exposes one read-only tool, `who_made`, which takes a file path or URL. Its optional `openai` flag needs `OPENAI_API_KEY` in the server's environment.

**Library**

```ts
import { describe, whomade } from 'whomade';

const report = await whomade(await readFile('photo.jpg')); // Uint8Array or ArrayBuffer
report.ai;          // true | false | null
describe(report);   // "AI-generated by ChatGPT (gpt-image): verified"

await whomade(bytes, { openaiApiKey: process.env.OPENAI_API_KEY }); // opt-in remote check
```

```ts
interface Report {
  ai: boolean | null;                          // null: no evidence either way
  origin?: 'generated' | 'edited' | 'captured';
  confidence: 'verified' | 'signed' | 'claimed' | 'none';
  generator?: string;
  evidence: { source; confidence; origin?; generator?; signer?; detail: string }[];
}
```

## What it checks

| Source | Formats | Examples |
| --- | --- | --- |
| C2PA Content Credentials | JPEG, PNG, HEIF, AVIF | ChatGPT, Adobe Firefly, Google, Samsung and Pixel cameras |
| IPTC digital source type (XMP) | JPEG, PNG, WebP | Google, Meta |
| Generator metadata | PNG | AUTOMATIC1111, Forge, ComfyUI, InvokeAI, NovelAI |
| EXIF Software | JPEG, PNG, WebP | tools that sign their name |
| Gemini's visible watermark | JPEG, PNG | Gemini, Nano Banana |
| OpenAI's SynthID watermark (`--openai`) | JPEG, PNG, WebP | ChatGPT, OpenAI API, even after screenshots |

Each piece of evidence gets one of three confidence levels:

| Confidence | Meaning |
| --- | --- |
| `verified` | Valid C2PA signature from a certificate that chains to the [C2PA trust list](https://github.com/c2pa-org/conformance-public), or the generator's own watermark detector. |
| `signed` | Valid C2PA signature, but the certificate is not on the trust list. Anyone can make one. |
| `claimed` | Unsigned metadata, a C2PA manifest that fails validation, or a visible watermark. Easy to fake or strip. |

## How the Gemini check works

Gemini blends a white sparkle into the bottom-right corner. Google has shipped several layouts (logo 36 to 96 px, margin 32 to 192 px), but the right and bottom margins are always equal, so `whomade` searches that diagonal at every plausible size, which also covers resized images. It correlates a high-passed corner with the sparkle and compares against the same search in the other three corners.

Measured on 43 real Gemini images and 1,080 crops of 45 other images: 31 watermarks found, 0 false positives. The misses are watermarks that are barely visible to begin with. Cleanly removed watermarks are not detected.

## Limits

- Most sites, messaging apps and screenshots strip metadata. **`ai: null` means no evidence, not "made by a human".**
- Google's own SynthID is only checkable at [synthid.com](https://synthid.com) for now; `--openai` covers OpenAI's.
- Detection is evidence-based, not a pixel classifier, so it never guesses.

## Roadmap

- Open invisible watermarks: Adobe TrustMark, Stable Diffusion and FLUX
- Google's SynthID API once it opens
- Forensic views: error level analysis, noise and frequency maps

## License

MIT. The bundled trust list is © C2PA under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/); refresh it with `npm run update-trust-list`. The sparkle alpha map comes from [gemini-watermark-remover](https://github.com/GargantuaX/gemini-watermark-remover) (MIT). Test fixtures come from [c2pa-rs](https://github.com/contentauth/c2pa-rs) (MIT OR Apache-2.0) and gemini-watermark-remover.