Skip to main content

BYOK: Bring Your Own Key

🚧 Under Construction - Full guide coming in Phase 4

Overview

BYOK allows you to use your own API keys from AI providers while still tracking usage and costs through Lava. This gives you full control over your provider accounts while benefiting from Lava’s unified billing and usage tracking.

How It Works

When using BYOK mode, your forward token includes your provider API key as the fourth component:
${LAVA_SECRET_KEY}.${CONNECTION_SECRET}.${PRODUCT_SECRET}.${USER_PROVIDER_KEY}
Lava forwards requests to the provider using your key, tracks usage, and bills your Lava wallet accordingly.

BYOK vs Managed Keys

Managed Keys (Default):
  • Lava stores and manages provider API keys
  • Simpler setup - just connect your wallet
  • Available for all Tier 1, 2, and 3 providers
BYOK Mode:
  • You supply your own provider API key
  • Full control over provider account
  • Available for all providers
  • Required for BYOK-only providers

BYOK-Only Providers

Some providers are only available in BYOK mode and do not support managed keys:

Retell AI

Phone call API with polling-based usage tracking. BYOK required due to async cost reporting model. View Retell Integration Guide

ElevenLabs

Text-to-speech API with character-based pricing. Explicitly blocks metering-only mode. View ElevenLabs Integration Guide

Pearch (Fiber.ai)

Search API with fixed cost per request ($0.266 per search). View Pearch Integration Guide

Implementation Details

🚧 Coming in Phase 4 Full BYOK implementation guide will include:
  • Forward token construction with BYOK keys
  • Authentication flow for each provider type
  • Usage tracking and billing mechanics
  • Error handling and validation
  • Security best practices

For provider-specific BYOK details, see individual provider integration guides.