engram cost
Display API usage costs tracked by Engram.
Synopsis
engram cost
Output
The cost command displays:
- Embedding costs
- Chat/completion costs
- Total costs by period
- Cost breakdown by operation
Example
$ engram cost
API Usage Costs
===============
This Session:
Embeddings: $0.12
Completions: $0.45
Total: $0.57
Last 24 Hours:
Embeddings: $0.89
Completions: $3.21
Total: $4.10
Last 30 Days:
Embeddings: $12.34
Completions: $45.67
Total: $58.01
Cost Tracking
Costs are tracked in ~/.engram_costs.json and include:
- Token counts for embeddings
- Token counts for completions
- Model used
- Timestamp
Tips for Reducing Costs
- Use batch enrichment (
engram enrich batch) for 50% savings - Use
--dry-runto preview operations before running - Filter operations by source to process only what you need
See Also
- engram stats - View knowledge base statistics
- Enrichment Guide - Cost-effective enrichment strategies