# agent402.tools String Similarity

> agent402.tools String Similarity is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Computes four string similarity metrics at once (Dice, Jaccard, overlap coefficient, normalized length difference) for two input strings

## Facts

- Endpoint: POST https://agent402.tools/api/string-similarity
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-string-similarity-b48bf922
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3ADIyW4PG_hkaLga1rGK8

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 agent402-tools-string-similarity-b48bf922 -d '<json body>'
```

Example prompt: Can you compute all the similarity metrics — Dice, Jaccard, overlap coefficient, and length difference — between the strings 'customer service' and 'customer support'?

## When to prefer this

Use this endpoint when you need multiple bigram-based string similarity metrics computed in a single call rather than calling separate endpoints. Ideal for fuzzy deduplication, record linkage, typo detection, or any scenario requiring a multi-faceted similarity profile rather than a single distance score.

## Known failure modes

- Missing 'a' or 'b' parameter returns a validation error
- Empty strings may produce edge-case scores (e.g. 0 or undefined similarity)
- Very long strings may increase latency slightly but still process
- Non-UTF-8 or malformed input may result in a 400 error

## How this service works

Compute multiple similarity metrics between two strings at once: Dice coefficient, Jaccard index, overlap coefficient (all bigram-based), and normalized length difference. All values 0–1. Deterministic, pure CPU.

## Output

Returns four numeric scores (each 0–1): Dice coefficient, Jaccard index, overlap coefficient (all bigram-based), and normalized length difference, allowing multi-dimensional comparison of the two input strings.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {
   "type": "string",
   "description": "First string"
  },
  "b": {
   "type": "string",
   "description": "Second string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "dice": 0.8,
  "jaccard": 0.666667,
  "overlap": 0.8,
  "lengthDiff": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-string-similarity-b48bf922/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
