Overview
Custom formulas enable you to specify how event dimensions (e.g., token count, file count, duration) influence credit burn. Each metered feature can define its own formula. Stigg then applies the formula in real time when usage events are reported. This feature works with all existing credit-based pricing models and integrates automatically with credit enforcement, metering, and the credit ledger. Use this feature if:- Your usage events contain multiple metadata fields that affect cost.
- Different workloads or models should consume credits at different rates.
- You need more accuracy than fixed per-unit pricing provides.
- Your product uses AI, media processing, data transformations, or variable-intensity workloads.
Key capabilities
- Custom event-based formulas – Define mathematical expressions that map event dimensions to credit consumption.
- Per-feature calculation – Each metered feature can apply a different formula.
- Use event dimensions as parameters – Reference dimensions such as tokens, files_processed, or any event metadata field.
- Real-time deduction – Credits are deducted immediately upon event ingestion.
- Full audit trail – All calculations are visible in the credit ledger, including parameter values and resulting credit burn.
Example use cases
Multi-input processing
For events that include multiple workload types (e.g., documents, emails, images):Multi-model LLM operations
For workflows that include several LLM calls with different weights:Uniform token-based deduction
If each agent or sub-model contributes separate token counts:Configuration guide
- Go to Product catalog.
- Select Plans.
- Select a plan.
- Select Edit.
- Scroll down to the Price section.
- Click Edit.
- In the Set price section, scroll down to Credit consumption.
- Select the configuration, for example, Prototype generations.
- Set the Calculation mode to Advanced formula.
- Enter the forumula into the formula field.
- Click Save changes.
- Click Review and publish.
- Set what the changes will affect.
- Click Publish changes.
