Bring Your Own Key (BYOK)
The BYOK model gives you full control and visibility over AI service costs.
How It Works
Instead of paying Fiction Tribe for API usage, you:
- Create accounts with AI providers directly
- Manage billing through your existing procurement
- Provide API keys to the SmarterAvatar platform
- Pay providers based on actual usage
┌─────────────────────────────────────────────────────────────┐
│ Your Accounts │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
│ │ Google │ │ OpenAI │ │ HeyGen │ │
│ │ (Gemini) │ │ (Whisper) │ │ (LiveAvatar) │ │
│ └─────────────┘ └─────────────┘ └─────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│ │ │
└─────────────────┼───────────────────┘
│
▼
┌─────────────────┐
│ SmarterAvatar │
│ (Your Deploy) │
└─────────────────┘
Benefits
Full Cost Visibility
- See exact API usage in provider dashboards
- Set budgets and alerts directly
- No markup on API costs
Enterprise Billing
- Route through existing procurement
- Use corporate payment methods
- Consolidated invoicing (for some providers)
Data Control
- API keys stored in your environment
- No data passes through Fiction Tribe
- Direct relationship with providers
Flexibility
- Switch providers anytime
- Upgrade/downgrade as needed
- Negotiate enterprise agreements directly
Setup Guide
Step 1: Create Provider Accounts
Required:
| Provider | Purpose | Sign Up |
|---|---|---|
| Google AI | LLM + RAG | ai.google.dev |
| OpenAI | STT (Whisper) | platform.openai.com |
| HeyGen | Avatar | heygen.com |
Optional:
| Provider | Purpose | Sign Up |
|---|---|---|
| Deepgram | Alt. STT | deepgram.com |
| Supabase | Database | supabase.com |
| Resend | resend.com |
Step 2: Obtain API Keys
For each provider:
- Sign in to the provider dashboard
- Navigate to API keys section
- Create a new API key
- Copy and store securely
Step 3: Configure SmarterAvatar
Add keys to your environment:
# LLM (choose one)
GEMINI_API_KEY=AIza...
OPENAI_API_KEY=sk-...
# STT (choose one)
# Whisper uses OPENAI_API_KEY
DEEPGRAM_API_KEY=...
# Avatar
LIVEAVATAR_API_KEY=...
# Infrastructure (optional, for self-managed)
NEXT_PUBLIC_SUPABASE_URL=...
SUPABASE_SERVICE_ROLE_KEY=...
RESEND_API_KEY=...
Step 4: Set Up Billing Alerts
Configure alerts in each provider dashboard:
Google AI Studio:
- Set monthly budget
- Enable email alerts
OpenAI:
- Set hard and soft limits
- Configure usage alerts
HeyGen:
- Monitor credit balance
- Set up low-balance notifications
Cost Management
Monitor Usage
Check provider dashboards regularly:
| Provider | Dashboard |
|---|---|
| console.cloud.google.com | |
| OpenAI | platform.openai.com/usage |
| HeyGen | app.heygen.com/settings |
Set Budgets
Most providers support spending limits:
Google: Settings → Billing → Budgets
OpenAI: Settings → Limits → Usage limits
HeyGen: Contact sales for enterprise limits
Optimize Costs
Security Best Practices
Key Rotation
- Rotate API keys periodically (quarterly recommended)
- Use separate keys for dev/staging/production
Access Control
- Limit who can access API keys
- Use environment variables, never commit to code
Monitoring
- Review API usage logs
- Alert on unexpected usage patterns
Alternative: Managed Pass-Through
If you prefer not to manage provider accounts:
We can hold accounts and rebill monthly with a 20% administrative markup covering:
- Account management
- Float/payment timing
- Support and troubleshooting
Contact us to discuss managed options.