Description
liter-llm is an open-source client library for calling large language models from your own code. The core is written in Rust and ships as native bindings for 14 languages, including Python, TypeScript, Go, Java, Ruby and PHP, so the same client gives the same results in each one. Change the model name to move between 174 providers such as OpenAI, Anthropic, Google, Bedrock, Azure and Mistral without rewriting your code. The same binary can also run as an OpenAI-compatible proxy, where you can add virtual keys, budgets and fallbacks, and it includes a built-in MCP server for AI agents. Requests can be routed by cost, latency or weight and fail over to another provider when one goes down. The API covers chat with streaming and tool calling, embeddings, images, speech, transcription, moderation, search and OCR. API keys are wrapped and redacted from logs, and cloud sign-in for Azure, AWS and Vertex refreshes on its own.…
Highlights
- Calls 174 LLM providers through one consistent API
- Native bindings for 14 programming languages
- OpenAI-compatible proxy with keys, budgets and fallbacks
- Built-in MCP server for AI agents
- Routing by cost, latency or weight with failover
Ratings & Reviews
No ratings yet
Be the first to rate liter-llm.
People also visit
liter-llm FAQ
What is liter-llm?
A client library and proxy for calling large language models. You make one API call, and liter-llm sends it to the provider you choose, such as OpenAI, Anthropic or Google.
Which languages does it support?
Rust, Python, TypeScript, Go, Java, Ruby, PHP and more, 14 languages in total. Every binding is built on the same Rust core, so behaviour matches across languages.
How do I install it?
Use the package for your language. For example, cargo add liter-llm adds it to a Rust project and pip install liter-llm installs the Python package. The API reference is in the documentation.
Can it replace the OpenAI SDK in my app?
Yes. Point your existing OpenAI SDK at the built-in proxy. The proxy adds virtual keys, budgets and fallbacks, and the same binary also serves your AI agents.
How are API keys handled?
Keys are wrapped, redacted from logs and never serialized. Cloud authentication for Azure, AWS and Vertex is handled for you, and tokens refresh and rotate automatically.
What are the best liter-llm alternatives?
Popular alternatives to liter-llm include WebLLM Chat, BodhiApp and GoModel. See all liter-llm alternatives



