# Plugins for text

> 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/mark/plugins

A plugin for vLLM, SGLang or Hugging Face Transformers marks every response your server generates, streamed or not. Prompts and outputs never leave your servers; widar receives usage counts.

Updated December 3, 2026

## Create a plugin key

A plugin key belongs to one text system and may only fetch its keys and report usage. Create one in the console (Developers, then Plugin keys) or by API. It is shown once.

CLI:

```bash
widar plugin-keys create --system-id sys_8Hn3vLp6YdQa --name "vLLM fleet ams1"
```

API:

```bash
curl -X POST https://api.widar.com/v1/plugin_keys \
  -H "Authorization: Bearer $WIDAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"system_id": "sys_8Hn3vLp6YdQa", "name": "vLLM fleet ams1"}'
```

## Get the plugin

The plugins come with a widar workspace: [widar's sales team](https://widar.com/contact) provides them, with a guide for your engine. One plugin per engine, on Python 3.9 or later: vLLM 0.10.2 or later, SGLang 0.4.8 or later, Hugging Face Transformers 4.50 or later.

## Start your server with the key

Set `WIDAR_PLUGIN_KEY` on the server and add the plugin where your model generates, as its guide shows: one flag on `vllm serve`; for SGLang, custom logit processors switched on and the plugin's processor named in each request; for Transformers, the plugin's `generate` in place of `generate()`. The plugin registers the install and starts marking. The policy and the classifier rules come from widar.

```bash
export WIDAR_PLUGIN_KEY=wd_plg_ptQE28XYkSjJEh2XRndeENGSTzrwJkOmfVjWC33f
```

## Check one response

Send a response your server generated to a check. The finding names your system and company.

```bash
curl -s localhost:8000/v1/completions \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Write a short welcome note.", "max_tokens": 200}' \
  | jq -r ".choices[0].text" > reply.txt

widar verifications create --text "$(cat reply.txt)"
```

## What the plugin does

- Marks every response as your server generates it, streamed or not, with the same result either way: retries, several completions per request and regenerations are all marked.
- Applies the system's classifier rules: in a prose answer, fenced code blocks are left unmarked and the prose around them is marked. An enforced JSON schema or grammar is never broken.
- Pins the key and the policy version at the start of each request, so a request is never marked half one way and half another.
- Reports usage every minute: outputs and tokens marked, outputs skipped by reason, its version and its health. Never a prompt or an output.
- Picks up a rotated key or a new policy within 15 minutes, without a restart.

## When it cannot mark

If the plugin cannot fetch its keys (the plugin key was revoked, or the plan ended) or meets a request it cannot mark, the policy decides: fail closed (the default) refuses the request with an error your server returns; fail open serves it unmarked and counts it. Either way widar sends `marking.failed`.

## Watch your installs

Each running plugin is an install, with its host label, engine and version, when it last reported and its usage in the last 24 hours. An install silent for 24 hours is marked not reporting and sends `install.not_reporting`. See [Installs](https://widar.com/docs/installs).

**An install**

```json
{
  "id": "ins_6Tm3pVz8KwQd",
  "object": "install",
  "system_id": "sys_8Hn3vLp6YdQa",
  "kind": "vllm",
  "host_label": "lumen-chat-pod-1.ams1",
  "runtime": "vLLM 0.10.2",
  "version": "0.1.0",
  "latest_version": "0.1.0",
  "state": "reporting",
  "first_seen_at": "2026-11-19T10:31:00Z",
  "last_seen_at": "2026-12-03T09:41:00Z",
  "usage_24h": {
    "outputs_marked": 48213,
    "tokens_marked": 13547853,
    "skipped": 2216
  },
  "plugin_key_id": "key_5Lr8wNc2QxTj"
}
```
