Text embeddings (bge-m3, OpenAI format)
text_embeddings[PAID $0.001 USDC per call via x402 on Base; errors are free] Drop-in OpenAI Embeddings endpoint: POST {input: string | string[], model, encoding_format: float|base64, dimensions} and get {object: "list", data: [{embedding, index}], model, usage}. Models (Cloudflare Workers AI): bge-m3 (1024-d, multilingual (100+ languages), 8192-token context); bge-large-en-v1.5 (1024-d, English); bge-base-en-v1.5 (768-d, English); bge-small-en-v1.5 (384-d, English, fastest); embeddinggemma-300m (768-d, multilingual (Google EmbeddingGemma)). Any other model name (e.g. text-embedding-3-small) maps to bge-m3; the actual model is in the response. dimensions truncates and re-normalizes. Up to 100 inputs per call, 8000 chars each, 60000 chars total, one fixed price per call. For RAG, semantic search, clustering and dedupe. Errors are never charged. GET ?input= also works; with no params it embeds a sample sentence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | No | Text or array of texts to embed (max 100). Optional: defaults to a sample sentence. | |
| model | No | Embedding model alias (default bge-m3). | |
| dimensions | No | Optional output size; vectors are truncated and re-normalized. | |
| encoding_format | No | float (default) or base64 (little-endian float32). |