Docs › Core › Account & usage

Account & usage

zpi.account() returns your plan and the calling key's label; zpi.usage() returns the monthly quota (in Zap once Zap is on, else requests), the per-minute window and a 24-hour summary. Both are free and keep answering when the quota is spent, which is when you need them.

account.ts
const account = await zpi.account();
// { tier: "pro", planStatus: "active", planExpiresAt, apiKey: { name, keyPrefix, enabled } }

const { quota, rateLimit, summary } = await zpi.usage();
console.log(`${quota.remaining} ${quota.unit} left until ${quota.resetAt}`);
Edit this page on GitHubWas this page helpful? ·