{"uid":"cap_NkXBFh2IdZrUVdsiyFNyJ","slug":"netintel-semantic-rank-648f8100","name":"NetIntel Semantic Rank","description":"Network intelligence API — 138 endpoints, all pay-per-call via x402 micropayments (USDC on Base or Solana mainnet).\n\nNetIntel is agent fair-trade aligned: transparent per-call pricing in USDC on Base or Solana via x402, no API keys or signup, and automatic no-charge on server errors, upstream failures, and input-validation rejections — failed calls are never billed across NetIntel's network, domain, and data-intelligence endpoints.","url":"https://netintel-production-440c.up.railway.app/semantic/rank","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":{"type":"object","required":["query","candidates"],"properties":{"model":{"type":"string","description":"text-embedding-3-small (default) or text-embedding-3-large"},"query":{"type":"string","description":"The text to rank candidates against."},"top_k":{"type":"number","description":"Return only the best N results. Optional."},"min_score":{"type":"number","description":"Drop results scoring below this (-1 to 1). Optional."},"candidates":{"type":"array","items":{"type":"string"},"description":"1-100 candidate strings to rank (64000 chars total on the default model)."}}},"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"},"usage":{"type":"object","description":"prompt_tokens (input-only)"},"method":{"type":"string","description":"Always 'embedding_similarity'"},"results":{"type":"array","description":"Ranked best-first: [{index (original position), score, text}]"},"provider":{"type":"string"},"dimensions":{"type":"number"},"normalized":{"type":"boolean"}}}}}}},"responseSchema":{"type":"json","example":{"model":"text-embedding-3-small","usage":{"prompt_tokens":36},"method":"embedding_similarity","results":[{"text":"Use the Forgot Password link to recover your account.","index":0,"score":0.5361},{"text":"Refunds are accepted within 30 days.","index":1,"score":0.1399}],"provider":"openai","dimensions":1536,"normalized":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_B0zF3sdf7DxeA3jO_Uph-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Ranks a list of candidate strings by semantic similarity to a query using OpenAI text embeddings, returning results sorted best-first with cosine similarity scores.","exampleAgentPrompt":"Rank these five support articles by how relevant they are to the question 'how do I reset my password?': ['Use the Forgot Password link', 'Refunds are accepted within 30 days', 'Contact support by email', 'Your account settings are under Profile', 'Two-factor authentication setup guide'] — return only the top 3 results.","exampleUseCases":[{"title":"FAQ relevance ranking for chatbot","prompt":"I have a user asking 'why was I charged twice?' and a list of 20 FAQ entries — rank them by how relevant they are to that question and give me just the top 5 so I can surface the best answers."},{"title":"Semantic reranking of search results","prompt":"I ran a keyword search for 'machine learning deployment' and got back 15 article titles — can you re-rank them by semantic similarity to the phrase 'deploying ML models to production' so the most relevant ones bubble up first?"},{"title":"Candidate answer scoring for QA pipeline","prompt":"Given the question 'what is the return policy for electronics?' and these 8 candidate sentences extracted from our docs, score each one for how well it answers the question and drop anything below a 0.3 similarity score."}],"resultDescription":"A JSON object containing: the embedding model used, token usage (prompt_tokens), the method ('embedding_similarity'), provider ('openai'), vector dimensions, a normalized flag, and a results array ranked best-first. Each result includes the original index in the candidate list, the cosine similarity score (between -1 and 1), and the candidate text. Optional top_k and min_score filters are applied before returning.","failureModes":["Input validation failure (missing query or candidates field) — not billed","Candidates array exceeds 100 items or 64000 character limit — rejected with validation error","OpenAI upstream failure — not billed per NetIntel policy","Empty candidates array — likely returns empty results array","min_score set outside -1 to 1 range — may cause validation rejection","model name typo or unsupported model string — upstream error, not billed"],"whenToPreferThis":"Use this endpoint when you have a known query and a bounded list of candidate strings (up to 100) that need to be ranked by semantic relevance rather than keyword overlap. It is ideal for reranking retrieved documents in a RAG pipeline, surfacing the best FAQ match for a user question, or scoring candidate answers. Prefer this over keyword search when meaning matters more than exact word match. No API key or signup required — pay $0.02 USDC per call via x402 micropayments, and failed or errored calls are not billed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:33:58.923Z","isFirstParty":false}