Skip to main content

Credit System

Raycaster Doc uses a credit-based billing model. AI features (chat, review runs, search) consume credits based on the number of tokens processed by the underlying language models.

How Credits Work

  • Your organization has a credit balance that is shared across all projects
  • Every AI interaction (chat messages, review runs) consumes credits based on token usage
  • Credits are deducted automatically after each AI turn completes
  • New organizations receive a $100 starting credit to get started

Balance Enforcement

  • Chat messages are blocked when the org balance goes negative
  • A 402 Payment Required error is shown when credits are exhausted
  • Zero balance is allowed — you can use your remaining credits to completion

Tracking Usage

Credits Badge

The settings menu shows a Credits badge with your current balance and a Details button for deeper analysis.

Billing Details

The billing details view includes:
  • Balance overview — Current credit balance in dollars
  • Time period toggle — Switch between 7-day and 30-day views
  • Usage chart — Daily bar chart showing credit consumption over time
  • Transaction history — Paginated table of individual charges with:
    • Date and time
    • Chat session link (click to navigate)
    • Token breakdown (input/output)
    • Cost in credits

Cost Calculation

Each AI interaction’s cost is calculated based on:
  1. Input tokens — The prompt sent to the model (your message + context + documents)
  2. Output tokens — The model’s response
  3. Model pricing — Per-token rates vary by model
Costs are stored with precision (micros-based accounting) and recorded atomically with each AI turn.

Adding Credits

Contact your organization admin or the Raycaster team to add credits to your balance. Credit additions are recorded as ledger entries for full auditability.