{"uid":"cap_8u6Y0SgbS6a7D8hoTrCm3","slug":"agentsvc-io-text-embed-rerank-66fbccd5","name":"agentsvc.io Text Embed & Rerank","description":"86 APIs for AI agents: web scraping and crawling to Markdown, AI summaries, data extraction and cited answers, screenshots and PDF, PDF, OCR and document conversion, news, paper and developer search and more, paid per call with USDC on Base, Solana, Polygon or Arbitrum via x402. No account, no API key, free sample on every service.","url":"https://agentsvc.io/api/v1/proxy/text-embed?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"query":{"type":"string"},"texts":{"type":"array","items":{"type":"string"},"maxItems":32},"top_k":{"type":"integer","maximum":64,"minimum":1},"documents":{"type":"array","items":{"type":"string"},"maxItems":64},"include_embeddings":{"type":"boolean","default":false}}},"responseSchema":{"type":"json","example":{"data":{"mode":"rerank","model":{"name":"sentence-transformers/all-MiniLM-L6-v2","dimensions":384,"max_tokens":256,"normalized":true,"similarity":"cosine (dot product of normalized vectors)","quantization":"int8"},"query":"how do AI agents pay for APIs?","results":[{"index":0,"score":0.495209,"document":"x402 lets agents pay per call with USDC"},{"index":1,"score":0.005939,"document":"The cat sat on the mat"},{"index":2,"score":-0.050145,"document":"Weather in Berlin is sunny"}]},"success":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.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_jR0xP4QTv6cd9QETWt6px","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates semantic embeddings for texts and/or reranks a list of documents by relevance to a query using a sentence-transformer model","exampleAgentPrompt":"Rerank these 5 passages by how well they answer the question 'how do AI agents pay for APIs?' and return the top 3 results: ['x402 lets agents pay per call with USDC', 'The cat sat on the mat', 'Weather in Berlin is sunny', 'USDC is a stablecoin on Base', 'Smart contracts enable micropayments'].","exampleUseCases":[{"title":"Rerank RAG retrieval candidates","prompt":"I retrieved 20 passages from my knowledge base for the query 'what are the benefits of on-chain micropayments' — can you rerank them by relevance and give me the top 5 with their scores?"},{"title":"Semantic FAQ matching","prompt":"Given the user question 'how do I reset my password?', score these 10 FAQ entries and tell me which ones are most relevant so I can surface the best answers first."},{"title":"Embed sentences for vector search","prompt":"Generate 384-dimensional embeddings for these 15 product descriptions so I can store them in my vector database for similarity search — include the raw embedding vectors in the response."}],"resultDescription":"Returns a JSON object with the model metadata (name, dimensions, max tokens, similarity type) and a results array where each item contains the original document index, a float relevance score (cosine similarity), and the document text, sorted from most to least relevant. Optionally includes int8-quantized embedding vectors for each text.","failureModes":["Exceeds 32-item limit for texts array or 64-item limit for documents array — request rejected","Input texts longer than 256 tokens are silently truncated by the model","Empty query with rerank mode yields meaningless scores","Payment failure via x402 returns 402 Payment Required","Malformed JSON body returns 400 error","Model may perform poorly on non-English or highly technical text"],"whenToPreferThis":"Choose this endpoint when you need lightweight semantic reranking or embedding with no account setup, paying only $0.002 USDC per call via x402. Ideal for AI agent pipelines that need to rerank a small set of retrieved passages (up to 64 documents) on-the-fly without managing embedding infrastructure. The all-MiniLM-L6-v2 model is fast and efficient for general-purpose English semantic similarity. Not suitable for very long documents (>256 tokens) or multilingual use cases requiring larger models.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:39:31.673Z","isFirstParty":false,"canonicalSlug":"agentsvc-io-text-embed-rerank-66fbccd5"}