Credits Consumption by Feature
How Runcell credits are calculated for Ask/Chat, Agent, completions, and other AI features
Overview
Runcell uses Credits to account for AI feature usage. The current billing model is split by feature type:
- Ask/Chat and Agent: token-based. Credits are calculated from actual input and output tokens used by the selected model.
- Other AI features: standard feature-based pricing. These features still use fixed or model-rate-based rules rather than token-based billing.
For token-based model rates, see Token-based Credits.
Ask/Chat and Agent
Ask/Chat and Agent mode no longer use the old per-message base credits × model rate calculation. They now use token-based Credits:
input_credits = input_tokens / 100,000 * input_credits_per_100k_tokens
output_credits = output_tokens / 100,000 * output_credits_per_100k_tokens
total_credits = input_credits + output_creditsActual usage is often lower than the theoretical token rate in continuous tasks because Runcell uses Prompt Cache Prefix optimization. As a rough planning estimate, continuous Ask/Agent work often costs around 1/5 to 1/4 of the theoretical table value, but this is not a guaranteed calculation rule.
Credits Consumption Summary by Feature
| Feature | Credits per Request | Calculation Method | Notes |
|---|---|---|---|
| Ask/Chat | Based on actual input and output tokens | Token-based | Uses selected model token rates; cache optimization can reduce actual cost |
| Agent | Based on actual input and output tokens | Token-based | Uses selected model token rates; long-running tool workflows often benefit from cache optimization |
| Inline Completion | 0.05 | Fixed | Fixed value, not affected by model selection |
| Simple Completion | 0.1 | Fixed | Fixed value, not affected by model selection |
| Code Apply | 0.1 | Fixed | Fixed value for both insert and edit actions |
| Image Generation | 5 × model_rate | Dynamic (model-based) | Base credits configurable via IMAGE_GENERATION_CREDITS env var (default: 5) |
| Quick Fix | 1 × model_rate | Dynamic (model-based) | Base 1 credit multiplied by model's credit_rate |
| Predictive Interaction | 0.5 | Fixed | Fixed value for both streaming and non-streaming modes |
| Visualization Analysis | 0.3 | Fixed | Fixed value for image analysis feature |
| Title Generation | 0 | Free | No credits deducted |
Standard Feature-based Costs
The features below are not currently token-based:
- Inline Completion
- Simple Completion
- Code Apply
- Image Generation
- Quick Fix
- Predictive Interaction
- Visualization Analysis
- Title Generation
These features continue to use the standard fixed or model-rate-based rules shown in the table above. This keeps short, background, or utility actions predictable even when they are powered by AI.
Archived Legacy Model Rates
The old message-based model-rate documentation is archived for historical reference: Archived Model Credit Costs.
Use that archived page only when you need to understand legacy model-rate multipliers. For current Ask/Chat and Agent costs, use Token-based Credits.