Skip to content

SGLang watermark plugin

Marks the responses your SGLang servers generate, for EU AI Act Article 50: each request names the plugin's processor. Prompts and outputs stay on your servers.

$ export WIDAR_PLUGIN_KEY="$(cat /run/secrets/widar_plugin_key)"$ python -m sglang.launch_server --model-path Qwen/Qwen3-8B --port 30000 \    --enable-custom-logit-processor
Give the SGLang plugin its key and generate with marking on

Check text from Northwind Gateway

widar.com/verify/northwind-gateway

Example

Pasted text, 412 characters

Feed it as usual, let it rise for about an hour, then put it in the fridge in a jar with a loose lid. Cold slows the yeast down, so a fed starter keeps for four or five days without another feeding. When you are back, take it out, discard all but a few spoonfuls and feed it twice at room temperature before you bake. A layer of grey liquid on top is normal: pour it off or stir it in.

  • widar watermark

    Found

    Northwind Gateway by Northwind Inference GmbH

  • C2PA credential

    Not checked

    Plain text carries no credential

Checked and not keptDownload the signed result
An example for Northwind Inference GmbH, an invented company.

Install, configure, verify

Three steps, in test mode first. Move to a live plugin key when your plan starts.

  1. 1

    Install

    The plugin comes with your widar workspace: widar's sales team provides it. Add it to the environment SGLang runs in.

    widar for SGLangVersion 0.1.0Talk to sales

  2. 2

    Configure

    Create a plugin key for your system, set it as WIDAR_PLUGIN_KEY, then start your server. A plugin key only fetches and reports for one system, and can never call the rest of the API.

    $ widar plugin-keys create --system-id sys_oo6upwmn8u4g --name "sglang-fleet"$ export WIDAR_PLUGIN_KEY="$(cat /run/secrets/widar_plugin_key)"$ python -m sglang.launch_server --model-path Qwen/Qwen3-8B --port 30000 \    --enable-custom-logit-processor
    Create a plugin key for the system, give it to the plugin and start the server
  3. 3

    Verify

    Ask your server for an answer and check it. The finding names your system and your company.

    $ python - > answer.txt <<'EOF'import requestsfrom widar_sglang import WidarLogitProcessorr = requests.post("http://localhost:30000/generate", json={    "text": "How should I store a sourdough starter over a long weekend?",    "sampling_params": {        "temperature": 0.8,        "max_new_tokens": 300,        "custom_params": {"widar": {}},    },    "custom_logit_processor": WidarLogitProcessor().to_str(),})print(r.json()["text"])EOF$ widar verifications create answer.txt
    Ask for an answer and check it

What a check of an answer shows

An example for Northwind Inference GmbH, an invented company: an answer from its SGLang servers running the plugin, and what a check of it finds.

Prompt

How should I store a sourdough starter over a long weekend?

Answer

Feed it as usual, let it rise for about an hour, then put it in the fridge in a jar with a loose lid. Cold slows the yeast down, so a fed starter keeps for four or five days without another feeding. When you are back, take it out, discard all but a few spoonfuls and feed it twice at room temperature before you bake. A layer of grey liquid on top is normal: pour it off or stir it in.

Check text from Northwind Gateway

widar.com/verify/northwind-gateway

Also in Deutsch

Pasted text

412 characters, sha256 c03b7d99…e2a1f640

Example

Findings

  • widar watermark

    Found

    Northwind Gateway by Northwind Inference GmbH

  • C2PA credential

    Not checked

    Plain text carries no credential

Checked and not keptDownload the signed resultReport a wrong result
An example for Northwind Inference GmbH, an invented company.

The same check by machine

Save the answer and check it from the CLI, the API or an agent's MCP client. The findings come back as JSON: what was found, who made it and when.

  • The text is checked and not kept.
  • The system's verify page and its API are free to every caller.
  • A text with nothing readable gets No mark found. This does not mean a person made it.
