Skip to content

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_IMAGE and FEA_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.

For modelling credits, find out the type of operation each feature consumes.

  • FEA_SKP_AI_IMAGE deals with images.
  • FEA_SKP_AI_SUPPORT_CHAT deals with input tokens and output tokens.

Proposed event types:

  • EV_IMAGES_V1
  • EV_INPUT_TOKENS_V1
  • EV_OUTPUT_TOKENS_V1

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
}
  • Assume FEA_SKP_AI_IMAGE consumes 100 credits for 1 image.
  • Assume FEA_SKP_AI_SUPPORT_CHAT consumes 2 credits for 1 input token.
  • Assume FEA_SKP_AI_SUPPORT_CHAT consumes 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_CHAT usage 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_CHAT usage 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.