# Text Similarity Scorer

> Text Similarity Scorer is a paid API for AI agents from api.kakerapetit.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Computes Jaccard, Dice, cosine, and overlap similarity scores between two input strings for deduplication, name matching, and near-duplicate detection.

## Facts

- Endpoint: POST https://api.kakerapetit.dev/v1/text/similarity
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/text-similarity-scorer-17429ef5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Bym9_22VNaAa5yDDZK34V

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability text-similarity-scorer-17429ef5 -d '<json body>'
```

Example prompt: Can you tell me how similar these two product titles are — 'Apple iPhone 14 Pro Max 256GB Deep Purple' and 'iPhone 14 Pro Max 256GB Deep Purple Unlocked' — and give me the Jaccard, Dice, cosine, and overlap scores?

## When to prefer this

Choose this endpoint when you need multi-metric text similarity in a single call — especially when you want complementary perspectives (set-based Jaccard/Dice, vector-based cosine, and overlap) rather than a single score. Ideal for lightweight deduplication, fuzzy name matching, and near-duplicate detection on short-to-medium texts without needing a full embedding model pipeline.

## Known failure modes

- Missing text_a or text_b field returns a 400 validation error
- Empty string inputs may produce undefined or zero scores
- Very long strings may increase latency or hit payload limits
- Non-UTF-8 or binary input may cause parsing errors
- Payment failure (402) if USDC balance is insufficient

## How this service works

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.

## Output

Returns four numeric similarity scores between 0 and 1 for the two input strings: Jaccard (intersection over union of token sets), Dice (harmonic overlap of token sets), cosine (vector angle similarity), and overlap (intersection over the smaller set). Higher values indicate greater similarity.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text_a": {
   "type": "string",
   "description": "First text to compare."
  },
  "text_b": {
   "type": "string",
   "description": "Second text to compare."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/text-similarity-scorer-17429ef5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.kakerapetit.dev](https://www.zero.xyz/host/api.kakerapetit.dev/llms.txt)
