81trust / 100

Proxy Text Embed

by Text Embeddings and Rerank in AI models & inference

x402 APIPassing, checked 3 h ago

Sentence embeddings (all-MiniLM-L6-v2, 384 dimensions, L2-normalized, multilingual input works best in English) for semantic search, clustering and deduplication, or rerank mode: pass query + documents to get documents sorted by cosine similarity. Runs locally, texts are not stored. Params: texts (1 to 32 strings, max 2000 chars each) for embed mode, or query + documents (up to 64) and top_k for rerank mode.

POST https://agentsvc.io/api/v1/proxy/text-embed

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
38 ms typical, 38 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://agentsvc.io/api/v1/proxy/text-embed" \
  -H "content-type: application/json" \
  -d '{"documents":["x402 lets agents pay per call with USDC","The cat sat on the mat","Weather in Berlin is sunny"],"query":"how do AI agents pay for APIs?"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagentsvc.io%2Fapi%2Fv1%2Fproxy%2Ftext-embed
const res = await pay("https://agentsvc.io/api/v1/proxy/text-embed", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"documents":["x402 lets agents pay per call with USDC","The cat sat on the mat","Weather in Berlin is sunny"],"query":"how do AI agents pay for APIs?"}),
});
console.log(await res.json());

Example input

{
  "documents": [
    "x402 lets agents pay per call with USDC",
    "The cat sat on the mat",
    "Weather in Berlin is sunny"
  ],
  "query": "how do AI agents pay for APIs?"
}

Example output

{
  "data": {
    "mode": "rerank",
    "model": {
      "dimensions": 384,
      "max_tokens": 256,
      "name": "sentence-transformers/all-MiniLM-L6-v2",
      "normalized": true,
      "quantization": "int8",
      "similarity": "cosine (dot product of normalized vectors)"
    },
    "query": "how do AI agents pay for APIs?",
    "results": [
      {
        "document": "x402 lets agents pay per call with USDC",
        "index": 0,
        "score": 0.495209
      },
      {
        "document": "The cat sat on the mat",
        "index": 1,
        "score": 0.005939
      },
      {
        "document": "Weather in Berlin is sunny",
        "index": 2,
        "score": -0.050145
      }
    ]
  },
  "success": true
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed40238 ms$0.002
6 h agoPassed40237 ms$0.002
11 h agoPassed40246 ms$0.002