Skip to main content
Browse all guides
All guides

Credits

Credits measure the cost of work performed by Dooap Studio.

Credits are billed per Work Unit, not per individual run. A Work Unit groups together all related runs that belong to the same overall piece of work. Credits give teams a simple, consistent unit to track and compare usage across different model types and step configurations.

For example, a Work Unit could include multiple actions that are triggered in a chain, such as OCR and coding automation for a single invoice triggered by invoice import event. The total credits for that Work Unit would reflect the combined cost of all those actions.

Dooap uses a cost plus -pricing to calculate token per credit limits. Token limits are directly proportional to e.g. Azure OpenAI pricing.

Key Principle

  • Cheaper models → more tokens per credit
  • More expensive models → fewer tokens per credit

To ensure minimal credit spend, select the most efficient model that can provide the required outcome.

Note that more tailored prompts, while increasing input token spend, may significantly reduce the expensive output token usage. A better prompt may also allow switching to a more efficient model.

What Counts Toward Credits

Each step in a run can consume credits from one or more of these sources:

  • Input tokens sent to an LLM.
  • Output tokens generated by an LLM.
  • OCR pages processed by a document extraction model.
  • Step run time (measured in seconds), for steps that are not billed by tokens.

Run time counts only for non-agent steps. Agent Steps are billed through their token usage, so their run time is excluded — charging both would bill the same work twice. Container steps (Switch and Loop Over) also add no run time of their own, because their duration only wraps the steps inside their routes; the steps inside the routes are billed individually.

What Is a Work Unit

A Work Unit is the billing unit for a run or a chain of related runs.

  • A manual run creates a new Work Unit.
  • A reprocessed run creates a new Work Unit.
  • Child actions triggered by another action stay in the same Work Unit.
  • Error actions triggered during the same chain stay in the same Work Unit.

Example

If Action A is triggered and then triggers Actions B and C, all three runs belong to the same Work Unit.

How Step Credits Are Calculated

For each step, Studio calculates a decimal credit value by dividing actual usage by the per-credit rate of the model or resource:

Step credits =
    (input tokens used ÷ input tokens per credit)
  + (output tokens used ÷ output tokens per credit)
  + (pages processed ÷ pages per credit)
  + (run seconds ÷ seconds per credit)

Each component is only included when both the usage value and the rate are available. For example, an LLM step with no OCR usage skips the pages component entirely. The run seconds component is skipped for Agent Steps (billed by tokens instead) and for Switch and Loop Over steps (their duration only wraps the steps inside their routes). Time spent waiting for human input is never billed.

Example

Suppose an Agent Step processes 5,000 input tokens and generates 4,000 output tokens. The assigned model allows 5,000 input tokens per credit and 2,000 output tokens per credit:

Step credits = (5,000 ÷ 5,000) + (4,000 ÷ 2,000) = 1.0 + 2.0 = 3.0

How Work Unit Credits Are Calculated

Studio first calculates decimal credits for each run step. Each run contributes its usage, or its configured fixed price or bounded usage, to the Work Unit. Studio sums these contributions and rounds the Work Unit total once to two decimals.

  • Without a configured fixed price or minimum, a Work Unit with no billable usage costs 0 credits.
  • Rounding happens once at the Work Unit level, not separately for each run.

Examples

Work Unit step creditsSumBilled credits
1.0 + 2.03.03.00
0.5 + 1.2 + 0.62.32.30
0.4 + 1.244 + 0.2031.8471.85
0.1 + 0.050.150.15
0.00.00.00

In the third example, the usage could come from multiple runs inside one Work Unit. The total is still rounded only once after everything is added together.

When Credits Run Out

Each tenant has a credit plan. A newly created tenant starts with its credit plan enabled, using soft enforcement and a balance of 0 credits: usage is recorded from the first run, and the balance may go below zero without any runs being rejected. A Global Admin can then top up the balance or change the plan, for example to hard enforcement or a scheduled renewal.

When the plan uses hard enforcement and the balance falls to the plan's cut-off threshold (or a trial period ends), Studio stops starting new billable runs:

  • Automated runs (events, webhooks, mailboxes, schedules, API endpoints) are recorded with the status No Credits and are not executed. They appear in the Runs list under that status filter.
  • Manual runs are refused with an error message before anything is queued.
  • Child runs triggered by an already running Action Flow are not cut off mid-chain; the check happens only when a new Work Unit starts.

Runs rejected for missing credits are treated like failures for notification purposes: if the tenant has action failure email notifications enabled, the configured recipients receive an email for each rejected run so the situation does not go unnoticed. Error Actions are not started for rejected runs, because they would be rejected for the same reason.

