Overview
The User & Credits API provides endpoints for managing user profiles, checking credit balance, viewing usage history, and handling billing operations.Base URL
Core Endpoints
User Profile Object
Credits Object
Get User Profile
Get Credit Balance
Credit Transaction History
Usage Statistics
Subscription Tiers
Purchase Credits
Available Credit Packs
Update User Profile
Rate Limits by Tier
Webhooks
Subscribe to credit and usage events:credits.low_balance- Balance below thresholdcredits.purchased- Credits addedtier.upgraded- Subscription upgradedtier.downgraded- Subscription downgradedusage.limit_approaching- Near tier limit
Error Responses
invalid_pack_id- Credit pack doesn’t existpayment_failed- Payment processing errortier_limit_reached- Monthly limit exceededinvalid_update- Profile update validation failed
Best Practices
Monitor Usage
Monitor Usage
Set Up Webhooks
Set Up Webhooks
Configure webhooks to:
- Alert when balance is low
- Track usage patterns
- Automate credit purchases
- Monitor tier limits
Optimize Credit Usage
Optimize Credit Usage
- Use Flux model for testing (2 credits)
- Keep videos under 5 seconds when possible
- Reuse voice clones (5 credits once)
- Batch similar operations
- Monitor usage statistics regularly
Next Steps
Credits Guide
Understand pricing
Payments
Billing and invoices
Usage Tracking
Optimize performance