arcships/aimux
A Rust library that lets you call 325 different AI services through one single API
aimux wraps the wildly different HTTP APIs of hundreds of AI providers behind one unified interface written in Rust, so you can swap models without changing your calling code. It covers text generation, streaming, tool calling, images, speech, and embeddings, and the same core ships to 8 languages including Node.js, Python, Go, and Java. Tests run against saved response recordings instead of live servers, so no network or API keys are needed.
What it does
- 329 providers total: 251 OpenAI-compatible services are registered through one shared config entry (just change the name), 10 providers with their own native protocols (OpenAI, Anthropic, Google, etc.) get dedicated implementations, and 68 more cover speech, image, and search specialists
- The core is a single Rust trait called LanguageModel; bindings for Node.js (napi-rs) and Python (PyO3) call it natively, while Go, Java, Swift, Kotlin, Flutter, and C go through a shared C ABI (a low-level cross-language calling convention)
- In the project's own benchmark, run on the same machine against the same mock server, aimux handled single requests 14.7x faster than the official OpenAI SDK in Node.js and 7.5x faster in Python
- Version 0.3.0 added recording/replay of every request-response pair to a file, a router that automatically falls back to another model on failure, and an MoA feature that combines answers from multiple models into one
- Tests run against 2,800+ saved response cassettes rather than live APIs, so development and CI need no network access or real API keys
Why it matters
It removes the repeated work of writing separate integration code for every AI provider's API format. This matters for anyone building apps that need to switch providers or route across multiple AI services without rewriting application logic each time.
Terms in this repo
- LanguageModel trait · the shared interface aimux defines so different AI providers can be called the same way
- C ABI · a low-level calling convention that lets code written in different programming languages call each other
- MoA (mixture-of-agents) · a technique that runs several AI models in parallel and merges their answers into a single result
- cache-hit tracing · detecting whether a provider reused a previously cached response instead of processing it fresh
- cassette testing · a test approach that replays previously recorded API responses instead of hitting a live server
Repository description (English)
one API for 325 AI providers. 统一 LLM 服务接入层:一套 API 接入 325 家 AI 服务商。
Open on GitHubTrending repos
- vorssaint/vorssaint-utilsOne free menu bar app replaces a dozen paid Mac utilities
- Alishahryar1/free-claude-codeA local proxy that lets coding AI agents run on 49 free or cheap model providers instead of one paid service
- freestylefly/awesome-gpt-image-2A library of 532 reverse-engineered prompts that turn GPT-Image2 into a predictable image-making tool
- block/buzzAn open-source workspace where humans and AI agents chat, code, and review in the same rooms
- NousResearch/hermes-agentNous Research's Hermes is an AI agent that gets smarter the more you use it
- virgiliojr94/book-to-skillA tool that turns technical book PDFs into on-demand reference skills for AI coding agents
- VoltAgent/awesome-agent-skillsA single hub collecting over 1000 'how-to' manuals that make AI coding assistants act like experts
- anthropics/claude-plugins-communityA shared shelf where anyone's Claude add-ons get listed for install