# Multilingual RAG Reranking API

> Multilingual RAG Reranking API is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-14).

Ranks 2–16 multilingual candidate texts (passages, tools, routes, or answers) against a query by cosine similarity, returning ordered indexes and a SHA-256 receipt for $0.003 USDC.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/rank-multilingual-texts
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/multilingual-rag-reranking-api-cfd28eae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7T1OWoxlqOFCCNIe10sUT

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 multilingual-rag-reranking-api-cfd28eae -d '<json body>'
```

Example prompt: Rerank these 6 support articles against the query 'how do I reset my password' and tell me which are most relevant — they're in English, French, and Spanish, and I need the ranked indexes and cosine scores back.

## When to prefer this

Choose this endpoint when you need language-agnostic semantic reranking across 2–16 passages without managing embedding infrastructure, API keys, or provider accounts. Ideal for multilingual RAG pipelines, agentic tool routing, or support answer selection where a pay-per-call model ($0.003 USDC) is preferable to a subscription. The SHA-256 receipt makes it suitable when auditability of ranking decisions matters.

## Known failure modes

- Fewer than 2 or more than 16 candidates causes validation error
- Query or candidate text exceeds character limits (1000 / 2000 chars) returns 400
- Duplicate candidate texts rejected due to uniqueItems constraint
- Insufficient USDC balance or failed x402 payment returns 402
- Non-string or malformed JSON body returns 400
- Service unavailability returns 503 with no receipt issued

## How this service works

Multilingual RAG reranking API for agents: rank 2-16 passages, tools, routes, search results, or support answers against one query for $0.003 USDC. Returns original candidate indexes, relative cosine scores, and a durable SHA-256 receipt. No API key, subscription, raw embeddings, or provider controls.

## Output

Returns the original zero-based indexes of the candidate texts ordered by relevance to the query, relative cosine similarity scores for each candidate, and a durable SHA-256 receipt that can be used to verify the result.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "query": {
   "type": "string",
   "maxLength": 1000,
   "minLength": 1,
   "description": "The multilingual search question or intent to rank against."
  },
  "candidates": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 2000,
    "minLength": 1
   },
   "maxItems": 16,
   "minItems": 2,
   "description": "Unique candidate texts; returned by original zero-based index.",
   "uniqueItems": true
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "model": "beautyyuyanli/multilingual-e5-large",
  "ranked": [
   {
    "score": 0.912314,
    "candidate_index": 1
   },
   {
    "score": 0.134221,
    "candidate_index": 0
   }
  ],
  "sha256": "2d6c7c2b3f3c8e1e7b0d3a5b6e7f8a9b1234567890abcdef1234567890abcdef",
  "provider": "replicate",
  "media_type": "application/json",
  "ranking_url": "https://api.delx.ai/api/v1/generated-rankings/ranking-example.json",
  "input_sha256": "34a8815e9c57e321194d50f2ea8b64394019fb8038c9aefd7a9a306a5030fc31",
  "generation_id": "ranking-example-generation-id",
  "candidate_count": 2,
  "sale_price_usdc": 0.003,
  "gross_margin_usd": 0.002025,
  "upstream_cost_usd": 0.000975
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/multilingual-rag-reranking-api-cfd28eae/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
