Skip to main content

Credit model

a21e uses a simple credit system: 1 credit = 1 enhancement (one prompt compilation and execution). Your balance is split into two buckets: Credits are consumed subscription-first. Add-on credits are only used once subscription credits are exhausted.

Checking your balance

The balance field is your total available credits (subscription + add-on). mode indicates whether you’re on managed (a21e-hosted LLM) or BYOK (your own provider key).

Managed vs. BYOK

Credits are always required — they cover prompt engineering, context assembly, and orchestration. In BYOK mode, your provider handles the LLM inference cost separately. See BYOK guide for setup instructions.

Usage tracking

Summary

Get a high-level overview of your usage over a time period:

Daily breakdown

Run history

List individual runs with pagination:
Each run includes the prompt title, credits used, model, provider, status, and duration.

CSV export

Export your run history as a CSV file for accounting or analysis:

Credit ledger

The ledger provides a full audit trail of every credit transaction.

List transactions

Each entry includes a entry_type field:

Period summary

Get aggregated credit activity over a time window (up to 90 days):

Insufficient credits

When your balance reaches zero, API requests return a 402 error:
This applies to both managed and BYOK modes — credits are always required for prompt engineering.

Organization credits

Organizations have a separate credit pool shared across all members:
  • Org admins can purchase credits and set per-member spending limits
  • Member usage is tracked individually within the org pool
  • When a member’s personal credits are exhausted, org credits are used (if allowed by policy)
See Organizations for more on team billing.