$ widar verifications create answer.txt

Example answer, for an invented company

{
  "object": "verification",
  "mode": "live",
  "content_type": "text",
  "findings": [
    {
      "kind": "widar_watermark",
      "outcome": "found",
      "who": {
        "system": "Northwind Gateway",
        "customer": "Northwind Inference GmbH"
      }
    },
    { "kind": "c2pa_credential", "outcome": "not_checked" }
  ]
}
Check the saved answer

Requirements and model families

What the plugin needs to run, as its version 0.1.0 declares it.

Requirements and model families
ComponentVersion
SGLang0.4.8 or later
Python3.9 or later

Model families

Any text-generating model SGLang serves.

Works with

  • Streaming and whole responses
  • Many requests in one batch
  • Structured output: a JSON schema keeps its structure

What leaves your servers

The plugin talks to widar's API only, and only about counts and health.

What leaves your servers
WhatTo widar
PromptsNever
ResponsesNever
Tokens marked, requests left unmarked and whyCounts, each minute
Plugin and engine versions, healthEach minute
Your system's keys and policyFrom widar, at start and within 15 minutes of a change

Every server in the console

The installs view shows each server's versions and health, and flags an install that falls behind.

Northwind Gateway

Example: Northwind Inference GmbH, an invented company

5 of 5 reporting
InstallEnginePluginStateMarked, 24 h
nw-vllm-1.fra1vLLM 0.10.20.1.0Reporting213,100
nw-vllm-2.fra1vLLM 0.10.20.1.0Reporting216,200
nw-vllm-3.fra1vLLM 0.10.20.1.0Reporting219,300
nw-sglang-4.hel1SGLang 0.4.80.1.0Reporting222,400
nw-sglang-5.hel1SGLang 0.4.80.1.0Reporting225,500
Left unmarked by rule, 24 h: 318,500
An example for Northwind Inference GmbH, an invented company: Northwind Gateway, three vLLM pods and two SGLang pods, one plugin key

Questions about the SGLang plugin

  • Slightly. Start the server with --enable-custom-logit-processor, and send the plugin's processor with each request in custom_logit_processor. Every other argument works as before.

  • No. It fetches the system's keys and policy when it starts and reports usage counts each minute. A rotated key is in use within 15 minutes.

  • A plugin key (wd_plg_) made for one system. It fetches and reports for that system only. A full API key does not start the plugin.

  • Source code in fenced code blocks, output you declare as machine-only, and output held to a grammar. A JSON schema keeps its structure. Each output left unmarked is counted with the rule that left it.

  • By default it refuses to serve unmarked answers, and widar sends marking.failed. A policy can let it serve them unmarked instead, counted one by one.

Get a test plugin key

Create a free account and mark your first response in test mode, or talk to sales about Enterprise and the self‑hosted edition.

For agents

What this page answers

An SGLang watermark plugin for EU AI Act Article 50: mark every completion SGLang serves in a few lines, then install, configure and verify it.

Updated .

my-app · Claude Code

Set up widar for me: fetch https://widar.com/agent-setup.md and follow it.

Paste into any coding agent

Works withClaude CodeCodexGemini CLIGrok Build

Start without a browser

Sign up by API, no key
curl -X POST https://api.widar.com/v1/signups -H "Content-Type: application/json" -d '{"email":"you@example.com","workspace_name":"Your company"}'
Then send the emailed code
curl -X POST https://api.widar.com/v1/signups/{signup_id}/verify -H "Content-Type: application/json" -d '{"code":"<the code>"}'
Sign in with the CLI (it comes with a widar workspace)
widar auth login
Key variable
WIDAR_API_KEY
Read marking volume by API
curl -X GET https://api.widar.com/v1/marking/stats?days=30 -H "Authorization: Bearer $WIDAR_API_KEY"

This page by API, CLI and MCP

List installs with the CLI
widar installs list
List installs with the MCP tool
list_installs {}