# Marking API

> widar marks AI output for the EU AI Act and California's AI Transparency Act: an invisible watermark and a signed C2PA credential on text, images, audio and video, in one API, by Bynn Intelligence.

Documentation index: https://widar.com/llms.txt

The examples in these docs use invented companies, such as Lumen Labs B.V., and invented values: none is a real check, mark, signature or certificate.

Section: Mark and sign. URL: https://widar.com/docs/marking

The marking call that marks, signs and timestamps an output in one answer, with marking volume and the failures to act on. The output is processed in memory and never kept.

Updated December 3, 2026

Send the generated file as the request body with the system's id. The answer is the same file, marked, signed and timestamped, its ids in the headers. Every output that could not be marked is a marking failure with its reason, and `marking.failed` is sent. The record of each marked output is a [mark record](https://widar.com/docs/mark-records).

**The answer**

```
HTTP/1.1 201 Created
Content-Type: image/png
Widar-Mark-Id: mrk_2Xq9vBn4LsKe
Widar-Manifest-Id: mft_8Wc3jRt6NyPa
Widar-Timestamp-Id: tst_4Hd7kMq1ZvBx
X-Request-Id: req_9Vb3nKs7QwLx

<the marked and signed image>
```

## Mark an output

Mark, sign and timestamp a file through the cloud API in one call. The file is marked in memory and never kept.

`POST /v1/markings`. Who may: Owner, Admin, Compliance and Developer. CLI: `widar markings create <file> --system-id <sys_...> [--mode <live|test>] [--check]`. MCP tool: `create_marking`.

**Parameters**
- `system_id` (id (sys_), required): The system that made the output. In the query.
- `content_type` (enum, required): What the file is: `image`, `audio`, `video`, or `text` for a PDF.
- `format` (string, required): The file's media type, such as `image/png`, as sent in `Content-Type`.
- `file_name` (string, required): The output's file name, as its credential and mark record name it. At most 200 characters.
- `size_bytes` (integer, required): The file's size in bytes, up to 500 MiB. A longer video goes through the sidecar.
- `mode` (enum): `live` or `test`. The key's own mode when left out; a test key marks in test mode only.
- `check` (boolean, default false): Also check the marked output, and answer what that check finds beside the mark record.

**Returns** marking: The mark record, its manifest and timestamp, the chain it was signed under, and with check what a check of the marked output finds. The marked file is the body of the API's answer.

API:

```bash
curl -X POST https://api.widar.com/v1/markings \
  -H "Authorization: Bearer $WIDAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "system_id": "sys_4kT9qWm2RbXe",
    "content_type": "image",
    "format": "image/png",
    "file_name": "output.png",
    "size_bytes": 2418706
  }'
```

CLI:

```bash
widar markings create --system-id sys_4kT9qWm2RbXe
```

MCP tool `create_marking`:

```json
{
  "name": "create_marking",
  "arguments": {
    "system_id": "sys_4kT9qWm2RbXe",
    "content_type": "image",
    "format": "image/png",
    "file_name": "output.png",
    "size_bytes": 2418706
  }
}
```

Response, 201 Created:

```json
HTTP/1.1 201 Created
Content-Type: image/png
Widar-Mark-Id: mrk_2Xq9vBn4LsKe
Widar-Manifest-Id: mft_8Wc3jRt6NyPa
Widar-Timestamp-Id: tst_4Hd7kMq1ZvBx
X-Request-Id: req_9Vb3nKs7QwLx

<the marked and signed image>
```

## Read marking volume

Outputs marked per day by system, content type and path, outputs left unmarked by the classifier, failures, and installs not reporting.

`GET /v1/marking/stats`. Who may: Owner, Admin, Compliance, Developer and Viewer. CLI: `widar marking stats [--system-id <sys_...>] [--content-type <text|image|audio|video>] [--path <plugin|cloud_api|sidecar|self_hosted>] [--days <1-90>]`. MCP tool: `get_marking_stats`.

**Parameters**
- `system_id` (id (sys_)): Only this system.
- `content_type` (enum): The content type. One of `text`, `image`, `audio`, `video`.
- `path` (enum): The path. One of `plugin`, `cloud_api`, `sidecar`, `self_hosted`.
- `days` (integer, default 30): How many days back, 1 to 91.

**Returns** marking stats: Each day's counts, the totals, the outputs left unmarked by rule, the open failures and the installs not reporting.

API:

```bash
curl -X GET "https://api.widar.com/v1/marking/stats?days=7" \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar marking stats --days 7
```

MCP tool `get_marking_stats`:

```json
{
  "name": "get_marking_stats",
  "arguments": {
    "days": 7
  }
}
```

## List marking failures

Every output that could not be marked, with the reason in plain words and what happened to the output.

