# 402utils Text Embedding via Cloudflare Workers AI

> 402utils Text Embedding via Cloudflare Workers AI is a paid API for AI agents from 402utils.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-15, last successful call 2026-07-17).

Converts one or a batch of text strings into float vector embeddings using Cloudflare Workers AI BAAI models, for use in semantic search, RAG pipelines, and similarity comparisons.

## Facts

- Endpoint: POST https://402utils.com/v1/embed
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Last successful call: 2026-07-17
- Success rate: 100% of calls made through Zero
- Rating: 4.0 / 5 from 1 review
- Activations on Zero: 8
- Tags: x402
- Canonical page: https://www.zero.xyz/c/402utils-text-embedding-via-cloudflare-workers-ai-8eff4b4e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_n9OFU4e64deP1X09R3cxk

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 402utils-text-embedding-via-cloudflare-workers-ai-8eff4b4e -d '<json body>'
```

Example prompt: Generate multilingual vector embeddings for these three text chunks using the @cf/baai/bge-m3 model: 'The weather is sunny today', 'Il fait beau aujourd'hui', and 'El tiempo está soleado hoy' — I need the 1024-dimensional float vectors so I can compare their semantic similarity with cosine distance.

## When to prefer this

Use this endpoint when you need text embeddings without an OpenAI account, want multilingual support via bge-m3, are building a RAG pipeline on Cloudflare infrastructure, or need to batch-embed up to 20 chunks in a single paid call at $0.004 USDC. Prefer over OpenAI embeddings when you want a self-contained x402-payment flow or specifically need the BAAI bge model family.

## Known failure modes

- 503 Service Unavailable if the requested model or Cloudflare Workers AI binding is unavailable (not billed)
- Input text exceeds 4000 characters per string
- Batch exceeds 20 texts
- English-only en-v1.5 models receive non-English text (may degrade quality silently)
- Payment failure returns 402 before processing

## How this service works

Text → vector embeddings via Cloudflare Workers AI. Send {text} or {texts[]} (≤20, each ≤4000 chars); returns one float vector per input. Default model @cf/baai/bge-m3 (1024-dim, multilingual). The model is named in the response — embeddings only compare within the same model. Completes the RAG chain: readability → chunk → embed, no OpenAI account. Cosine-compare the vectors yourself. Unavailable model/binding → 503, not billed.

## Output

Returns one float vector per input text (1024 dimensions for the default bge-m3 model, fewer for smaller models), along with the model name used. Multiple texts in a batch return a corresponding array of vectors. If the model or Cloudflare binding is unavailable, returns 503 and the call is not billed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "A single text to embed (≤ 4000 chars)."
  },
  "model": {
   "enum": [
    "@cf/baai/bge-m3",
    "@cf/baai/bge-base-en-v1.5",
    "@cf/baai/bge-large-en-v1.5",
    "@cf/baai/bge-small-en-v1.5"
   ],
   "type": "string",
   "default": "@cf/baai/bge-m3",
   "description": "Embedding model. Default @cf/baai/bge-m3. en-v1.5 models are English-only, 512-token max."
  },
  "texts": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "maxItems": 20,
   "description": "Up to 20 texts to embed in one call (each ≤ 4000 chars)."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/402utils-text-embedding-via-cloudflare-workers-ai-8eff4b4e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 402utils.com](https://www.zero.xyz/host/402utils.com/llms.txt)
