BYOK Setup
Set up your LLM provider API keys for AI-powered llm_judge scoring.
Why BYOK?
LaunchGate’s llm_judge scorer calls external LLMs to evaluate your outputs. Rather than routing through a LaunchGate-managed key, you provide your own API keys. This means:
- Your rate limits — you control throughput
- Your billing — LLM costs are on your provider account
- Your choice of model — use any model your provider offers
- Maximum security — keys are AES-256-GCM encrypted and never logged
Supported providers
| Provider | Models | Config value |
|---|---|---|
| OpenAI | GPT-4o, GPT-4, etc. | openai |
| Anthropic | Claude Opus, Claude Sonnet, etc. | anthropic |
| Gemini Pro, etc. | google | |
| Azure OpenAI | Azure-hosted OpenAI models | azure_openai |
Setup
Get a provider API key
Create an API key from your LLM provider:
- OpenAI: platform.openai.com/api-keys
- Anthropic: console.anthropic.com/settings/keys
- Google: Google Cloud Console → Vertex AI
- Azure OpenAI: Azure Portal → Azure OpenAI resource
Add the key to LaunchGate
Via dashboard
Navigate to Settings → BYOK Keys and click Add Key.
Via API
curl -X POST https://api.launchgate.ai/v1/byok-keys \
-H "Authorization: Bearer $LAUNCHGATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "openai",
"name": "Production OpenAI",
"key": "sk-...",
"is_default": true
}'Verify the key
Test that the key is valid:
curl -X POST https://api.launchgate.ai/v1/byok-keys/{keyId}/test \
-H "Authorization: Bearer $LAUNCHGATE_API_KEY"Create an LLM judge scorer
curl -X POST https://api.launchgate.ai/v1/projects/my-project/scorers \
-H "Authorization: Bearer $LAUNCHGATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Faithfulness judge",
"type": "llm_judge",
"config": {
"rubric": "Evaluate faithfulness to the source context...",
"model": "gpt-4o",
"_provider": "openai"
}
}'Rate limiting
LLM judge calls are rate-limited to 20 concurrent requests per org per provider. If the limit is hit, requests are queued with exponential backoff (max 3 retries).
Multiple keys per provider
You can add multiple keys per provider (e.g., different keys for different environments). Mark one as is_default — this is the key used when no specific key is referenced.
Setting a new key as default automatically unsets the previous default for that provider.
Security details
- Keys are encrypted with AES-256-GCM using a dedicated
BYOK_ENCRYPTION_KEY - The encryption key never touches the database
- Keys are decrypted only in-memory inside the eval worker at point of use
- Keys are never logged or included in API responses after creation
- The dashboard shows only the
key_prefix(first 8 characters)