`GET /v1/marking_failures`. Who may: Owner, Admin, Compliance, Developer and Viewer. CLI: `widar marking-failures list [--system-id <sys_...>] [--resolved <true|false>] [--reason-code <format_not_supported|content_too_large|key_fetch_refused|signer_unavailable|timestamp_unavailable|install_out_of_date|file_unreadable>] [--limit <n>]`. MCP tool: `list_marking_failures`.

**Parameters**
- `system_id` (id (sys_)): Only this system's failures.
- `resolved` (boolean): The resolved.
- `reason_code` (enum): The reason code. One of `format_not_supported`, `content_too_large`, `key_fetch_refused`, `signer_unavailable`, `timestamp_unavailable`, `install_out_of_date`, `file_unreadable`.
- `limit` (integer): The limit. At least 1, at most 200.

**Returns** list of marking failures: The failures, newest first, each with its system, content type, path, install, time, reason, the output's hash when known and whether it is resolved.

API:

```bash
curl -X GET https://api.widar.com/v1/marking_failures \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar marking-failures list
```

MCP tool `list_marking_failures`:

```json
{
  "name": "list_marking_failures",
  "arguments": {}
}
```

Response, 200 OK:

```json
{
  "items": [
    {
      "id": "mfl_9Ns2cPw5RtLm",
      "object": "marking_failure",
      "system_id": "sys_4kT9qWm2RbXe",
      "content_type": "image",
      "path": "cloud_api",
      "install_id": null,
      "at": "2026-12-03T08:30:11Z",
      "reason_code": "format_not_supported",
      "reason": "The output was an animated GIF. The policy refuses formats it cannot sign, so the image was held back.",
      "output_hash": "6f8a1289ae8950f8500f44da340e0166ec560395b545ab9d4bd018820024e075",
      "outcome": "held",
      "resolved_at": null,
      "resolved_by": null,
      "note": null
    }
  ],
  "next_cursor": null
}
```

## Resolve a marking failure

Mark a failure resolved once its cause is fixed, with a note on what was done.

`POST /v1/marking_failures/{failure_id}/resolve`. Who may: Owner, Admin, Compliance and Developer. CLI: `widar marking-failures resolve <failure_id> --note <text>`. MCP tool: `resolve_marking_failure`.

**Parameters**
- `failure_id` (id (mfl_), required): The failure. In the path.
- `note` (string, required): What was done. At most 1,000 characters.

**Returns** marking failure: The failure, resolved, with who resolved it, when and the note.

API:

```bash
curl -X POST https://api.widar.com/v1/marking_failures/mfl_9Ns2cPw5RtLm/resolve \
  -H "Authorization: Bearer $WIDAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "note": "GIF output removed from the editor'\''s export menu."
  }'
```

CLI:

```bash
widar marking-failures resolve mfl_9Ns2cPw5RtLm \
  --note 'GIF output removed from the editor'\''s export menu.'
```

MCP tool `resolve_marking_failure`:

```json
{
  "name": "resolve_marking_failure",
  "arguments": {
    "failure_id": "mfl_9Ns2cPw5RtLm",
    "note": "GIF output removed from the editor's export menu."
  }
}
```

## Export marking volume

The same days as the marking stats, one line per day, system, content type and path, as CSV.

`GET /v1/marking/export`. Who may: Owner, Admin, Compliance, Developer and Viewer. CLI: `widar marking export [--system-id <sys_...>] [--content-type <text|image|audio|video>] [--path <plugin|cloud_api|sidecar|self_hosted>] [--days <1-90>] [--output <marking.csv>]`. MCP tool: `export_marking_stats`.

**Parameters**
- `system_id` (id (sys_)): The system's id.
- `content_type` (enum): The content type. One of `text`, `image`, `audio`, `video`.
- `path` (enum): The path. One of `plugin`, `cloud_api`, `sidecar`, `self_hosted`.
- `days` (integer, default 30): The days. At least 1, at most 90.

**Returns** CSV file: The days, one line per day, system, content type and path, with outputs marked, left unmarked by rule, failed and text tokens marked.

API:

```bash
curl -X GET https://api.widar.com/v1/marking/export \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar marking export
```

MCP tool `export_marking_stats`:

```json
{
  "name": "export_marking_stats",
  "arguments": {}
}
```

## Read a marking failure

One output that could not be marked: the reason, what happened to the output, the install, and who resolved it with which note.

`GET /v1/marking_failures/{failure_id}`. Who may: Owner, Admin, Compliance, Developer and Viewer. CLI: `widar marking-failures get <failure_id>`. MCP tool: `get_marking_failure`.

**Parameters**
- `failure_id` (id (mfl_), required): The failure's id. In the path.

**Returns** marking failure: The failure, with its reason, the output's hash when known, what happened to the output and its resolution.

API:

```bash
curl -X GET https://api.widar.com/v1/marking_failures/mfl_7Kq2Xw9 \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar marking-failures get mfl_7Kq2Xw9
```

MCP tool `get_marking_failure`:

```json
{
  "name": "get_marking_failure",
  "arguments": {
    "failure_id": "mfl_7Kq2Xw9"
  }
}
```
