# Billing and usage

> Read how many credits you have left and which flows spent them, see what Lumen saved, export the ledger, and cap spending with a budget.

Source: https://docs.go-lumen.ai/he/operate/billing-and-usage

Read what your workspace has spent, find the flows that spent it, and set a monthly budget so a runaway flow cannot. This page is the task; the model behind credits is on the Credits and budgets page under Next steps.

-   Console, YAML and API
-   Budgets need a workspace admin

## Read your credits

Open **Billing**. The month picker at the top right moves between calendar months (months are counted in UTC). The top card answers "how much is left".

![The Billing page. A card reads Growth plan, 4 of 10 seats, then 4,893 credits left, Worth $1.07 of $50.00 this month, $48.93 left. A ring shows 2% used, with the lines 107 of 5,000 used and Resets January 1, and a forecast line At this pace: about 1,153 by month end. Buttons Talk to us to upgrade and Compare plans. Below, a Flow usage card with a Usage history link, and a Saved by Lumen section with four figures.](https://docs.go-lumen.ai/he/img/operate/billing-and-usage-01-credits-and-savings.png)

*Billing: credits left, the plan, a forecast, then what Lumen saved.*

-   The big number is the credits **left** of the plan's included credits, with the month's use beside it (**107 of 5,000 used**) and the date it **Resets**.
-   **At this pace** forecasts the month-end total from the days so far.
-   If you used more than the plan includes, the card reads **over the included amount** instead of **left**.
-   A plan billed by license shows **License: usage is tracked, not charged**. Usage is still counted, so you can see it.
-   **Compare plans** lists seats, parallel runs and included credits for each plan. **Talk to us to upgrade** starts a request to change plan.

Further down, **Plan details** shows your seats, parallel runs, how you are **Billed by** and whether compute is shared or dedicated.

> **Invoices:**
> 
> There are no invoices to download in the console yet. The ledger export below is the record of every charge.

## See which flows spent them

Further down the Billing page, **Daily usage** is a bar per day, with last month's days beside it for comparison. **Where credits went** ranks your flows by credits for the month, with each flow's share and run count. Click a flow for its detail: credits per step, the work done by AI models (tokens in and out), and tool calls.

![The Daily usage chart: one blue bar per day of this month beside grey bars for last month, with 107 credits used and an up arrow of 39 percent against the same days last month. Below, Where credits went: 107 credits across 15 flows, a ranked list of flows as horizontal bars with the credits, share and number of runs on the right, starting with Route invoices by amount at 38 credits.](https://docs.go-lumen.ai/he/img/operate/billing-and-usage-02-daily-and-flows.png)

*Daily usage, and where the month's credits went, flow by flow.*

When a flow runs on your own model key, its tokens cost no credits. They appear under **Your own models** as tokens in, out and total, and your provider bills them.

### Usage over any range

For a range other than a month, click **Usage history** on the Flow usage card, or open `/billing/usage`.

![The Flow usage page. Three cards: Credits used, 107 of 4,000 this period at 3%; Credits reset, in 29 days on January 1; and Average daily usage, 37.2 per day, On track to last until the reset. Below, a date range from 2026-12-01 to 2026-12-03, a Search flows box and a table of flows with Runs, Steps, Credits and Last run.](https://docs.go-lumen.ai/he/img/operate/billing-and-usage-03-flow-usage.png)

*Flow usage: pick a date range of up to 90 days and see each flow's runs, steps and credits.*

The three cards give **Credits used** this period, when credits **reset**, and **Average daily usage**. It says whether you are **On track to last until the reset** or, at this pace, the date you **run out**. The date picker takes up to 90 days. Each flow shows as **Live**, **Paused** or **Deleted**, and flows Lumen runs for you are marked **System flow**.

## Export the ledger

Every charge is a row in the credits ledger. On **Billing**, pick the month and click **Export CSV**. The file is `lumen-credits-YYYY-MM.csv` and has a row per entry with these columns: `time`, `type`, `run`, `node`, `step`, `credits`, `weight`, `token_credits`, `input_tokens`, `output_tokens`, `byo`, `attempts`, `wall_ms` and `tool_credits`.

From the CLI, `lumen get ledgerentries` lists the entries.

## Saved by Lumen

The **Saved by Lumen** section shows model tokens that never had to be paid for. It has four figures for the month, and each says whether it is estimated or reported.

| Figure | What it is |
| --- | --- |
| **Data deduplicated** | The size of duplicate images Lumen did not store or send again, with their count. |
| **Tokens saved** (**Estimated**) | Lumen avoids sending duplicate or unneeded images to the model, and the tokens that would have cost are counted here. |
| **Tokens served from cache** (**Reported**) | Not an estimate. The model provider reports the input tokens it served from its cache, and they count as saved. |
| **Estimated worth** | Those saved tokens priced at your models' input rate, in credits and in dollars at your plan's credit price. Steps on your own key are in dollars at the provider's input price. |

The saved tokens are tokens only. A run's own saving shows as a lightning icon in the **Runs** list and on the run, with "Saved about 5,545 tokens" and its worth.

## Budgets

A budget is a monthly cap in credits. When a flow or the whole workspace has used its budget, new runs are admitted **On hold** instead of starting. They start by themselves when the month turns over or the budget is raised or removed.

How it counts:

-   It counts the credits of runs that started in the calendar month (UTC), including what a run still going has used so far.
-   It is checked when a run is admitted, so runs already going are never stopped. It is a brake, not a hard ceiling: runs admitted together can pass it between them.
-   A budget of `0` holds every new run. No budget means no limit.
-   Tests of a single step from the editor are not counted. A flow marked free is never held.
-   When the workspace passes **80%** and **100%** of its budget, every workspace admin gets a notification in the bell, once each per month.

The console does not have a form for budgets yet. Set them as follows.

**YAML:**

A flow's own budget is part of the flow:

```yaml title="billing-capped-flow.yaml"
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
  name: billing-capped-flow
  namespace: tenant-acme
spec:
  displayName: Invoice pile with a monthly cap
  budget:
    monthlyCredits: "500"
  triggers:
    - id: manual
      ref: {name: manual-run}
      next: [pdfs]
  nodes:
    - id: pdfs
      stepRef: {name: keep-pdfs}
      next: [merge]
    - id: merge
      stepRef: {name: merge-pdfs}
```

**API:**

The workspace budget is set through the runtime API, as a workspace admin:

```http title="Set the workspace budget"
PUT /apis/runtime.lumen.ai/v1alpha1/namespaces/tenant-acme/budget
{"monthlyCredits": "5000"}
```

Send `{}` to remove it. `GET` on the same path returns this month's use for the workspace and each flow, and the 80% and 100% alerts raised so far. `GET .../flows/{flow}/budget` returns one flow's use. Credits take at most three decimals.

A held run says why on its page. See [Runs, retries and history](https://docs.go-lumen.ai/he/operate/runs-and-retries.md#held-runs).

## Next steps

[Credits and budgetsHow a run is priced, and what a credit is.](https://docs.go-lumen.ai/he/concepts/credits-and-budgets.md)[Models and costChoose models and your own key to control AI spend.](https://docs.go-lumen.ai/he/ai/models-and-cost.md)[AlertsGet a message when spending jumps.](https://docs.go-lumen.ai/he/operate/alerts.md)[Runs, retries and historyOpen the runs behind a number.](https://docs.go-lumen.ai/he/operate/runs-and-retries.md)
