FMF Tools AI: pay-per-call chat, translate, embeddings and rerank (no API key, MPP)

Pay-per-call AI primitives for agents: chat completions with small open models (Gemma 4 26B-A4B, Granite 4 Micro, gpt-oss-20b), machine translation (100 languages), multilingual embeddings and cross-encoder reranking. Open models with commercial-use licences (Apache-2.0, MIT). No account or API key: pay per call with MPP on Tempo (USDC.e or pathUSD). Invalid input, a failed model call or the daily capacity limit returns 402 and is not charged.

Full docs with copy-paste examples (mppx CLI, curl, TypeScript, Python, MCP).

Routes

RoutePriceWhat you get
POST /mpp/chat$0.002Chat completion (small open models)
OpenAI-style chat with open-weight models on Cloudflare Workers AI: gemma-4-26b-a4b (default), granite-4-micro (fastest), gpt-oss-20b (all Apache-2.0). Send messages[] or a prompt; up to ~6k input tokens and 1,024 output tokens per call, flat price. Returns the reply, token usage and finish reason. Daily capacity is limited; when it is reached you get 402 and are not charged.
POST /mpp/translate$0.003Translate text (100 languages)
Machine translation between 100 languages (Meta M2M-100 1.2B, MIT licence): one text up to 5,000 characters or up to 20 texts per call, source and target as ISO codes or names. Long text is split by sentence and reassembled.
POST /mpp/embeddings$0.0005Text embeddings (multilingual)
Dense vector embeddings for up to 100 texts per call (BAAI bge-m3, 1024 dimensions, 100+ languages, MIT licence), L2-normalised for cosine similarity. OpenAI-style response (data[i].embedding).
POST /mpp/rerank$0.001Rerank documents for a query
Score and sort up to 100 documents by relevance to a query with a cross-encoder (BAAI bge-reranker-base, MIT licence). Returns index, relevance score (0-1) and text, best first; top_n to truncate. Ideal after search or embeddings retrieval.

Sources and licences

Models: Meta M2M-100 1.2B (MIT), BAAI bge-m3 and bge-reranker-base (MIT) on Cloudflare Workers AI.

Sister services