Overview
Install the Spare CLI to run the Router, use your own subscriptions and start your agents through Spare from your machine.
The Spare CLI runs on your machine. You don't need it to call the Spare API; you need it for what happens locally:
- The Cost routing keeps the hard turns on your own model and sends the rest to Spare.
- Subscriptions let you use your Claude or ChatGPT plan next to Spare models.
- Fallbacks to a different model chain models across providers.
- Agent launchers start Claude Code or Codex already pointed at the CLI.
Install
curl -fsSL https://spareinference.ai/install.sh | shirm https://spareinference.ai/install.ps1 | iexCheck the install with spare --version.
Connect Spare
Create an API key in the console and export it, so the CLI can call Spare models:
export SPARE_API_KEY="sk-spare-..."Run spare models to list the models the CLI can reach. Spare's models appear next to any provider you
connect with your own key or subscription.
Start it
spare startThe CLI serves an OpenAI- and Anthropic-compatible API on a local address. Point any client at it, or
start an agent through it with spare claude or spare codex. See the commands
for everything else.
Your data
Requests to your own providers go straight from the CLI to them and never pass through Spare. Requests to Spare models are recorded without their prompt or response content.
How is this guide?