Skip to content

Installation

Liter-llm ships prebuilt packages for every supported language plus a CLI and Docker image for the proxy + MCP server. Pick your stack, run one command, and start calling models.

Prebuilt binaries cover Linux (x86_64 / aarch64), macOS (Apple Silicon), and Windows. The Rust toolchain is only needed when building from source.

The CLI runs the proxy server and the MCP tool server. You don’t need it if you only use a language binding.

Terminal window
brew trust xberg-io/tap
brew install xberg-io/tap/liter-llm

Start the proxy:

Terminal window
liter-llm api --config liter-llm-proxy.toml

Or the MCP server:

Terminal window
liter-llm mcp --transport stdio

Proxy Server docs   MCP Server docs


Requires Python 3.10+.

Terminal window
pip install liter-llm

Or with uv:

Terminal window
uv add liter-llm

Set the environment variable matching the provider you call:

Terminal window
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export GOOGLE_API_KEY="..."
export GROQ_API_KEY="gsk_..."
export MISTRAL_API_KEY="..."
export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."

Or pass the key at client construction:

from liter_llm import create_client
client = create_client(api_key="sk-...")

Terminal window
python -c "from liter_llm import create_client; print('ok')"

If a prebuilt binary is not available for your platform, build from source with stable Rust (edition 2024):

Terminal window
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/xberg-io/liter-llm.git
cd liter-llm
task build