Skip to main content

Credits and budgets

In one sentenceLumen charges every run in credits, drawn from one pool per workspace: a fixed weight for each step that succeeded plus model tokens for AI steps; an optional monthly budget on a flow or the whole workspace holds new runs once it is used up, never failing them.

One unit, credits, covers everything a run uses. There are no separate line items for compute, storage per run or API calls. A step's weight stands for what it costs to run, so the price of a flow is something you can add up in advance and read back on every run.

This page explains the model. To read the Billing screens, see Billing and usage.

What a run costs​

run credits = the weight of each step that succeeded
+ model tokens at the model's credit rate (nothing on your own key)
  • Step weights. Every step in the catalog has a weight, shown next to it in the editor as an estimate. Most steps weigh 1 or less. A few weigh 0, such as the agent memory tools Remember and Recall, and a few weigh more: Merge them into one PDF and Split the PDF are 3, and Read a scan or photo is 5 because a photo has no text to read. A step whose catalog entry states no weight counts as 1 credit, so nothing is free by being left out.
  • Only success is charged. A step that fails costs nothing, and neither does one that is skipped. A step reused when you run again from a step (its earlier outputs are copied, not run again) costs nothing either.
  • Model tokens. An AI step also pays for the tokens its model reads and writes, at that model's credit rate per thousand tokens, rounded up so a call is never charged as less than it was. A step that does not call a model costs only its weight.
  • Precision. Credits are counted in thousandths. The smallest amount is 0.001, and sums are exact.

The flow editor shows an estimate on each step and for the whole flow. It is the sum of the weights, so a flow with an AI step reads as a floor: the tokens come on top and depend on the documents.

Agents and their tool calls​

An agent step is charged its own weight and its tokens. When the agent calls a tool (another step, such as finding a row or sending an email), each successful call costs that tool's weight, per call and not per declared tool. A failed call costs nothing. If a tool itself calls a model, its tokens are counted with the agent's.

An agent can be capped. Its limits.maxToolCredits is the most its tool calls may be charged in one run of the step. The call that would pass it is not made, and the agent stops with that reason. Unset, tool calls are bounded by the agent's turn limit only. The run page and Billing show tool credits under the agent. See Agents and Models and cost.

Your own model key​

On a plan that includes it, a workspace can add models on its own provider key. A call on your own key costs no token credits, because your provider bills you for those tokens directly. The step's weight is still charged, and Billing lists the tokens on your key separately as Your own models.

Free flows​

Some of Lumen's own system flows, such as the ones behind problem reports, are free: they are metered but never charged and never held by a budget. You cannot mark your own flow free.

Tests​

Trying a single step in the editor is metered but never charged. An evaluation, which runs a flow on its test cases, is charged at the normal rate and marked as an evaluation in the ledger. Neither counts against a budget. See Test and evaluate.

Budgets​

A budget caps how many credits runs may use in a calendar month. There are two kinds.

BudgetSet byWhere
A flow's budgetThe flow's authorspec.budget.monthlyCredits on the flow
The workspace's budgetA workspace adminThe budget endpoint of the runtime API

A budget counts the credits of the runs that started in the month, runs still in progress included. It is checked when a run is admitted, and two things follow:

  • A run that would go over is held, not failed. It waits with the status On hold and a reason of budget. Nothing it carries is lost.
  • Runs already going are not stopped. A budget decides whether a new run may start, never whether a run in progress may finish.

A held run starts by itself as soon as the reason clears: the month turns over, or the budget is raised or removed. Setting a budget of 0 holds every new run. No budget, or an empty one, is no limit.

Notices at 80% and 100%​

For the workspace budget, the workspace's admins are told at 80% and again at 100%, once each per month. The notice appears in their in-app inbox, titled Workspace budget: 80% used and Workspace budget reached, and links to Billing. An alert rule for a budget threshold can tell people too; see Alerts.

credits-capped-invoice-flow.yaml
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
name: credits-capped-invoice-flow
namespace: tenant-acme
spec:
displayName: Keep invoice PDFs (capped)
budget:
monthlyCredits: "200"
triggers:
- id: email
ref: {name: email-arrives}
connectorRef: {name: invoices-inbox}
config: {attachments: separate, requireAttachment: true}
next: [pdfs]
nodes:
- id: pdfs
stepRef: {name: keep-pdfs}
next: [keep]
- id: keep
stepRef: {name: keep-in-lumen}

Plans​

A workspace is on a plan, which sets its limits and the features it has. A workspace with none named is on Pro. The plans that ship are:

ProTeamEnterprise
Seats (every member, admins included)520100
Parallel runs310Unlimited
Flow history kept30 days90 daysForever
Models on your own keyYes
Single sign-onYes
Billed byCreditsCreditsLicense
ComputeSharedSharedDedicated

An installation can edit these numbers or add plans of its own, so the figures on your Billing page are the ones that apply to you. A few notes:

  • Parallel runs. Runs beyond the limit are queued, never failed.
  • Credits-billed plans have a monthly fee with included credits, then top-ups. The prices and included credits are set by whoever runs the installation. When the plan sets a credit price, Billing also shows credits as dollars; otherwise credits only.
  • License plans (Enterprise, and installations in your own cluster) are metered for visibility and never charged.
  • A feature your plan does not include is shown with the plan that would unlock it, for example "Available on Enterprise".

Savings​

Saved by Lumen on Billing reports model tokens Lumen kept away from the models, and what they would have cost. It does not measure time saved by automating a chore, and it is not money you were refunded. It counts two kinds of token, never mixed:

FigureKindHow it is worked out
Tokens savedEstimatedLumen avoids sending duplicate or unneeded images to the model, and the tokens that would have cost are counted here.
Tokens served from cacheReportedInput tokens the model provider served from its prompt cache, which it reports itself.
Estimated worthEstimatedThe saved tokens of agent steps at each model's input credit rate, shown in credits, and in dollars when the plan sets a credit price. Steps on your own key are valued in dollars at the provider's input price.
Data deduplicatedMeasuredThe size of duplicate images never stored again.

Each run also shows an icon with the tokens it saved.

Next steps​