{"uid":"cap_83izXp-itgD7dcEa7OLrw","slug":"fastapi-online-text-similarity-scoring-0dc046ca","name":"fastapi.online — Text Similarity Scoring","description":"Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.","url":"https://api.fastapi.online/similarity","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text_a":{"type":"string","maxLength":8000,"minLength":1},"text_b":{"type":"string","maxLength":8000,"minLength":1}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4IO9D7E_adaqv3hr5aiaQ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes a semantic similarity score between two input texts, returning a numeric value indicating how similar they are.","exampleAgentPrompt":"Score how similar these two sentences are: 'The cat sat on the mat' and 'A feline rested on the rug' — give me the similarity value.","exampleUseCases":[{"title":"Duplicate content detection pipeline","prompt":"Check how similar these two product descriptions are: 'Lightweight waterproof running shoes with breathable mesh upper' and 'Breathable mesh running shoes, waterproof and light' — I need a similarity score to decide if they're duplicates."},{"title":"Plagiarism check for student essays","prompt":"Compare these two essay excerpts and tell me their similarity score: 'Climate change is driven primarily by human activity including fossil fuel combustion' vs 'Human activities like burning fossil fuels are the main driver of climate change.'"},{"title":"FAQ deduplication for chatbot","prompt":"I have two FAQ entries — 'How do I reset my password?' and 'What steps should I follow to change my login password?' — can you give me a similarity score so I know if I should merge them?"}],"resultDescription":"Returns a JSON object containing a 'similarity' field with a numeric score (typically between 0 and 1) representing the semantic closeness of the two input texts, where higher values indicate greater similarity.","failureModes":["Missing text_a or text_b field returns a validation error","Empty string inputs may return a score of 1.0 or behave unexpectedly","Payment failure (insufficient USDC) results in a 402 Payment Required response","Very long texts may exceed model context limits and return an error","Network timeout if the self-hosted inference backend is overloaded"],"whenToPreferThis":"Choose this endpoint when you need a quick, low-cost ($0.001 USDC) semantic similarity score between exactly two text strings, require no signup or account, and want to pay per call with crypto via x402. Prefer it over embedding-based pipelines when you want a single similarity number without managing vector stores.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:04:40.504Z","isFirstParty":false}