Models and cost
An agent runs on a model. Lumen offers platform models you pay for in credits, and on a plan that includes it you can add models on your own provider key, whose tokens cost no credits. The flow editor estimates what a run will cost before you turn it on.
Which model an agent uses
Lumen picks the model in this order and uses the first that applies:
- The model the agent names for itself (its Model segment, or
modelRefon a flow node). - For an agent that only fills fields and has no tools, the platform's fast model, if the installation has one, it is offered to your workspace, and your workspace default is not a model on your own key. See Find details in documents.
- Your workspace's default model.
- The platform's default model.
If none of these exists, AI is not switched on for the workspace and AI steps say so instead of running.
See and choose models
Look at your models
- Open Settings. The Models card has two lists: Platform models and On your own key. Each row shows its Provider, Model and Status.
- The row marked Default is what agents use when they name no model. Admins can set another with the star (Set as the default for this workspace). A model that is the default cannot be deleted until you pick another.
- If no default is set, the card says AI steps run on a named platform model, or that they do not run yet when the platform has none.
Choose a model for one agent
- Open the agent, then its Model segment, and pick a model. Left empty, the agent uses your default.
- Save. A saved agent records this in its next revision.
Which models are on the Platform models list depends on your installation. Some can be limited to certain workspaces.
Bring your own key
A model on your own provider key is billed by your provider, not in credits. Lumen still records the calls for audit, limits and metering. Only the key is yours.
Models on your own key are the byoModel feature of a plan. The default Enterprise plan includes it; Pro and Team do not. Without it, Add model is not offered and the console says the feature is not part of your plan.
- Console
- YAML
- In Settings, Models, click Add model. Only admins see it.
- Enter a Name (lowercase letters, digits and dashes; it cannot change later), choose the Provider, and enter the Model id, for example
claude-sonnet-5-5. List models shows what the key can reach. - Paste the API key. It is stored securely and never shown again, not even to admins.
- Click Test, then Save. Lumen checks the key once. The row's Status reads Ready, or says why not: Key rejected, Model not found, No key, Provider not allowed, Settings not valid.
- Use the star to make it the workspace default, or pick it in an agent's Model segment.
apiVersion: lumen.ai/v1alpha1
kind: ModelClass
metadata:
name: our-claude
namespace: tenant-acme
spec:
provider: anthropic
model: claude-sonnet-5-5
credentialsRef:
name: our-claude-key
credentialsRef names a Secret in the workspace holding the key under apiKey. The console writes it for you. On a self-hosted installation it can be fed from your own secret store. A model that is not Ready is refused by AI steps.
To use it on one agent node:
config:
modelRef: {kind: ModelClass, name: our-claude}
An installation allows a set of providers, for example Anthropic and OpenAI, and may allow more providers (Azure OpenAI, Gemini, Vertex, Bedrock, Mistral and others). A provider outside that set is Provider not allowed. Some providers take non-secret settings besides the key, such as a region or a base URL.
How tokens become credits
A run is charged credits for what its steps do. For an AI step:
agent credits = the step's weight
+ input tokens x the model's input rate
+ output tokens x the model's output rate
+ each successful tool call x that tool's weight
The step's weight is 3 credits for an agent with tools and 1 for an agent that only fills fields. Rates are credits per 1,000 tokens, input and output. A model with no rate is not charged for its tokens, and a model on your own key never is. A tool call that fails costs nothing.
For example, at a rate of 0.2 credits per 1,000 input tokens and 1 per 1,000 output tokens, a call that uses 10,000 tokens in and 1,000 out costs 2 + 1 = 3 credits, on top of the step's weight.
Each model's credit rate is shown on the Models page in the console. For how credits, plans and budgets work, see Credits and budgets.
Estimates in the editor
Every step on the canvas shows what it will cost, and the flow shows the total next to its name. Click it to open What this flow costs per run.
- Per run and a month at the Runs a month you enter. With no runs in the last 30 days, a month is estimated at 100 runs.
- Each step's share, and for a step that runs only on some paths, how often a run reaches it.
- Where it comes from. With at least 5 runs of a step, the estimate uses the flow's own history: the typical tokens, priced at the model's rate today. It says Estimated from this flow's last N runs, and is firmer from 20 runs. Before that it is A typical estimate from a table of typical sizes by kind of step and model.
- Warnings. Some steps run on your own AI key: their AI usage costs no credits, A model here has no credit price yet, so its AI usage is not counted, and AI is not switched on for this workspace, so the AI steps' usage is not counted.
- Turning on a flow whose month would use more than the included credits you have left asks first: Turn on this flow?
An estimate is an estimate. The run itself shows what it used, and an agent's Try it shows its tokens and tool credits.

