ai-billing
AI Billing
Quick Start
Wrap any Vercel AI SDK model with tracked() to automatically bill for token usage:
import { Commet } from "@commet/node";
import { tracked } from "@commet/ai-sdk";
import { anthropic } from "@ai-sdk/anthropic";
import { generateText } from "ai";
const commet = new Commet({ apiKey: process.env.COMMET_API_KEY! });
More from commet-labs/commet-skills
commet-webhooks
Use when setting up Commet webhook endpoints, verifying signatures, handling billing events (subscription.created, subscription.activated, subscription.canceled, subscription.updated, payment.received, payment.failed, invoice.created), or building event-driven billing workflows.
20billing-behaviors
Commet behavior rules and business logic. Use when implementing billing features, subscription changes, plan changes, proration, pricing, credits, balance, intro offers, or any billing edge case. Contains detailed rules for how changes affect customers.
20commet
Integrate Commet billing and payments into any application. Use when working with @commet/node, @commet/next, @commet/better-auth, the Commet CLI, or building billing features like subscriptions, usage tracking, seat management, checkout, customer portal, webhooks, feature gating, or payment flows. Triggers on imports from "@commet/node", "@commet/next", "@commet/better-auth", commet SDK usage, billing integration tasks, or mentions of Commet.
19commet-cli
Use when working with the Commet CLI -- logging in, linking projects, pulling types for autocomplete, scaffolding new projects from templates (fixed, seats, metered, credits, balance-ai, balance-fixed), or managing organizations.
18