Credit Consumption and Refunds
Written By Christopher Scaminaci
Last updated 8 days ago
Credit Consumption and Refunds
Automations are billed in credits. Credits abstract the underlying AI token and runtime costs into simple dollar amounts: today, 1 credit corresponds to $0.10 of usage. That conversion is set by StackJack and may be adjusted; your portal always shows authoritative balances and per-run costs.
If your tenant uses BYOK (your own Anthropic API key), runs are billed by Anthropic directly and consume no credits — see BYOK and automations.
What consumes credits
Fast decisions are a separate lane, deliberately
A decision step and a smart filter ask TypeSafe AI for a short typed judgement. That is a different vendor from the one that runs your automations, so it is billed separately from everything in the table above and never folds into a run's own credit total.
- Today StackJack pays for them. Every call is recorded from the day the feature shipped, and nothing recorded before charging is switched on is ever billed to you.
- If charging is switched on later, a decision call costs a small flat number of credits per call — not per token — and it appears in credit history on its own line naming how many calls it covers. A run's own credit total, its per-run ceiling and its refund rules are unchanged by it.
- A decision call made on your own TypeSafe key is never billed by StackJack, and your key is never used for anything else. See Fast Decisions and Your Own TypeSafe Key.
- Your own Anthropic key does not cover fast decisions. Different vendor, different key. Having one on file changes nothing here.
- A refused decision costs you nothing. If the feature is off, your organization has not turned it on, the request was malformed or no key was usable, the step is recorded as skipped and no charge can arise from it.
What drives the cost of a run
A run's credit cost is computed from two components:
- Tokens — input, output, cache-read, and cache-write tokens, at rates that depend on the model the automation uses. Larger models cost more per token; cache reads are heavily discounted relative to fresh input.
- Active compute time — a small charge proportional to the model's actual working time (active seconds), not wall-clock time.
On the ordinary monitor path, StackJack attempts a final Anthropic usage read when the run ends and settles that result against the reservation. Interruption and recovery paths can have to reconcile from the best persisted counters when the final provider read is unavailable. While a run is active, the Portal's usage and credit figures are partial; a just-terminalized or recovered run can briefly await the idempotent final settlement. The per-run detail page identifies the final StackJack ledger charge once settlement completes and separately re-prices token anatomy using the automation's current model and today's rates.
The reservation model
Every metered run follows a reserve-then-reconcile cycle. The reservation must fit the current balance before work begins, while final reconciliation still settles the best final usage StackJack can obtain if the estimate was low:
- Reserve. Before the run starts, credits are reserved atomically: the lesser of a runtime-based estimate (derived from the automation's model and runtime cap) and the automation's max credits per run setting.
- Refuse cleanly if short. If your balance can't cover the reservation, the run is recorded as
CreditExhaustedwith the required and available amounts in its error message. Nothing is charged. - Meter during the run. Usage is tracked live. If it reaches the per-run cap, the run is stopped at once and ends as
CreditExhausted; the agent is not asked to wrap up first, and its session is shut down. - Reconcile at the end. The actual cost is compared to the reservation:
- Used less than reserved → the difference is refunded (you'll see a Refund transaction).
- Used more than reserved → the difference is deducted as an additional finalize transaction.
Every reservation and reconciliation appears as a separate line in your credit transaction history. The ledger retains the run id for agent-run entries, although the current Recent transactions table shows the transaction description rather than a clickable run link.
The per-run cap is a hard ceiling
For StackJack-managed execution, the max credits per run guardrail (settable per automation, 0.01–500 credits, default 50) is strict. BYOK runs skip StackJack credit metering and this guardrail entirely:
- Mid-run, reaching the cap stops the run at once as
CreditExhausted, with no wrap-up turn. - At reconciliation, any raw usage above the cap is clamped — the excess is absorbed by StackJack, never billed to you.
The runtime guardrail works the same way for time: max runtime is settable per automation between 30 and 3,600 seconds (default 300). See Guardrails and safety controls.
Refund policy by failure type
Negative balances (credit debt)
Reconciliation records the true cost even when a run under-reserved — which can push a balance slightly negative in rare cases. New StackJack-managed runs are refused whenever the available balance cannot cover their full reservation. BYOK execution has no StackJack reservation and is not blocked by the StackJack credit balance.
You can clear this yourself — no support ticket needed. The tenant owner can buy a credit pack from the Credits tab exactly as normal; the purchase settles the outstanding debt first. New StackJack-managed runs become eligible only when the remaining balance covers the full reservation that the next run requests—not merely when the balance becomes positive. A run already refused as CreditExhausted is terminal and does not resume after a purchase; trigger a new run when the balance is sufficient.
Where to see balances and history
Your credit balance, your most recent transactions (the latest 20), and available credit packs are shown on the Credits tab of the Automations area in the portal. Only the tenant owner can purchase credit packs. Agent-run entries are keyed to their run in the ledger; wizard turns and field suggestions use their own turn identifiers. For a customer-visible run total, use Billed on the run detail page.
On a recovered run, the run detail page reports the automatic-restart count and says that the original hold was reused. Read that note together with the run's reservation/refund/finalize entries: for StackJack-managed credits, recovery creates no second reservation and finalization is idempotent per run id.
That single-StackJack-bill guarantee does not apply to BYOK. BYOK bypasses the StackJack credit ledger, and the stranded attempt and replacement attempt may both have generated usage billed directly by Anthropic. Recovery is also a fresh execution, not a continuation: connector-side effects completed before the interruption can be repeated. Operations that must happen only once need vendor-side idempotency or deduplication, and you should inspect vendor state before manually running the payload again.