# Inference402 Text Embeddings

> Inference402 Text Embeddings is a paid API for AI agents from inference402.worlddata402.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-19).

Generates dense vector embeddings for up to 32 text strings using BGE-M3 (1024 dimensions), paid per-call with USDC on Base via x402.

## Facts

- Endpoint: GET https://inference402.worlddata402.workers.dev/v1/embed?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/inference402-text-embeddings-1f83d1fb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2t-EIOFJSA0w7k6mItSJD

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 inference402-text-embeddings-1f83d1fb
```

Example prompt: Generate BGE-M3 embeddings for these two sentences: 'The quick brown fox jumps over the lazy dog' and 'Machine learning transforms industries' — I need the 1024-dimensional vectors to store in my vector database.

## When to prefer this

Choose this endpoint when you need keywordless semantic embeddings (BGE-M3, 1024-dim) without API keys or account setup — ideal for agents that need pay-as-you-go vector generation via x402/USDC on Base. Prefer over OpenAI or Cohere embeddings when you want accountless micropayment access, multilingual coverage (BGE-M3 supports 100+ languages), or batch embedding up to 32 texts per call.

## Known failure modes

- Payment failure: 402 returned if USDC payment on Base is missing or insufficient
- Input too large: array exceeds 32 items or individual text exceeds 2000 characters
- Empty input: minItems:1 violated returns validation error
- Network/worker timeout: Cloudflare Worker cold-start or inference latency spike
- Invalid JSON body: malformed texts array causes 400 error

## How this service works

Pay-per-call AI inference for agents: chat (Llama 3.3 70B / 3.1 8B), structured JSON, summarize, translate (incl. Egyptian Arabic), extract, classify, sentiment, keywords, rewrite, embeddings, moderation, vision and speech-to-text. USDC on Base mainnet over x402. No API key, no account.

## Output

Returns a JSON object with the embedding count, model name ('cf/baai/bge-m3'), number of dimensions (1024), and an array of float arrays — one 1024-dimensional embedding vector per input text string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "texts": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 2000
   },
   "maxItems": 32,
   "minItems": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 2,
  "model": "@cf/baai/bge-m3",
  "dimensions": 1024,
  "embeddings": [
   [
    0.012,
    -0.034,
    "..."
   ],
   [
    0.011,
    -0.03,
    "..."
   ]
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/inference402-text-embeddings-1f83d1fb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from inference402.worlddata402.workers.dev](https://www.zero.xyz/host/inference402.worlddata402.workers.dev/llms.txt)
