# Classify

> 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: Comply and prove. URL: https://widar.com/docs/classify

What gets marked and why. The classifier leaves source code and machine-only output unmarked, marks prose and media, and records the class and the rule of every output it skips.

Updated December 3, 2026

Output classes

| Class | By default | Why |
| --- | --- | --- |
| `prose` | Marked | Text for people, wherever it sits: an answer, an email body inside a tool call, an article inside JSON. |
| `media` | Marked | Images, audio and video. |
| `unclear` | Marked | Anything the classifier cannot place is marked, and recorded as unclear. |
| `source_code` | Left unmarked | Code a program runs. In a prose answer, fenced code blocks are left unmarked and the prose around them is marked. |
| `machine_only` | Left unmarked | Output no person sees, by your declaration per system, endpoint or call, with a reason and the control that keeps it from people. A declared output that reads as prose for people is still marked. |

- The classifier is on for every new system. Turning it off marks every output.
- Length is never a rule: a short answer is marked like a long one.
- An enforced JSON schema or grammar always wins: marking never breaks the structure your call asked for.
- Each skipped output is counted, by class and rule, and with records on, recorded without its content. A mark record carries `output_class` and `marked_portion`.
- The rules live in the system's [policy](https://widar.com/docs/policies); every change is a new version.

## Classify a sample

The output class of a pasted text under a system's policy, and whether it would be marked. Nothing of the text is kept.

`POST /v1/classifications`. Who may: Owner, Admin, Compliance, Developer and Viewer. CLI: `widar classifications create <file> --system-id <sys_...> [--policy-version <version>]`. MCP tool: `classify_sample`.

**Parameters**
- `system_id` (id (sys_), required): The system whose policy decides.
- `text` (string, required): The output to classify, up to 1 MiB.
- `policy_version` (integer): a version to try; the one in force when left out At least 1.

**Returns** classification: The class (source code, machine-only, prose, media, unclear), whether it would be marked (whole, partly, none) and the rule applied.

API:

```bash
curl -X POST https://api.widar.com/v1/classifications \
  -H "Authorization: Bearer $WIDAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "system_id": "sys_8Hn3vLp6YdQa",
    "text": "Here is the fix:\n\n```python\nprint(total)\n```\n\nIt prints the sum once the loop ends."
  }'
```

CLI:

```bash
widar classifications create --system-id sys_8Hn3vLp6YdQa
```

MCP tool `classify_sample`:

```json
{
  "name": "classify_sample",
  "arguments": {
    "system_id": "sys_8Hn3vLp6YdQa",
    "text": "Here is the fix:\n\n```python\nprint(total)\n```\n\nIt prints the sum once the loop ends."
  }
}
```

Response, 200 OK:

```json
{
  "object": "classification",
  "system_id": "sys_8Hn3vLp6YdQa",
  "policy_version": 1,
  "output_class": "prose",
  "marked_portion": "partly",
  "rule": "Code blocks inside a prose answer are left unmarked; the prose around them is marked."
}
```
