Skip to main content

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

Response:

Usage Statistics

Response:

Subscription Tiers

Response:

Purchase Credits

Response:

Available Credit Packs

Update User Profile

Rate Limits by Tier

Webhooks

Subscribe to credit and usage events:
Available events:
  • credits.low_balance - Balance below threshold
  • credits.purchased - Credits added
  • tier.upgraded - Subscription upgraded
  • tier.downgraded - Subscription downgraded
  • usage.limit_approaching - Near tier limit

Error Responses

Common error codes:
  • invalid_pack_id - Credit pack doesn’t exist
  • payment_failed - Payment processing error
  • tier_limit_reached - Monthly limit exceeded
  • invalid_update - Profile update validation failed

Best Practices

Configure webhooks to:
  • Alert when balance is low
  • Track usage patterns
  • Automate credit purchases
  • Monitor tier limits
  • 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