Application credits modelling example
- Assume the customer admin of an account (CDH) has purchased and provisioned 1000 credits via E-Commerce.
- Consider the Sketchup Web application, using two features:
FEA_SKP_AI_IMAGEandFEA_SKP_AI_SUPPORT_CHAT.- Application Name — Sketchup Web
- Feature Name —
FEA_SKP_AI_IMAGE - Feature Name —
FEA_SKP_AI_SUPPORT_CHAT - Assume the Application ID and Feature IDs are the same as their names.
Determining event types
Section titled “Determining event types”For modelling credits, find out the type of operation each feature consumes.
FEA_SKP_AI_IMAGEdeals with images.FEA_SKP_AI_SUPPORT_CHATdeals with input tokens and output tokens.
Proposed event types:
EV_IMAGES_V1EV_INPUT_TOKENS_V1EV_OUTPUT_TOKENS_V1
Determining event measures
Section titled “Determining event measures”Ensure the internal engines used for features can give a quantity of event measure.
FEA_SKP_AI_IMAGE — how many images are rendered by one user prompt? The user generated a single
image through a prompt, so the event measure value is 1.
Usage Event
{ "featureID": "FEA_SKP_AI_IMAGE", "eventType": "EV_IMAGES_V1", "measure": 1}FEA_SKP_AI_SUPPORT_CHAT — how many input tokens and output tokens are consumed by one user
prompt? The user consumed 100 input tokens and 400 output tokens, so two separate usage events are
created.
Usage Event 1
{ "featureID": "FEA_SKP_AI_SUPPORT_CHAT", "eventType": "EV_INPUT_TOKENS_V1", "measure": 100}Usage Event 2
{ "featureID": "FEA_SKP_AI_SUPPORT_CHAT", "eventType": "EV_OUTPUT_TOKENS_V1", "measure": 400}Rate card configuration
Section titled “Rate card configuration”- Assume
FEA_SKP_AI_IMAGEconsumes 100 credits for 1 image. - Assume
FEA_SKP_AI_SUPPORT_CHATconsumes 2 credits for 1 input token. - Assume
FEA_SKP_AI_SUPPORT_CHATconsumes 1 credit for 1 output token.
Total credits consumed when the usage events are ingested:
FEA_SKP_AI_IMAGE- Usage event measure = 1 image.
- Rate card for 1 image = 100 credits.
- Credits consumed = 1 × 100 = 100 credits.
FEA_SKP_AI_SUPPORT_CHATusage event 1- Usage event measure = 100 input tokens.
- Rate card for 1 input token = 2 credits.
- Rate card for 100 input tokens = 100 × 2 = 200 credits.
FEA_SKP_AI_SUPPORT_CHATusage event 2- Usage event measure = 400 output tokens.
- Rate card for 1 output token = 1 credit.
- Rate card for 400 output tokens = 400 × 1 = 400 credits.
Balance after all events are ingested:
- Balance at start = 1000 credits.
- Credits consumed = 100 + 200 + 400 = 700 credits.
- Balance left = 1000 − 700 = 300 credits.
Data preparation required from integrators
Section titled “Data preparation required from integrators”- Define and document the application’s core feature names for metering.
- Determine the requisite event types (for example, input tokens, images) for each feature. Integrators must confirm alignment with the available event types by consulting the Credits team.
- Establish the definitive rate card, specifying the consumption of credits per unit of measure for every feature and event type combination.
- Coordinate directly with the Trimble Credits team for the formal configuration and deployment of these parameters.