# Content credentials and watermarks

Layer marks the images, video and audio it generates as AI-generated, in two ways:

1. **A signed C2PA manifest** ([Content Credentials](https://contentcredentials.org)) in every generated file whose format can carry one. It is always on.
2. **Layer’s invisible watermark**, which lives in the pixels and samples and survives metadata stripping. A workspace opts in with the [invisible\_watermark\_enabled](#turn-the-watermark-on) AI policy control.

Both are built on open standards and open-source libraries, so anyone can [check a file](#check-a-file) with public tools.

## The C2PA manifest

Every output is signed before its run completes, so the URL a run result returns serves the signed file from the first byte. Nothing needs to be requested or turned on.

### What it says

The manifest holds two assertions. The first is the standard **actions** assertion (`c2pa.actions.v2`), which C2PA validators show:

| Field             | Value                                                                                                                                                                                                                                           |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| action            | c2pa.created, or c2pa.opened then c2pa.edited when the run edited a file; then c2pa.watermarked when the file carries Layer’s watermark                                                                                                         |
| digitalSourceType | trainedAlgorithmicMedia for content made from a prompt and references, compositeWithTrainedAlgorithmicMedia when the run altered existing content (an edit, a mask, or an input the output is built on, such as an init image or a first frame) |
| softwareAgent     | the model’s name                                                                                                                                                                                                                                |
| when              | when the file was created                                                                                                                                                                                                                       |
| description       | Generated with <model> on Layer. or Edited with <model> on Layer.                                                                                                                                                                               |

The second, `ai.layer.generation`, records the generation:

| Field                        | Value                                      |
| ---------------------------- | ------------------------------------------ |
| software, generated\_by      | Layer                                      |
| generation\_timestamp        | when the file was created                  |
| model\_name, base\_model\_id | the model that made it                     |
| alters\_source               | true when the run altered existing content |
| seed                         | the run’s seed, if it had one              |
| style\_names                 | the styles applied                         |
| workspace\_id                | the workspace that made it                 |
| session\_id                  | the session the file belongs to, if any    |
| inference\_id                | the run that made it                       |
| refinements\_applied         | the refinements an export applied          |

No user ID, prompt or account detail is embedded.

### Inputs and edits

The files a run is built on are **ingredients** of its output’s manifest: the file an edit opens is the claim’s parent, and the run’s other inputs (reference images, init images, first and last frames, and so on, up to 10) are listed as inputs to the model. An input that carries its own manifest brings it along, so an edit of a Layer output shows the manifest of the file it was edited from, and that file’s inputs before it.

When the model’s provider signed its own manifest into the output (OpenAI, Google, Black Forest Labs and fal do for some models), Layer keeps it as an ingredient of Layer’s manifest, so a validator shows both.

### Formats

| Format                                  | Manifest                                   | Watermark                                |
| --------------------------------------- | ------------------------------------------ | ---------------------------------------- |
| PNG, JPEG, WebP                         | yes                                        | yes                                      |
| GIF, TIFF, AVIF, SVG                    | yes                                        | no                                       |
| MP4, MOV                                | yes                                        | yes                                      |
| WebM                                    | no: the format has no place for one        | yes, except a WebM with an alpha channel |
| WAV, FLAC, MP3, M4A                     | yes                                        | yes                                      |
| AAC                                     | yes, repackaged as M4A without re-encoding | yes                                      |
| PSD, 3D models, playables, ZIP archives | no                                         | no                                       |

### Exports

An export that re-encodes a file is signed again, keeping the original’s ingredients, the provider’s manifest and the same created or edited actions. An export that passes the file through unchanged keeps its manifest.

Caution

A manifest is bound to the file’s exact bytes. Re-encoding, resizing or re-saving a file outside Layer breaks that binding, and many tools and platforms strip metadata altogether. The invisible watermark is what survives that.

### Signing and trust

Layer signs with an ES256 key held in a cloud key management service, under a certificate issued to `O=Layer AI, Inc.`, `CN=layer.ai`. Every manifest carries an RFC 3161 time stamp from a time-stamp authority on the C2PA trust list, so it stays valid after the certificate expires.

Layer is not yet on the C2PA trust list. Validators therefore show Layer’s manifests as valid but with an untrusted signing credential (`signingCredential.untrusted`).

Signing is best effort: if it fails, the run still completes and the file is delivered unsigned.

## The invisible watermark

A watermark is embedded in the content itself, so it still marks the file as AI-generated after its metadata is stripped or the file is re-saved. Each kind of media uses an open-source model:

| Media | Model                                                                  | Carries                                                       |
| ----- | ---------------------------------------------------------------------- | ------------------------------------------------------------- |
| Image | [TrustMark](https://github.com/adobe/trustmark) (variant Q)            | the file’s 40-bit watermark ID, with error correction         |
| Video | [Video Seal](https://github.com/facebookresearch/videoseal) (rgb\_96b) | the file’s 40-bit watermark ID and a Layer tag                |
| Audio | [AudioSeal](https://github.com/facebookresearch/audioseal)             | a Layer tag only: it says Layer made the file, not which file |

A file’s **watermark ID** is the first 5 bytes (40 bits) of the SHA-256 digest of its file ID’s 16 bytes, read as 10 hex digits:

```python
import hashlib, uuid


watermark_id = hashlib.sha256(uuid.UUID(file_id).bytes).digest()[:5].hex()
```

The watermark is imperceptible but not indestructible. In Layer’s tests, an image’s mark survives JPEG at quality 70, a half-size resize and a 90% crop; audio’s survives MP3 at 128 kbps; video’s survives light re-encoding, but heavy recompression loses it.

What watermarking keeps of a file:

* **Images** keep their format, size, color profile, EXIF and alpha channel. A JPEG is saved at quality 95, a lossless WebP stays lossless, and grayscale and palette images come back as RGB.
* **Videos** keep their container, codec family, frame timing and audio, which is copied untouched. Frames are re-encoded at high quality.
* **Audio** keeps its format, sample rate, channels and bit rate. WAV and FLAC stay lossless; MP3 and AAC are re-encoded.

### Turn the watermark on

`invisible_watermark_enabled` is a workspace control: only a workspace’s [AI policy](/docs/ai-policies) sets it, on every plan, and it covers every generation in the workspace and in the workspaces under it. It is off by default. Turn it on with a patch:

```bash
curl -X PATCH https://api.app.layer.ai/api/v2/workspaces/$WORKSPACE_ID/ai-policy \
  -H "Authorization: Bearer $LAYER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "invisible_watermark_enabled": { "value": true, "locked": true } }'
```

Locking it keeps a workspace under this one from turning it off. To turn it off, patch it to `false`, or to `null` to inherit it again; neither takes effect while a workspace above locks it on. A `PUT` replaces every control the workspace sets, and one it leaves out is inherited again, so prefer a patch.

It takes the settings admin permission and an access token with the `workspace:write` scope. The app has no switch for it yet.

Note

The watermark is best effort too. An output in a format it does not mark, or one it cannot mark before the run’s deadline, is delivered without it, and the run still completes. A file’s manifest says whether it was marked: look for the `c2pa.watermarked` action.

## Check a file

Layer runs no verifier of its own. Use the public tools its marks are made with:

| Mark            | Check it with                                                                                                                                                                            |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| C2PA manifest   | [Content Credentials Verify](https://contentcredentials.org/verify), or [c2patool](https://github.com/contentauth/c2pa-rs) and [c2pa-python](https://github.com/contentauth/c2pa-python) |
| Image watermark | [TrustMark](https://github.com/adobe/trustmark), variant Q                                                                                                                               |
| Video watermark | [Video Seal](https://github.com/facebookresearch/videoseal), the rgb\_96b model                                                                                                          |
| Audio watermark | [AudioSeal](https://github.com/facebookresearch/audioseal), the detector\_base model                                                                                                     |

A detector says whether a file carries a mark of its kind. A video’s or an audio file’s mark carries Layer’s tag, so finding it shows Layer marked the file. An image’s mark is the bare 40-bit ID with no Layer tag, so TrustMark reads an ID from an image anyone marked with the same variant: an ID shows Layer marked the image only when it matches the watermark ID of a Layer file, which you can compute from the file IDs your workspace holds.
