# Cost routing (/docs/fleet/cost-routing)

> For AI agents, the [documentation index](https://bitrouter.ai/llms.txt) lists all pages. Append .md to a documentation URL to read its Markdown.

Cost routing moves workloads off an expensive frontier model and onto an open model, without changing your
agent. The CLI's auto router, which runs on your machine, decides request by request whether a turn needs
your strong model or whether an open model handles it just as well. You give it two models, a strong one
and an economy one, and point your agent at it.

| Role    | Example                                                                                               | Billed by                                                     |
| ------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| Strong  | Your Claude or OpenAI model, through [your key](https://bitrouter.ai/docs/fleet/byok) or subscription | Your provider or subscription                                 |
| Economy | `deepseek-v4.1-flash` on Spare                                                                        | Spare, at the [live price](https://bitrouter.ai/docs/pricing) |

Routing itself is free. The Spare API doesn't route between models on its own: a request to
`https://api.spareinference.ai` runs the model it names. To change what runs behind a name without the
CLI, use a [routing preset](https://bitrouter.ai/docs/fleet/provider-selection).

## Set up \[#set-up]

1. Connect both models to the CLI: your strong model with
   a key or subscription, and Spare with your `SPARE_API_KEY`. Check that
   both appear in `spare models`.

2. Bind the auto router to the two routes, using the `provider:model` ids that `spare models` prints:

   ```bash
   spare policy init auto --router auto \
     --strong <provider>:<your-strong-model> \
     --economy <provider>:deepseek-v4.1-flash
   spare policy check
   ```

3. Start the CLI and send requests to the model `spare/auto`:

   ```bash
   spare start
   spare claude --model spare/auto    # or: spare codex --model spare/auto
   ```

Any OpenAI- or Anthropic-format client can use it too: point it at the CLI's local address and send
`"model": "spare/auto"`. Naming a specific model instead skips the Router for that request.

## How it decides \[#how-it-decides]

The policy file `policy-lock.yaml` that `spare policy init` writes maps kinds of requests to the strong or
the economy tier. A request that matches no rule goes to the default tier. Edit the policy and run
`spare policy check` before reloading.

Routing picks a model for a request that would succeed. It is separate from
[fallbacks](https://bitrouter.ai/docs/fleet/fallbacks), which replace a request that failed.

## See where each turn went \[#see-where-each-turn-went]

```bash
spare requests --limit 25
```

Each row shows the model you asked for, the model and provider that served it, its tokens, cost and
status. Turns served by Spare also appear in the console's **Activity** page, with their
[settlement](https://bitrouter.ai/docs/pricing#see-what-a-request-cost).

## Your data \[#your-data]

The Router runs on your machine. Turns it sends to your strong model go straight from the CLI to your
provider and never pass through Spare. Turns sent to Spare are recorded without their prompt or response
content.