Credit System
How Technical Debt Radar's AI credit system works — costs per operation, monthly allocations, usage tracking, and what happens when credits run out.
Credit System
AI features in Technical Debt Radar consume credits. Each credit represents a unit of AI processing via the Anthropic API (Claude Sonnet). Credits are allocated monthly based on your plan and reset on your billing cycle date.
Cost Per Operation
| Operation | Credits | Approximate API Cost | Trigger |
|---|---|---|---|
| AI Fix Generation | 1 | $0.003 | radar fix (per file) |
| AI Scan Summary | 1 | $0.005 | radar summary |
| AI PR Comment | 3 | $0.035 | Automatic on PR (Pro+) |
| AI Cross-File Analysis | 5 | $0.03--0.08 | radar scan --cross-file |
| Dashboard Policy Editor | 0 | Free | Dashboard UI |
| Deterministic Scan | 0 | Free | radar scan |
| Deterministic PR Gate | 0 | Free | PR status check |
Deterministic features (scanning, gate decisions, PR status checks, badges) never consume credits and work on all plans including Free.
Monthly Allocation by Plan
| Plan | Monthly Credits | Resets On | Typical Usage |
|---|---|---|---|
| Free | 0 | --- | Deterministic only |
| Solo | 50 | Billing date | ~50 fixes or ~50 summaries |
| Pro | 500 | Billing date | ~165 PRs with AI comments, or ~100 cross-file scans |
| Team | 2,000 | Billing date | Full team coverage across multiple repos |
| Enterprise | Unlimited | --- | No tracking, no limits |
How Credits Reset
Credits reset to your plan's full allocation on your billing cycle date. Unused credits do not roll over to the next month.
Example: Pro plan, billing date = 15th of each month
March 15: 500 credits allocated
March 28: 340 credits remaining (160 used)
April 15: 500 credits allocated (340 unused credits do not carry over)
Tracking Usage
Dashboard
The Radar dashboard shows real-time credit usage:
- Current balance --- credits remaining this cycle
- Usage breakdown --- credits consumed by operation type (fixes, summaries, PR comments, cross-file)
- Usage trend --- daily and weekly credit consumption chart
- Reset date --- when your credits will replenish
CLI
$ radar credits
Plan: Pro
Credits remaining: 340 / 500
Reset date: April 15, 2026
Usage this cycle:
AI Fix: 45 credits (45 fixes)
AI Summary: 12 credits (12 summaries)
AI PR Comment: 87 credits (29 PRs)
Cross-File: 16 credits (3 scans + 1 partial)
API
GET /api/v1/credits
{
"plan": "pro",
"total": 500,
"remaining": 340,
"used": 160,
"resetDate": "2026-04-15T00:00:00Z",
"breakdown": {
"fix": 45,
"summary": 12,
"prComment": 87,
"crossFile": 16
}
}
When Credits Run Out
When your credit balance reaches zero:
-
Deterministic analysis continues unchanged. Scans, gate decisions, PR status checks, and deterministic PR comments all work normally. Your merge gate is never affected by credit exhaustion.
-
AI features are disabled until credits reset or you purchase more:
radar fixfalls back to showing violations without generated fixesradar summaryreturns the deterministic scan result without the AI summary- PR comments are posted without AI explanations (violation list only)
- Cross-file analysis runs BFS without AI enhancement (may produce more false positives)
-
CLI shows a warning:
$ radar fix .
⚠ AI credits exhausted (0/500). Fix generation unavailable until April 15.
Deterministic scan results shown below. Fix violations manually or
use --format ai-prompt with your own AI tool (free, no credits required).
- No service interruption. Your PR gate, webhook integrations, and dashboard all continue working. Only AI-enhanced features are paused.
Buying Additional Credits
If you exhaust your monthly allocation before the reset date, you can purchase additional credit packs:
| Pack | Credits | Price | Available On |
|---|---|---|---|
| Small | 100 | $5 | Solo+ |
| Medium | 500 | $20 | Pro+ |
| Large | 2,000 | $60 | Team+ |
Purchased credits are added immediately and expire at the end of the current billing cycle. They do not roll over.
# Purchase additional credits via CLI
radar credits buy --pack medium
# Or via the dashboard: Settings → Billing → Buy Credits
Optimizing Credit Usage
- Use
--format ai-promptinstead ofradar fixwhen working with Claude Code or Cursor. This costs 0 credits because it uses your AI tool's own API. - Set
pr_comment_top_n: 3inradar.ymlto explain fewer violations per PR (still costs 3 credits, but reduces prompt size and latency). - Run cross-file analysis selectively with
--cross-file-min-severity criticalto only trace critical violations. - Use deterministic-only mode in CI with
radar run .(0 credits) and reserve AI features for local development.