🎉 Announcing our $3 million seed round
Logo
Getting Started

Credit Grant

What is a Credit Grant?

A credit grant is a record of credits granted to a subject. Credits can be granted with an effective date, expiration date, priority, and rollover configuration.

Example

Granting 10,000 GPT-4 tokens to customer-1 with a one-year expiration.

A credit grant has the following properties:

PropertyDescription
SubjectThe subject to which the credits are granted.
Feature IDThe feature for which the credits are granted.
PriorityThe priority of the grant.
AmountThe number of credits granted in the unit of the feature.
Effective dateThe date when the grant becomes active.
ExpirationConfiguration when the grant expires. Like in a month, in 10 days, etc.
RolloverWhether the unused credits will be rolled over to the next period.

Expiration

The expiration of the grant is configured by the expiration period and the count of the period. For example, you can configure the expiration to be in 1 month, 10 days, etc. Expiration is calculated based on the effective date of the grant. When the grant expires, the remaining credits are removed from the subject's balance.

We configure expiration with period and period count so the system can re-apply expiration settings for rollover grants.

Priority

The priority of the grant. Grants with higher priority are applied first. Priority is a positive decimal number. With lower numbers indicating higher importance. For example, a priority of 1 is more urgent than a priority of 2. When there are several grants available for the same subject, the system selects the grant with the highest priority. In cases where credit grants share the same priority level, the grant closest to its expiration will be used first. In the case of two credits having identical priorities and expiration dates, the system will use the grant that was created first.

Rollover

Rollover is an optional configuration for credit grants. You can configure rollover with the remaining or original amount. In the case of ledger reset, a rollover with the remaining amount re-applies the unused amount of the grant from the previous period. While rollovers with the original amount config re-issue the full grant amount. Rolloed-over grants get a new ID, new effective date and expiration date based on expiration settings.

Last edited on May 13, 2024