# agentsvc.io Text Embed & Rerank

> agentsvc.io Text Embed & Rerank is a paid API for AI agents from agentsvc.io, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-10).

Generates semantic embeddings for texts and/or reranks a list of documents by relevance to a query using a sentence-transformer model

## Facts

- Endpoint: POST https://agentsvc.io/api/v1/proxy/text-embed?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentsvc-io-text-embed-rerank-66fbccd5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8u6Y0SgbS6a7D8hoTrCm3

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 agentsvc-io-text-embed-rerank-66fbccd5 -d '<json body>'
```

Example prompt: 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'].

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentsvc-io-text-embed-rerank-66fbccd5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentsvc.io](https://www.zero.xyz/host/agentsvc.io/llms.txt)
