Skip to main content

🪙 Per Token Only

The Per Token Only billing mode allows users to pay for their usage on a pay-as-you-go basis. Users must provide their payment information (credit card) to access chat functionalities. Invoices are generated daily based on tokens consumed by individual models and consolidated into a single invoice.

How It Works

  • Pay-as-You-Go: Users are charged based on actual token consumption
  • Daily Invoicing: Usage is calculated and invoiced daily
  • Automatic Charging: Invoices are charged automatically to the user's saved payment method
  • Minimum Invoice Amount: Small charges are batched to avoid excessive transaction fees

Payment and Access Control

If an invoice fails to process due to insufficient funds, card expiration, or other issues, users are granted a configurable grace period before their access is restricted.

Grace Period Configuration

The grace period before restricting access can be configured using the INVOICE_OVERDUE_HOURS environment variable:

INVOICE_OVERDUE_HOURS=<INVOICE_OVERDUE_HOURS>
tip

The default grace period is 2 hours. After this period expires, the user's status changes to SUSPENDED and they cannot use chat functionalities.

Users can update their payment information and retry payment through the Billing History screen in their account.

Minimum Invoice Amount

To avoid charging very small amounts, you can configure a minimum invoice threshold:

INVOICE_MIN_AMOUNT=<INVOICE_MIN_AMOUNT>
tip

This prevents multiple small charges and helps optimize payment processing costs.