Detect LLM text watermark evidence: green-list z-test for a key you hold, plus invisible-character markers

$0.005 USDC per call · Agent infrastructure · POST /api/v1/llm-watermark-detector · Id llm-watermark-detector

Tests whether text carries watermark evidence, for a pipeline that must decide whether to trust or label content. Two independent checks: (1) a green-list z-test (Kirchenbauer et al. 2023) over green flags you supply, or over token ids and a key using this endpoint's own HMAC-SHA256 scheme, returning the z-score and exact binomial p-value; (2) an invisible-character scan of the text for zero-width characters, Unicode tag characters (which spell hidden ASCII), variation selectors and bidi controls, with offsets. It cannot detect a vendor watermark without that vendor's key and tokenizer, never recovers a key, and does not remove or alter anything. A pass means no evidence at this threshold, not that the text is human-written; paraphrase can erase a statistical watermark.

What you get

Cheap deterministic provenance gate before content is accepted or labelled; also catches hidden tag-character payloads that may be injected instructions.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/llm-watermark-detector. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/llm-watermark-detector \
  -H 'content-type: application/json' \
  -d '{"text":"Quarterly summary: revenue rose.​​","greenFlags":[1,1,0,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1]}'

Input

FieldTypeRequiredDescription
textstring; length 1..100000noText to scan for invisible markers.
greenFlagsarray<integer; 0..1>; max 100000 itemsnoOne 0/1 per scored token: 1 when your own detector's green list contains the token. Deduplicate repeated n-grams yourself if your scheme requires it.
tokenIdsarray<integer; 0..2147483647>; max 5000 itemsnoToken ids in order (at most 5000). Green membership is computed from the key with the hmac-sha256-green-1 scheme; each distinct consecutive pair is scored once.
keystring; length 1..256noSecret key for tokenIds. Used for this call only and never stored or echoed.
schemestring; one of "hmac-sha256-green-1"noScheme for tokenIds; default and only value.
gammanumber; 0.01..0.99noExpected green fraction under no watermark. Default 0.25.
zThresholdnumber; 1..10noz at or above which the result is fail. Default 4 (Kirchenbauer et al.).
minTokensinteger; 5..1000noFewer scored tokens than this is unknown. Default 25.

Example request body

{
  "text": "Quarterly summary: revenue rose.​​",
  "greenFlags": [
    1,
    1,
    0,
    1,
    1,
    1,
    0,
    1,
    1,
    1,
    1,
    0,
    1,
    1,
    1,
    1,
    0,
    1,
    1,
    1,
    1,
    1,
    0,
    1,
    1,
    1,
    1,
    1,
    0,
    1
  ]
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
checksRunarray<string; one of "statistical", "invisible">; max 2 itemsno
statisticalone ofno
invisibleone ofno
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the context-evidence-kit package.

Machine-readable