Overview
The billing command provides comprehensive tools for managing your Trix
subscription, viewing usage statistics, monitoring credit consumption, and accessing
billing information. Trix uses a metered billing system with included credits and
pay-as-you-go overage.
How Billing Works
Credits are consumed by:
- LLM inference (chat, completions)
- Embeddings generation
- Memory storage
- Search operations
- Compute jobs (enrichment, transcription)
Subscription Status
View your current subscription details and credit balance at a glance.
# View subscription and credits
trix billing status
# Output as JSON
trix billing status -o jsonExample output:
Subscription Status:
──────────────────────────────────────────────────
Plan: Pro
Status: Active
Period: Jan 01, 2024 to Feb 01, 2024
25 days remaining
Credits:
──────────────────────────────────────────────────
Available: 8,500 / 10,000 (15.0% used)
Purchased: 2,000Available Plans
View all available subscription plans with pricing and features.
# Show available plans
trix billing plansPlans are displayed with:
- Monthly and yearly pricing
- Included credits per month
- Rate limits (API, search, bulk operations)
- Plan descriptions and features
Credit Management
Monitor your credit balance with visual progress bars and detailed breakdowns.
# Full credit display with progress bar
trix billing credits
# Compact single-line display
trix billing credits --compact
# Hide action breakdown
trix billing credits --no-breakdownThe credits command shows:
- Visual progress bar indicating usage level
- Color-coded warnings (green/yellow/red)
- Breakdown by action type (embeddings, storage, search, etc.)
- Days remaining in the billing period
Credit Costs
View how many credits each action costs:
# Show all credit costs
trix billing costs
# Filter by action type
trix billing costs --action llm_inference
trix billing costs --action embedding
trix billing costs --action storage
# Filter by provider
trix billing costs --provider anthropic
trix billing costs --provider openai
# Show summary view
trix billing costs --summaryUsage Statistics
View detailed usage breakdown for your current billing period.
# Show current period usage
trix billing usage
# Show usage history (last N periods)
trix billing usage --history 6
trix billing usage --history 12Usage statistics include:
- Memories created
- Embeddings generated
- Searches performed
- API calls made
- Audio minutes transcribed
- Credits used and remaining
- Breakdown by action type
Credit Transactions
View detailed credit transaction history showing credits added, used, and refunded.
# View recent transactions
trix billing transactions
# Show more transactions
trix billing transactions --limit 50
# Pagination
trix billing transactions --limit 50 --offset 50
# Filter by type
trix billing transactions --type credit
trix billing transactions --type debit
# Filter by action
trix billing transactions --action embedding
trix billing transactions --action llm_inferenceUpgrade Subscription
Upgrade to a higher plan with more features and credits. The CLI opens a checkout page in your browser.
# Upgrade to Pro plan (monthly)
trix billing upgrade --plan pro
# Upgrade to Max plan (yearly)
trix billing upgrade --plan max --period yearly
# Apply discount code
trix billing upgrade --plan pro --discount CODE123The upgrade command opens a checkout page in your browser. Your subscription will be updated immediately upon successful payment.
Downgrade Subscription
Schedule a downgrade to a lower tier plan. The downgrade takes effect at the end of your current billing period, so you'll continue to have access to your current plan's features until then.
# Downgrade to Pro plan
trix billing downgrade --plan pro
# Downgrade to Free plan
trix billing downgrade --plan free
# Skip confirmation
trix billing downgrade --plan pro --force
# Check pending downgrade status
trix billing downgrade --status
# Cancel a scheduled downgrade
trix billing downgrade --cancelWhen you downgrade, you may lose access to certain features including reduced credit allocation, lower rate limits, and fewer spaces and memories.
Cancel & Resume
Cancel your subscription or resume a cancelled subscription.
Cancel Subscription
# Cancel at period end (recommended)
trix billing cancel
# Provide cancellation reason
trix billing cancel --reason "switching to competitor"
# Cancel immediately (loses access now)
trix billing cancel --immediatelyResume Subscription
# Resume a cancelled subscription
trix billing resumeYou can resume a subscription that was scheduled for cancellation before it ends.
After your subscription has ended, you'll need to use trix billing upgrade instead.
Pause & Unpause
Temporarily pause your subscription when you need a break from the service.
Pause Subscription
# Pause subscription
trix billing pause
# Pause with reason
trix billing pause --reason "Taking a break"When you pause your subscription:
- Your data is retained and safe
- API access is suspended
- Billing stops until you unpause
- Different from cancellation (which ends at period end)
Unpause Subscription
# Resume paused subscription
trix billing unpauseSpending Limit
Set a spending limit to cap the maximum credits that can be consumed in a billing period. When the limit is reached, additional credit-consuming operations will be blocked.
# View current spending limit
trix billing spending-limit
# Set spending limit
trix billing spending-limit --set 1000
trix billing spending-limit --set 5000
# Disable spending limit
trix billing spending-limit --disableA spending limit helps prevent unexpected overage charges. Set it to your monthly credit budget to ensure predictable costs.
Purchase Additional Credits
Buy additional credits to increase your available balance beyond what's included with your plan. Credits are one-time purchases and do not expire.
# List available credit packages
trix billing buy-credits --list
# Purchase specific amount
trix billing buy-credits --amount 1000
# Purchase a package
trix billing buy-credits --package starterCredit packages often include volume discounts for larger purchases.
Notification Preferences
Manage how and when you receive billing-related notifications.
# View current notification preferences
trix billing notifications
# Enable/disable email alerts
trix billing notifications --email-alerts=true
trix billing notifications --email-alerts=false
# Set credit usage threshold (alert at X% used)
trix billing notifications --threshold 80
trix billing notifications --threshold 90
# Disable threshold alerts
trix billing notifications --threshold 0
# Disable all notifications
trix billing notifications --disableNotification types:
- Email alerts for billing events
- Credit usage threshold warnings
- Weekly usage digest emails
- Invoice and payment alerts
Invoices
List and download invoices for your subscription.
# List all invoices
trix billing invoices
# Show last 5 invoices
trix billing invoices --limit 5
# Filter by status
trix billing invoices --status paid
trix billing invoices --status pending
# View specific invoice
trix billing invoices inv_abc123
# Download invoice PDF
trix billing invoices inv_abc123 --download
# Output as JSON
trix billing invoices -o jsonBilling Portal
Open the billing portal in your browser to manage payment methods and view detailed billing history.
# Open billing portal
trix billing portalThe billing portal allows you to:
- Update payment methods
- View and download invoices
- Update billing information
- Manage subscription details
Billing Audit Log
View the billing audit log for compliance and debugging. The audit log tracks all billing operations including subscription changes, credit purchases, and spending limit changes.
# View recent audit log
trix billing audit
# Filter by action type
trix billing audit --action subscription_cancel
trix billing audit --action credit_purchase
trix billing audit --action spending_limit_change
# Show more entries
trix billing audit --limit 100
# Pagination
trix billing audit --limit 50 --offset 50Grace Period
Check if your account is in a grace period. A grace period is granted when there are billing issues, allowing continued access while the issue is being resolved.
# Check grace period status
trix billing grace-periodCommon reasons for grace periods:
- payment_failed: A payment attempt failed (update payment method)
- subscription_expired: Your subscription has expired (renew subscription)
- trial_ended: Your trial period has ended (upgrade to paid plan)
- downgrade_pending: A plan downgrade is being processed
Command Reference
billing Commands
| Command | Description |
|---|---|
status | Show subscription status and credit balance |
plans | List available subscription plans |
credits | Show credit usage with progress bar |
costs | Show credit costs per action |
usage | Show usage for current period |
transactions | Show credit transaction history |
upgrade | Upgrade subscription plan |
downgrade | Schedule subscription downgrade |
cancel | Cancel subscription |
resume | Resume cancelled subscription |
pause | Pause subscription temporarily |
unpause | Resume paused subscription |
portal | Open billing portal in browser |
invoices | List or view invoices |
spending-limit | View or set spending limit |
buy-credits | Purchase additional credits |
notifications | Manage notification preferences |
audit | View billing audit log |
grace-period | Show grace period status |
Common Examples
Monitor Usage
# Quick status check
trix billing status
# Detailed credit breakdown
trix billing credits
# Usage trends over time
trix billing usage --history 6
# Recent transactions
trix billing transactions --limit 20Set Budget Controls
# Set spending limit
trix billing spending-limit --set 5000
# Set up alerts
trix billing notifications --threshold 80
# Monitor credit usage
trix billing credits --compactUpgrade Flow
# View available plans
trix billing plans
# Check current status
trix billing status
# Upgrade to Pro
trix billing upgrade --plan pro
# Verify new plan
trix billing statusExport Billing Data
# Export usage data
trix billing usage -o json > usage-$(date +%Y%m).json
# Export transactions
trix billing transactions --limit 1000 -o json > transactions.json
# Export audit log
trix billing audit --limit 500 -o json > audit.jsonNext Steps
- Account Management - Manage your account settings
- Background Jobs - Monitor job processing
- Rate Limits - Understand API rate limits by plan
- Pricing - View detailed pricing information