Credits and Wallet Documentation
MuAPI uses a transparent, credit-based system to manage API consumption and feature access.
How it Works
1. The Credit Wallet
Every user has a personal CreditWallet. All AI generations (tasks) deduct a specific amount of credits based on the model's cost and usage duration.
2. Usage Tracking
The UsageLog provides a complete history of every API call, including:
- Cost: The exact credits deducted.
- Status: (Pending, Processing, Completed, Failed).
- Data: Snapshots of the input parameters and resulting outputs.
Purchasing Credits
MuAPI integrates with Stripe for secure credit top-ups.
- Workflow:
- Call
GET /api/payments/create_credits_checkout_session with your desired amount.
- Complete the purchase on the secure Stripe hosted page.
- Your credits are automatically added to your wallet upon successful payment.
Enterprise Features
For enterprise customers, we support:
- Custom Credit Limits: Set daily or per-account ceilings to prevent overruns.
- Private Deployment Billing: Discounted rates for high-volume private model instances.
- API Key Management: Create multiple API keys to track usage across different projects or clients.