{"uid":"cap_O2VpBRSCnvkIF66_f7D0M","slug":"x402-deployer-x402-deployer-workers-dev-e1a1c6c5","name":"Embedding Similarity via Venice (x402)","description":"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.","url":"https://x402-deployer.x402-deployer.workers.dev/embedding-similarity","method":"POST","headers":{},"bodySchema":{"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"}}}}}}},"responseSchema":null,"example":{"request":{"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"}},"response":{"model":"text-embedding-bge-m3","source":"venice","text_a":"The quick brown fox jumps over the lazy dog","text_b":"A fast brown fox leaps over a sleeping dog","dimensions":1024,"similarity":0.897283}},"exampleRequest":{"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"},"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8mpPHXMNAlioIBIjP3fvg","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Embeds two strings using Venice's text-embedding-bge-m3 model and returns their cosine similarity as a float in [-1, 1]","exampleAgentPrompt":"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.","exampleUseCases":null,"resultDescription":"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.","failureModes":["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)"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:54:35.977Z","isFirstParty":false}