Low credits alerts

A Global Admin can enable a low credits alert on a tenant's credit plan. When the balance drops to the configured threshold or below, the listed email addresses receive an alert with the tenant name, remaining balance, and a link to the tenant's credit settings. An optional webhook URL receives the same details as a JSON POST. The alert fires once per crossing and re-arms when a top-up, adjustment, reset, or renewal lifts the balance back above the threshold. Use it to top up before runs start being rejected.

Free-of-charge Actions

A Global Admin can mark an Action as free of charge. Such Actions consume no credits, and their runs are never rejected for missing credits, even when the tenant balance is zero or the trial has ended. Actions triggered from a free-of-charge Action inherit its Work Unit, so they are not cut off either.

Free-of-charge applies to the Action, not to one version of it. Once marked, runs of every version are free: the published version, draft test runs, and versions edited or published later. It stays in place until a Global Admin unmarks it.

Fixed-credit Actions

A Global Admin can also price an Action at a fixed number of credits per run, for example 0.5 or 2 credits. Each run of such an Action consumes exactly that amount, regardless of its tokens, OCR pages, or run time. The price supports up to two decimals.

  • The fixed price applies to every run that started executing, whether it completed, failed, or was cancelled. Runs rejected for missing credits consume nothing.
  • Steps of a fixed-price run show 0 credits; the run itself carries the fixed price, and it adds to its Work Unit like any other run.
  • Actions triggered from a fixed-price Action are billed by their own pricing, so a chain can mix fixed-price, usage-based, and free-of-charge runs.
  • Unlike free-of-charge Actions, fixed-price Actions still need available credits: when credits run out, their runs are rejected like any other billable run.
  • An Action is either usage-based, free of charge, or fixed price. Setting a fixed price removes the free-of-charge mark, and marking the Action free of charge removes its fixed price.
  • Neither setting is copied when an Action is duplicated, exported, or imported.

Global Admins set the price from the Action's ⋮ menu in the Actions list (Set fixed credits). Fixed-price Actions show a credits/run badge, and their runs show the credits they were charged.

Minimum / Maximum Credits

Global Admins choose Set min/max credits from an Action's menu to put bounds on consumption-based credits per run. Minimum can be 0, and maximum is optional. Amounts support two decimals, from 0 to 100000; maximum must be at least minimum. Leave both fields blank or choose Remove bounds to restore ordinary usage-based pricing.

For a minimum of 0.5, a run using 0.1 credits is billed 0.5, while one using 10 credits is billed 10. Adding a maximum of 2.25 caps that 10-credit run at 2.25. The maximum limits billing, not execution.

  • Bounds apply to each run that started, including failed and cancelled runs. Pending, rejected and skipped runs do not receive a minimum charge.
  • Step credits retain the actual usage. The run's contribution to its Work Unit is bounded before the existing two-decimal rounding. Each triggered Action, including an error Action, has its own pricing; a parent's ceiling does not cap its children's charges.
  • Saving bounds replaces free-of-charge or fixed pricing. Selecting either of those modes removes both bounds. Clearing absent bounds does not change another pricing mode.
  • Bounds do not exempt an Action from the existing available-credit checks, even when minimum or maximum is zero.
  • Bounds are not copied when an Action is duplicated, exported or imported. Saved run records retain the bounds used for accounting.

Fixed Prices and Credit Bounds Apply to One Version

A fixed price or credit bounds are set for one version of the Action: its published version, or its latest version if it has never been published. Only runs of that version receive the price or bounds. Every edit creates a new version, so runs of a changed Action — draft test runs and later published versions — are billed by usage. Free-of-charge applies to every version and needs no confirmation.

When the published version changes, the Action's credits/run badge turns amber. A Global Admin reviews the changes and confirms the pricing for the current version: open Change fixed credits or Set min/max credits and Save.

Where to See Credit Usage

  • Run details show the Work Unit summary at the top of the page.
  • Tenant usage reporting shows Work Unit credit usage over time.
  • Run detail step logs still show token counts and durations that help explain where usage came from.

Use credit data to identify expensive runs, compare model costs, and optimize Action Flows.

Practical Tips

  • Review credit totals after changing models or adding steps to catch unexpected cost increases.
  • Use output filters on inputs and tools to reduce token counts, which directly lowers credits.
  • Run time contributes credits based on wall-clock time for each non-agent step, so keep Action Flows efficient. Agent Steps are billed by tokens instead of time.
  • Compare similar runs to spot regressions in token usage or processing volume.
  • Credits round per Work Unit, not per step or per run.
  • Trigger chains are often cheaper than billing each run separately, because the total is rounded once for the whole Work Unit.