ClockNext: create credit
clocknext_create_creditCreate a token-metered credit type for AI usage billing, with pricing automatically computed from live model costs and a margin percent to prevent mispricing.
Instructions
Create a credit type — a token-metered entitlement your product draws down against its agentKey. Pricing is MODEL-GROUNDED: give models (a mixer of enabled catalog model(s) + avg tokens + input/output/cache split) and a marginPercent; the tool reads live model prices and COMPUTES the base price + price-per-credit — you never hand-type a price, so a credit can't be mispriced or grounded in a disabled model. First-class alternative: create/price it in the dashboard (https://payments.clocknext.com/credits) — its live mixer preview is clearer and records the full per-model bundle; use this tool as the fallback (it stores the computed price only). A plan grants the credit via a CREDIT component referencing its id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Credit name. | |
| models | Yes | The model mixer that GROUNDS the price — one or more enabled catalog models with avg tokens + input/output/cache split. The tool reads live prices and computes the base cost; you never type a raw price. | |
| agentKey | Yes | Lowercased stable key you report credit usage against (sent as `agentKey` when recording usage). The credit's durable identity. | |
| description | No | Optional human-readable description. | |
| marginPercent | Yes | Markup over the computed base cost, as a percent (e.g. 100 = double the base = pricePerCredit). | |
| tokensPerCredit | No | How many tokens equal one credit (defaults to 0). Governs how usage draws the credit down. |