# Sørensen-Dice Bigram Similarity

> Sørensen-Dice Bigram Similarity is a paid API for AI agents from similarity.openverbs.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-15).

Computes the Sørensen-Dice similarity coefficient (0–1) between two strings using character bigrams, robust to word-order variation and minor edits.

## Facts

- Endpoint: POST https://similarity.openverbs.com/v1/dice
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/s-rensen-dice-bigram-similarity-c3f909f6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mrALkAvXbuq8p0kV0GQxA

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 s-rensen-dice-bigram-similarity-c3f909f6 -d '<json body>'
```

Example prompt: What's the Dice bigram similarity score between 'Barack Obama' and 'Obama Barack' — I want a number from 0 to 1 that handles the word-order flip gracefully.

## When to prefer this

Choose this endpoint when you need a similarity score that is robust to word-order permutations and minor character-level edits, and when an intuitive 0–1 score (rather than a raw edit distance) is required. Prefer it over Levenshtein when word order may vary (e.g. name fields), and over Jaccard when you want bigram-level granularity rather than token-level. Use Jaro-Winkler instead if prefix matching matters most (e.g. autocomplete).

## Known failure modes

- Missing required fields 'a' or 'b' returns a validation error
- Strings exceeding 20,000 characters are rejected
- Empty string inputs may produce a score of 0 or cause an error
- Network/payment failure if x402 payment is not properly handled

## How this service works

Sørensen-Dice similarity coefficient in [0,1] over character bigrams — robust to word order and minor edits.

## Output

A floating-point Dice coefficient in the range [0, 1], where 0 means no shared bigrams and 1 means the two strings are identical in bigram composition. The score is symmetric and tolerant of word-order differences.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "a",
      "b"
     ],
     "properties": {
      "a": {
       "type": "string",
       "maxLength": 20000,
       "description": "First string."
      },
      "b": {
       "type": "string",
       "maxLength": 20000,
       "description": "Second string."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/s-rensen-dice-bigram-similarity-c3f909f6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from similarity.openverbs.com](https://www.zero.xyz/host/similarity.openverbs.com/llms.txt)
