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
| Method | Endpoint | Description |
|---|---|---|
| GET | /user/profile | Get current user profile |
| PATCH | /user/profile | Update user profile |
| GET | /user/credits/balance | Get credit balance |
| GET | /user/credits/history | Get credit transaction history |
| GET | /user/usage | Get usage statistics |
| POST | /user/credits/purchase | Purchase credit pack |
| GET | /user/tier | Get subscription tier info |
User Profile Object
Credits Object
Get User Profile
Get Credit Balance
Credit Transaction History
Usage Statistics
Subscription Tiers
Purchase Credits
Available Credit Packs
| Pack ID | Credits | Price | Bonus | Best For |
|---|---|---|---|---|
pack_100 | 100 | $9.99 | - | Trying out |
pack_500 | 500 | $49.99 | +50 | Regular users |
pack_1000 | 1000 | $89.99 | +150 | Power users |
pack_5000 | 5000 | $399.99 | +1000 | Professionals |
Update User Profile
Rate Limits by Tier
| Tier | API Requests/min | Concurrent Generations | Priority |
|---|---|---|---|
| Free | 10 | 1 | Standard |
| Pro | 60 | 5 | High |
| Enterprise | 300 | 20 | Highest |
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