Skip to content
Fourohtwo

Compute similarity between two texts

api.kakerapetit.dev/v1/text/similarity

Compute similarity between two texts. Returns Jaccard, Dice, cosine and overlap scores for two strings. Use to deduplicate documents, match names or titles, and detect near-identical text.

BaseAnswering
POSThttps://api.kakerapetit.dev/v1/text/similarity

Uptime100% of 2 checks in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://api.kakerapetit.dev/v1/text/similarity", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"text_a":"The quick brown fox jumps over the lazy dog","text_b":"A quick brown fox jumped over a lazy dog"}),
});
console.log(await res.json());

Example input

{
  "text_a": "The quick brown fox jumps over the lazy dog",
  "text_b": "A quick brown fox jumped over a lazy dog"
}

More from KakerapetitProvider status