@lanlinling/lab-billing
v0.1.0
Published
Shared Lab billing quote contract for TypeScript products
Readme
@lanlinling/lab-billing
The TypeScript client for the shared Lab billing contract. It contains no provider price table and no secrets. Cost and sales-policy facts live in the shared Supabase platform schema.
const quote = await quotePlatformCharge(service, {
experimentId: "english_testing",
action: "tts",
provider: "volcengine",
model: "doubao-tts-2",
usage: { unit: "char", chars: text.length },
});The caller passes quote.costCny and quote.sellCny to the server-only debit_wallet RPC after choosing the product-appropriate charge point.
