Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Nick: min browser billing

Nicolas3ee8d19f05ca
diff --git a/apps/api/src/lib/browser-billing.ts b/apps/api/src/lib/browser-billing.ts
index e0344add0..592619258 100644
--- a/apps/api/src/lib/browser-billing.ts
+++ b/apps/api/src/lib/browser-billing.ts
@@ -6,5 +6,6 @@ export function calculateBrowserSessionCredits(
creditsPerHour = BROWSER_CREDITS_PER_HOUR,
): number {
const hours = durationMs / 3_600_000;
- return Math.max(2, Math.ceil(hours * creditsPerHour));
+ const minCredits = Math.ceil(creditsPerHour / 60);
+ return Math.max(minCredits, Math.ceil(hours * creditsPerHour));
}