Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sa4hnd/vibra-code/llms.txt
Use this file to discover all available pages before exploring further.
Vibra Code tracks resource consumption differently depending on which AI agent is powering your sessions. The Cursor agent uses a fixed token (message) quota, while the Claude and Gemini agents consume credits that reflect real API costs. Both modes are tied to the same subscription plans — only the unit of measurement differs.
How token mode works
When the active agent is cursor, each message you send consumes one token from your monthly quota. This is the simplest billing model: you know exactly how many interactions you have left before your period resets.Key fields in the Convex users table
| Field | Type | Description |
|---|
messagesRemaining | number | Messages left in the current period |
messagesUsed | number | Messages consumed since last reset |
lastMessageReset | number | Unix timestamp of the last quota reset |
billingMode | "tokens" | Set automatically when agentType is cursor |
Quota per plan
| Plan | Messages / month |
|---|
| Free | 5 |
| Weekly Plus | 25 |
| Pro | 100 |
| Business | 300 |
| Enterprise | 1,000 |
Reset cycle
Message quotas reset monthly. The lastMessageReset timestamp is updated each time a reset occurs. A new subscription payment (via RevenueCat webhook or Stripe webhook) also triggers a quota top-up, tracked by lastGrantedTransactionId to prevent double grants.Running out of messages
When messagesRemaining reaches zero, new session creation is blocked until the quota resets at the start of the next billing period or you upgrade to a higher plan.How credit mode works
When the active agent is claude or gemini, billing is usage-based. Each AI session accumulates real API costs, and those costs are deducted from your credit balance using a 2× multiplier.The 2× multiplier is a pricing decision, not a technical requirement. It means 1.00ofactualAnthropicorGeminiAPIspenddeducts2.00 from your creditsUSD balance. This margin covers infrastructure, compute, and support costs. The raw API cost is recorded separately in realCostUSD for internal tracking. Key fields in the Convex users table
| Field | Type | Description |
|---|
creditsUSD | number | Remaining credit balance (what you see, after 2× markup) |
creditsUsed | number | Total credits consumed to date |
realCostUSD | number | Actual API cost incurred (internal, pre-multiplier) |
totalPaidUSD | number | Total money paid by the user |
profitUSD | number | Backend profit (payment minus actual cost) |
lastCostUpdate | number | Timestamp of the most recent cost update |
billingMode | "credits" | Set automatically when agentType is claude or gemini |
Credit allocation per plan
| Plan | Credits USD |
|---|
| Free | $5 |
| Weekly Plus | $16 |
| Pro | $40 |
| Business | $100 |
| Enterprise | $400 |
Running out of credits
When creditsUSD reaches zero, new session creation is blocked. You can either wait for your next billing cycle (which replenishes credits) or upgrade to a plan with a higher credit allocation. Existing in-progress sessions may be stopped if the balance is exhausted mid-session.
Cost tracking per session and message
Regardless of billing mode, Vibra Code records granular cost data for every session and every message in Convex.
Session-level tracking (sessions table)
| Field | Description |
|---|
totalCostUSD | Cumulative API cost for the entire session |
messageCount | Number of messages exchanged in the session |
lastCostUpdate | Timestamp of the most recent cost write |
Message-level tracking (messages table)
| Field | Description |
|---|
costUSD | Cost attributed to this specific message |
inputTokens | Number of input tokens sent to the model |
outputTokens | Number of output tokens received from the model |
cacheReadTokens | Tokens served from the prompt cache (reduces cost) |
cacheCreationTokens | Tokens written to the prompt cache |
modelUsed | Model identifier (e.g. claude-sonnet-4-20250514) |
durationMs | Wall-clock time the model took to respond |
These fields are populated by the run-agent Inngest function after each AI turn and are available in real time via Convex subscriptions.
Checking your balance
Your current message quota or credit balance is visible on the Profile tab in the mobile app. The profile screen reads messagesRemaining (token mode) or creditsUSD (credit mode) directly from your Convex user record and updates in real time as sessions run.