Skip to main content

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:

  1. Create accounts with AI providers directly
  2. Manage billing through your existing procurement
  3. Provide API keys to the SmarterAvatar platform
  4. 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:

ProviderPurposeSign Up
Google AILLM + RAGai.google.dev
OpenAISTT (Whisper)platform.openai.com
HeyGenAvatarheygen.com

Optional:

ProviderPurposeSign Up
DeepgramAlt. STTdeepgram.com
SupabaseDatabasesupabase.com
ResendEmailresend.com

Step 2: Obtain API Keys​

For each provider:

  1. Sign in to the provider dashboard
  2. Navigate to API keys section
  3. Create a new API key
  4. 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:

ProviderDashboard
Googleconsole.cloud.google.com
OpenAIplatform.openai.com/usage
HeyGenapp.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​

See Cost Optimization Tips

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.