Text embeddings (bge-m3, 1024-d, multilingual) + semantic search ranking
ai_embedEmbed 1-32 texts (each up to 4,000 chars) with BAAI bge-m3 (multilingual, MIT) on our Cloudflare Worker via Workers AI. Add query= to also get the texts ranked by cosine similarity (a cheap semantic search / rerank step); include_vectors=false returns only the ranking. Limited daily capacity: 503 (not charged) when used up. Price: $0.0005 USDC on Base per call, paid with x402 (MCP transport: an unpaid call returns the x402 PaymentRequired object; retry with params._meta["x402/payment"]). Same tool over HTTP: POST /api/ai/embed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | optional; rank texts against it | |
| texts | Yes | 1-32 strings (or text= for one) | |
| include_vectors | No |