---
title: "Free models and budgets"
url: "/docs/proxy/free_model_budgets"
canonical_url: "https://docs.litellm.ai/docs/proxy/free_model_budgets"
type: "docs"
last_updated: "2026-12-02"
summary: "Requests to a model priced at exactly $0 per token skip budget checks, so callers who have used up a budget can still reach free or self-hosted models."
related:
  - "/docs/proxy/fail_closed_budgets"
  - "/docs/proxy/self_serve_budgets"
---
# Free models and budgets

> Index of all LiteLLM docs: https://docs.litellm.ai/llms.txt


Available in LiteLLM v1.81.9 and later.

A model whose `input_cost_per_token` and `output_cost_per_token` are both set to `0` costs nothing, so LiteLLM skips budget checks for requests to it. A key, user or team that has used up its budget is still rejected on paid models but keeps working on the free one. This makes free or self-hosted models a fallback that budget-exhausted callers can still reach.

Both prices must be set explicitly to `0` on the deployment, in its `litellm_params` or its `model_info`. A model whose prices are unset or `null` is treated as paid, even when LiteLLM's built-in price list has it at $0, and budget checks still apply to it.

## How it works

```mermaid
flowchart TD
  accTitle: How LiteLLM decides that a model is free
  accDescr: For a request to a model group, LiteLLM reads the highest input and output token prices across the group's deployments. If either is above zero or unset, budget checks run. If both are zero, at least one deployment must set the prices explicitly, otherwise budget checks run. If any deployment the group routes to has a positive token price or bills provisioned throughput as a flat cost, budget checks run. Otherwise the request skips budget checks and its spend is logged at zero.
  REQ["Request to a<br/>model group"] --> P{"Highest input and<br/>output token prices<br/>both 0?"}
  P -->|"No, or unset"| RUN["Budget checks run"]
  P -->|Yes| E{"A deployment sets<br/>the prices explicitly?"}
  E -->|No| RUN
  E -->|Yes| PAID{"A deployment with a<br/>positive token price<br/>or PTU cost?"}
  PAID -->|Yes| RUN
  PAID -->|No| SKIP["Budget checks skipped,<br/>spend logged at $0"]
  classDef default fill:#ffffff,stroke:#9ca3af,color:#111827;
```

LiteLLM decides per model group, from the prices of every deployment the group routes to. A group's price is the highest of its deployments, so a group that mixes free and paid deployments counts as paid. A deployment that bills provisioned throughput as a flat hourly cost, with `ptu_count` and `cost_per_ptu_per_hour` in its `model_info`, is never free even with zero token prices. For chat, completions, responses and messages requests, LiteLLM judges the model the request is served by after key, team and router model aliases, so an alias that points at a paid model is not free. A request that names several models skips budget checks only when every one of them is free.

The request is still logged and its spend recorded, at $0, so it never uses up any budget. Rate limits and model access rules still apply.

## When to use it

Price a model at zero when it costs you nothing per request: a model you host yourself with Ollama or vLLM, a free tier, or capacity you already pay for on a flat contract. A team that runs out of budget can then keep working on that model instead of stopping, which suits coding tools and internal assistants that should degrade rather than fail.

A model that costs money to run should keep a real price, even when you want it to stay reachable, since a $0 price also records its usage at $0 in spend reports. See [Custom pricing](./custom_pricing.md). To limit how much a free model is used, use [rate limits](./rate_limits.md), which still apply to it. To keep a capped key running at reduced speed on paid models instead, use [throttling](./budget_throttling.md).

## Supported scopes

Supported means a request to a free model skips that scope's budget check. Nothing is set per scope: pricing the model at zero covers every scope marked Yes.

| Scope | Supported | How to set it |
| --- | --- | --- |
| Whole proxy | Yes | `litellm_settings.max_budget` is not checked. |
| Organization | Yes | The organization's `max_budget` is not checked. |
| Team | Yes | The team's `max_budget`, its `budget_limits` windows and its per-model budgets are not checked. |
| Team member | Yes | The member's budget in the team and the per-model caps a team sets for its members are not checked. |
| Project | Yes | The project's `max_budget` is not checked. |
| Virtual key | Yes | The key's `max_budget`, `budget_limits` windows and `model_max_budget` are not checked. |
| Internal user | Yes | The personal `max_budget`, `budget_limits` windows and `model_max_budget` are not checked. |
| Customer | Yes | Legacy end-user budgets, including their per-model budgets, are not checked. Customer Management budgets and their windows are still checked. |
| Tag | Yes | Tags created with `/tag/new` are not checked. Tags in `litellm_settings.tag_budget_config` are still enforced by the router. |
| Model access group | Yes | The group's `max_budget` is not checked. |
| AI tool | Yes | The team's per AI tool limits, and each member's, are not checked. |
| Agent session | No | `max_budget_per_session` is still checked before each call. |

## How to use it

### Price the model at zero

Set both cost fields explicitly to `0` in `config.yaml`:

```yaml title="config.yaml"
model_list:
  - model_name: my-free-model
    litellm_params:
      model: ollama/llama3
      api_base: http://localhost:11434
      input_cost_per_token: 0
      output_cost_per_token: 0
```

The same two fields work under the deployment's `model_info`, and in the `litellm_params` or `model_info` of a `/model/new` or `/model/update` request for models stored in the database. Give every deployment in the model group the zero price, since one paid deployment makes the whole group paid.

### Check it

Send a request to the free model with a key that has used up its budget. It succeeds and its `x-litellm-response-cost` header shows a cost of 0, while the same key's requests to a paid model fail with `budget_exceeded`.

```bash
curl 'http://0.0.0.0:4000/v1/chat/completions' \
  -H 'Authorization: Bearer sk-...' \
  -H 'Content-Type: application/json' \
  -d '{"model": "my-free-model", "messages": [{"role": "user", "content": "hello"}]}'
```

## Limits

Whether a model is free comes from its per-token prices. A deployment whose `input_cost_per_token` and `output_cost_per_token` are 0 but that bills by another unit, such as `input_cost_per_second`, still counts as free, so its requests skip budget checks while they record spend. Leave the per-token fields unset on such a deployment.

Budget checks run once, at authentication, before the router picks a fallback. When a free model falls back to a paid one through the router's `fallbacks`, `general_settings.enforce_fallback_budget` (since LiteLLM v1.103.0), on by default, re-checks only the key's `max_budget`, the owner's personal `max_budget` where it applies, and the team member's per-model caps before the paid fallback runs. Team, organization, project and other budgets are not re-checked, so avoid paid fallbacks on a free model when those budgets matter. When LiteLLM's own rate limits refuse a request to a free model before the call, the proxy tries only the free models among its fallbacks. See [Enforce budget on fallbacks](./reliability.md#enforce-budget-on-fallbacks).

Free requests take no [budget reservation](./budget_reservation.md), since they cannot move a counter.

## Related

[Custom pricing](./custom_pricing.md) covers setting model prices, [Budget exceeded errors](./budget_exceeded_errors.md) covers what a refused request receives, and [Budgets and spend limits](./budgets.md) covers every scope a request is checked against.

## Related pages

- [Fail-closed budget enforcement](https://docs.litellm.ai/docs/proxy/fail_closed_budgets.md)
- [Self-serve budget changes](https://docs.litellm.ai/docs/proxy/self_serve_budgets.md)
