78trust / 100

Corpus Overlap

by text.halowerk.com in Documents & files

x402 APIPassing, checked 7 h ago

Find text reused from a supplied corpus: overlapping passages with character offsets in both texts, plus containment and Jaccard resemblance of word shingles per corpus document. Text reuse detection with word shingles (Broder 1997): text and corpus documents are segmented into words (Unicode, NFKC, lower case); every run of n words (default 5) is hashed (32-bit FNV-1a) and compared through a hash index of the text.

POST
https://text.halowerk.com/v1/corpus-overlap
Price
$0.004
per call in USDC
Uptime
98.4%
last 30 days
Response time
137 ms
241 ms slowest 5%
Last check
Passed
7 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://text.halowerk.com/v1/corpus-overlap

Each call costs $0.004 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://text.halowerk.com/v1/corpus-overlap
content-type: application/json

{
  "corpus": [
    {
      "id": "muster",
      "text": "Diese Seite erläutert, wie wir personenbezogene Daten verarbeiten und welche Rechte Sie haben, wenn Sie unseren Dienst nutzen."
    }
  ],
  "text": "Die Datenschutzerklärung erläutert, wie wir personenbezogene Daten verarbeiten und welche Rechte Sie haben."
}

Parameters

ParameterTypeRequiredDescription
corpusarray of objectYes
max_passages_per_documentintegerNo Default: 20.
min_passage_wordsintegerNo Default: 8.
shingle_wordsintegerNo Default: 5.
textstringYes

Example response

The provider's example. We can't check it without paying.

Example response, 42 lines
{
  "limitations": [
    "Detects verbatim and near-verbatim reuse (identical runs of n words); paraphrases are not found — use paraphrase-pairs or quote-in-source for that.",
    "No web or database search; only the supplied corpus is compared."
  ],
  "result": {
    "coverage": {
      "covered_words": 11,
      "share": 0.8462,
      "text_words": 13
    },
    "documents": [
      {
        "containment_of_document": 0.5,
        "containment_of_text": 0.7778,
        "coverage_of_text": 0.8462,
        "covered_text_words": 11,
        "id": "muster",
        "jaccard": 0.4375,
        "passages": [
          {
            "document_end": 93,
            "document_start": 12,
            "excerpt": "erläutert, wie wir personenbezogene Daten verarbeiten und welche Rechte Sie haben",
            "text_end": 106,
            "text_start": 25,
            "words": 11
          }
        ],
        "passages_total": 1,
        "shared_shingles": 7
      }
    ],
    "params": {
      "hashing": "32-bit FNV-1a over normalised words, collisions verified",
      "min_passage_words": 8,
      "shingle_words": 5
    }
  },
  "service": "corpus-overlap",
  "status": "success"
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.004.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://text.halowerk.com/v1/corpus-overlap' \
  -H 'content-type: application/json' \
  --data-raw '{"corpus":[{"id":"muster","text":"Diese Seite erl\u00e4utert, wie wir personenbezogene Daten verarbeiten und welche Rechte Sie haben, wenn Sie unseren Dienst nutzen."}],"text":"Die Datenschutzerkl\u00e4rung erl\u00e4utert, wie wir personenbezogene Daten verarbeiten und welche Rechte Sie haben."}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://text.halowerk.com/v1/corpus-overlap' \
  -H 'content-type: application/json' \
  --data-raw '{"corpus":[{"id":"muster","text":"Diese Seite erl\u00e4utert, wie wir personenbezogene Daten verarbeiten und welche Rechte Sie haben, wenn Sie unseren Dienst nutzen."}],"text":"Die Datenschutzerkl\u00e4rung erl\u00e4utert, wie wir personenbezogene Daten verarbeiten und welche Rechte Sie haben."}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.004 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.004" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.004 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Ftext.halowerk.com%2Fv1%2Fcorpus-overlap&method=POST
const res = await pay("https://text.halowerk.com/v1/corpus-overlap", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "corpus": [
      {
        "id": "muster",
        "text": "Diese Seite erl\u00e4utert, wie wir personenbezogene Daten verarbeiten und welche Rechte Sie haben, wenn Sie unseren Dienst nutzen."
      }
    ],
    "text": "Die Datenschutzerkl\u00e4rung erl\u00e4utert, wie wir personenbezogene Daten verarbeiten und welche Rechte Sie haben."
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.004 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.004"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://text.halowerk.com/v1/corpus-overlap",
        json={
            "corpus": [
                {
                    "id": "muster",
                    "text": "Diese Seite erl\u00e4utert, wie wir personenbezogene Daten verarbeiten und welche Rechte Sie haben, wenn Sie unseren Dienst nutzen.",
                },
            ],
            "text": "Die Datenschutzerkl\u00e4rung erl\u00e4utert, wie wir personenbezogene Daten verarbeiten und welche Rechte Sie haben.",
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
7 h agoPassed402119 ms$0.004
17 h agoPassed402128 ms$0.004
28 h agoPassed402111 ms$0.004
38 h agoPassed4021.3 s$0.004
2 days agoPassed40245 ms$0.004
Show 10 older checks
2 days agoPassed402118 ms$0.004
3 days agoPassed40253 ms$0.004
3 days agoPassed40240 ms$0.004
5 days agoTimed out---
7 days agoPassed402137 ms$0.004
7 days agoPassed40238 ms$0.004
8 days agoPassed40238 ms$0.004
8 days agoPassed40240 ms$0.004
8 days agoPassed402117 ms$0.004
9 days agoPassed40239 ms$0.004