Check your AI credit balance and browse available models.
[GET https://brandapp.reopt.ai/api/v1/brandapp/d3b411cf-09ac-4564-bf10-c020549563e2/ai/models] AI API is not enabled for this BrandApp
How to enable:
import { getAi } from "@/lib/ai";
// Check credit balance
const ai = await getAi();
const credits = await ai.credits();
console.log(credits.balance); // Current balance
console.log(credits.limit); // Credit limit
console.log(credits.percentage); // Used fraction, 0-1 (e.g. 0.42 = 42% used)
console.log(credits.status); // "normal" | "warning" | "critical" | "exhausted"
console.log(credits.resetAt); // Next reset timestamp, or null when there is no scheduled reset