# FastX402 Text Similarity

> FastX402 Text Similarity is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-20).

Computes string similarity between two text inputs, returning cosine similarity, Levenshtein distance, Jaro-Winkler score, and case-insensitive equality check.

## Facts

- Endpoint: GET https://fastx402.tools/text-similarity?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-text-similarity-704396ee
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tvBHOrmNxk8BfIpeYvtVW

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 fastx402-text-similarity-704396ee
```

Example prompt: How similar are the strings 'Saturday' and 'Saterday'? Give me the similarity score, Levenshtein distance, and Jaro-Winkler score.

## When to prefer this

Choose this endpoint when you need lightweight, multi-metric string comparison without setting up an account or API key, especially in agent pipelines that need fuzzy matching, deduplication, or spell-check validation. It is ideal for quick one-off comparisons at $0.001 per call via x402 micropayments, making it cost-effective for high-volume per-record processing where a full NLP embedding service would be overkill.

## Known failure modes

- Missing required query parameters 'a' or 'b' results in a 400 error
- Payment not included or invalid USDC payment on Base/Solana results in a 402 error
- Very long strings may exceed processing limits
- Non-string inputs (e.g. numbers passed as query params) may be coerced or rejected

## How this service works

200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

A JSON object containing four fields: 'similarity' (a float between 0 and 1 representing overall string similarity), 'levenshtein' (an integer representing the minimum edit distance), 'jaro_winkler' (a float between 0 and 1 from the Jaro-Winkler algorithm), and 'equal_ignoring_case' (a boolean indicating whether the strings are identical when case is ignored).

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "a",
      "b"
     ],
     "properties": {
      "a": {
       "type": "string",
       "description": "First string"
      },
      "b": {
       "type": "string",
       "description": "Second string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "similarity": {
       "type": "number"
      },
      "levenshtein": {
       "type": "integer"
      },
      "jaro_winkler": {
       "type": "number"
      },
      "equal_ignoring_case": {
       "type": "boolean"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "similarity": 0.5714,
  "levenshtein": 3,
  "jaro_winkler": 0.746,
  "equal_ignoring_case": false
 }
}
```

## More

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