-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
ai-video-editorAI Video Editor Flutter appAI Video Editor Flutter appfeatureNew feature implementationNew feature implementationflutterFlutter/Dart implementationFlutter/Dart implementationphase-5Phase 5: Collaboration & AdvancedPhase 5: Collaboration & Advanced
Description
Summary
Implement secure API key management and comprehensive cost tracking across all integrated AI services (Replicate, ElevenLabs, Anthropic Claude). Visibility into spending is essential for users who rely on pay-per-use APIs.
Requirements
API Key Management
- Secure storage for: Replicate, ElevenLabs, Anthropic (Claude), OpenAI (optional)
- API key validation on entry
- Per-service connection status indicator
- API key rotation support
- Keychain integration (macOS Keychain, iOS Keychain)
Cost Tracking
- Per-generation cost estimate (before generation)
- Actual cost tracking per generation (from API response)
- Per-scene cost summary
- Per-project cost total
- Daily/weekly/monthly spend dashboard
- Cost breakdown by service (Replicate, ElevenLabs, Anthropic)
- Budget alerts: warn when approaching a set limit
- Export cost report as CSV
- Token usage tracking for Claude API calls
Acceptance Criteria
- API keys are stored securely in OS keychain (not plaintext)
- Connection status shows green/red per service
- Cost estimates display before each generation attempt
- Actual costs are recorded and match API billing
- Budget alert triggers notification when threshold reached
- CSV export contains all generation events with costs
Tech Notes
- Use
flutter_secure_storagefor keychain-backed key storage - Never log or persist raw API keys in plaintext
- Cost data should be queryable by date range and project
Related
Part of the ai-video-editor Flutter application. Cross-cutting concern used by #65 (Video Generation), #66 (Text-to-Image), #67 (Voice Generation), and #68 (Storytelling Agent).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ai-video-editorAI Video Editor Flutter appAI Video Editor Flutter appfeatureNew feature implementationNew feature implementationflutterFlutter/Dart implementationFlutter/Dart implementationphase-5Phase 5: Collaboration & AdvancedPhase 5: Collaboration & Advanced