# Embedding Similarity via Venice (x402)

> Embedding Similarity via Venice (x402) is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Embeds two strings using Venice's text-embedding-bge-m3 model and returns their cosine similarity as a float in [-1, 1]

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/embedding-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/x402-deployer-x402-deployer-workers-dev-e1a1c6c5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_O2VpBRSCnvkIF66_f7D0M

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 x402-deployer-x402-deployer-workers-dev-e1a1c6c5 -d '<json body>'
```

Example prompt: How semantically similar are these two sentences: 'The cat sat on the mat' and 'A feline rested on a rug'? Give me the cosine similarity score using Venice embeddings.

## When to prefer this

Use this endpoint when you need a quick, cheap scalar similarity score between two text strings without building your own vector pipeline. Ideal for paraphrase detection, deduplication, and lightweight semantic routing. Prefer this over full vector database lookups when you only need pairwise similarity for a single comparison. Choose this over keyword-based matching (e.g. Jaccard, BM25) when semantic meaning matters more than lexical overlap.

## Known failure modes

- Empty or missing input strings returns an error
- Model name typo or unsupported model name may cause a backend failure
- Very long strings may exceed token limits of the embedding model
- Network timeout on Venice embedding API call
- Payment not processed or insufficient USDC balance (x402 payment required)

## How this service works

Embedding similarity / cosine similarity / semantic match / vector compare / are-these-strings-similar. Embeds two strings via Venice (default model: text-embedding-bge-m3) and returns the cosine similarity as a single float in [-1, 1]. Useful for paraphrase detection, dedup, and cheap retrieval routing.

## Output

A single float value between -1 and 1 representing the cosine similarity of the two input strings' embeddings. Values near 1 indicate near-identical meaning, values near 0 indicate unrelated content, and negative values indicate opposite meanings.

## Example request

```json
{
 "input": {
  "body": {
   "model": "text-embedding-bge-m3",
   "text_a": "The quick brown fox jumps over the lazy dog",
   "text_b": "A fast brown fox leaps over a sleeping dog"
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## 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": {
     "required": [
      "text_a",
      "text_b"
     ],
     "properties": {
      "model": {
       "type": "string",
       "description": "Venice embedding model. Default 'text-embedding-bge-m3'."
      },
      "text_a": {
       "type": "string",
       "description": "First text. Up to 30,000 chars."
      },
      "text_b": {
       "type": "string",
       "description": "Second text. Up to 30,000 chars."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "model": {
       "type": "string"
      },
      "source": {
       "type": "string"
      },
      "text_a": {
       "type": "string"
      },
      "text_b": {
       "type": "string"
      },
      "dimensions": {
       "type": "integer"
      },
      "similarity": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-e1a1c6c5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
