Skip to main content

Overview

While BoostGPT provides hosted API keys for all supported providers, you can bring your own API keys (BYOK) for greater control, cost optimization, and compliance requirements.

Benefits of BYOK

Cost Control

Direct billing from providers, potentially lower costs for high-volume applications

Rate Limits

Use your own API tier and rate limits without sharing with other BoostGPT users

Compliance

Meet regulatory requirements that mandate direct provider relationships

Billing Transparency

Direct invoices from AI providers with detailed usage breakdowns

Supported Providers

All major AI providers support BYOK through the BoostGPT dashboard:
Models: GPT-5, GPT-4, O-series reasoning modelsGet API Key: platform.openai.com/api-keysCost: Pay-as-you-go pricing directly to OpenAI
Models: Gemini 2.5, Gemini 3 Pro PreviewGet API Key: makersuite.google.com/app/apikeyCost: Free tier available, then pay-as-you-go
Models: Claude Opus, Sonnet, HaikuGet API Key: console.anthropic.com/account/keysCost: Pay-as-you-go with higher tier discounts
Models: Grok 3, Grok 4 FastGet API Key: console.x.aiCost: Pay-per-request pricing
Models: DeepSeek V3, DeepSeek R1Get API Key: platform.deepseek.comCost: Competitive pay-as-you-go pricing
Models: Mistral Small, Medium, LargeGet API Key: console.mistral.aiCost: Usage-based pricing
Models: Command R+, Command A, Command R7BGet API Key: dashboard.cohere.com/api-keysCost: Free trial, then pay-as-you-go
Models: Llama 3.x, DeepSeek Llama, Qwen modelsGet API Key: console.groq.com/keysCost: Generous free tier, competitive paid pricing
Models: All local models (no API key needed)Setup: Install Ollama locally and provide host URLCost: Free (self-hosted)

Setup Guide

Step 1: Get Your API Key

1

Choose Your Provider

Select the AI provider you want to use (OpenAI, Anthropic, Google, etc.)
2

Create Account

Sign up for an account with the provider if you don’t have one
3

Generate API Key

Navigate to the provider’s API key management page and create a new key
Give your key a descriptive name like “BoostGPT Production” to track usage
4

Copy API Key

Copy the API key immediately - most providers only show it once!
Store your API key securely. Never commit it to version control or share it publicly.

Step 2: Add API Key to BoostGPT

1

Open BoostGPT Dashboard

Go to app.boostgpt.co and log in
2

Navigate to Integrations

Click on Integrations in the sidebar navigation
3

Select Provider

Find and click on the AI provider you want to configure (e.g., OpenAI, Anthropic)
4

Enter API Key

Paste your API key into the provided field
5

Select Agents

Choose which agents should use this API key
You can use different API keys for different agents to separate billing or apply different rate limits.
6

Save Configuration

Click Save to apply your custom API key
7

Test the Integration

Send a test message to verify the API key works correctly

Step 3: Monitor Usage

Track your usage and costs directly in your provider’s dashboard. BoostGPT will use your API key for all requests from the selected agents.

Usage with SDKs

Once configured in the dashboard, your agents automatically use your custom API keys. No code changes needed!

Core SDK

import { BoostGPT } from 'boostgpt';

const client = new BoostGPT({
  project_id: process.env.BOOSTGPT_PROJECT_ID,
  key: process.env.BOOSTGPT_API_KEY
});

// This bot will use your custom OpenAI API key (if configured in dashboard)
const botResponse = await client.createBot({
  name: 'My BYOK Bot',
  model: 'gpt-5-mini',
  instruction: 'You are a helpful assistant.',
  status: 'active'
});

// Chat requests automatically use your API key
const chatResponse = await client.chat({
  bot_id: botResponse.response.id,
  message: 'Hello!'
});

Router SDK

import { Router, DiscordAdapter } from '@boostgpt/router';

const router = new Router({
  apiKey: process.env.BOOSTGPT_API_KEY,
  projectId: process.env.BOOSTGPT_PROJECT_ID,
  defaultBotId: process.env.BOOSTGPT_BOT_ID, // Bot using your custom API key
  adapters: [
    new DiscordAdapter({
      discordToken: process.env.DISCORD_TOKEN
    })
  ]
});

// Router automatically uses your custom API key
router.onMessage(async (message, context) => {
  // Handle commands or return null for AI
  if (message.content === '/status') {
    return 'Using your own API key!';
  }

  return null; // BoostGPT handles with your key
});

await router.start();

Override API Key Per Request (Advanced)

For Ollama or custom setups, you can override the provider configuration per request:
// Override Ollama host per request
const chatResponse = await client.chat({
  bot_id: 'your-bot-id',
  provider_host: 'http://custom-server:11434',
  message: 'Hello from custom host!'
});

// Override OpenAI API key per request (if needed)
const customResponse = await client.chat({
  bot_id: 'your-bot-id',
  provider_key: 'sk-custom-key-here', // Use specific API key
  message: 'Hello!'
});

Cost Comparison

BoostGPT Credits vs BYOK

BoostGPT credits provide simplicity and predictability, while BYOK offers potential cost savings for high-volume usage.
ScenarioBoostGPT CreditsBYOKRecommendation
Low Volume (<1M tokens/month)Simple, predictableMore setup, similar costUse Credits
High Volume (>10M tokens/month)Pay per creditDirect provider pricingUse BYOK
Multiple ModelsSingle credit balanceSeparate provider billsUse Credits
Compliance RequiredShared infrastructureDirect provider relationshipUse BYOK
Development/TestingEasy to startRequires API keysUse Credits

Example Cost Analysis

Scenario: 1M GPT-4o Mini requests per month
  • BoostGPT Credits: 1M credits × 0.01=0.01 = 10,000
  • BYOK with OpenAI: ~$8,000 (OpenAI direct pricing)
  • Savings: ~$2,000/month (20%)
For high-volume production workloads (>1M requests/month), BYOK typically offers 15-30% cost savings.

Security Best Practices

Protect Your API Keys

Never hardcode API keys in your code
.env
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_AI_KEY=AIza...
Generate new API keys every 3-6 months and revoke old ones
Separate API keys for development, staging, and production
Configure rate limits at the provider level to prevent unexpected costs
Set up billing alerts with your providers to monitor unexpected usage spikes
Each team member should have their own API keys, never share

Monitor API Usage

1

Provider Dashboards

Check usage in OpenAI Console, Anthropic Console, etc.
2

Set Billing Alerts

Configure alerts at 50,50, 100, $500 thresholds
3

Review Monthly

Analyze usage patterns and optimize model selection
4

Track by Agent

Use different API keys for different agents to track costs separately

Troubleshooting

Cause: API key is incorrect, expired, or revokedSolutions:
  • Double-check the API key was copied correctly
  • Verify the key hasn’t been revoked in provider dashboard
  • Generate a new API key
  • Ensure no extra spaces or characters
Cause: Too many requests for your API tierSolutions:
  • Upgrade your API tier with the provider
  • Implement request throttling
  • Use exponential backoff retries
  • Consider using BoostGPT credits for overflow
Cause: API account hasn’t been verified or has no creditsSolutions:
  • Add payment method to provider account
  • Verify email/phone with provider
  • Check billing status in provider dashboard
  • Add credits or update payment method
Cause: Configuration issue in BoostGPT dashboardSolutions:
  • Verify API key was saved correctly
  • Check that the agent is selected to use the custom key
  • Test the API key directly with provider’s API
  • Re-enter and save the API key
Cause: Higher than expected usage or expensive model selectionSolutions:
  • Review usage in provider dashboard
  • Switch to more cost-effective models (e.g., GPT-4o Mini instead of GPT-5)
  • Set max_reply_tokens limits
  • Implement caching for common queries
  • Enable billing alerts

Migration from Credits to BYOK

1

Calculate Usage

Review your monthly credit usage in BoostGPT dashboard
2

Estimate Costs

Compare BoostGPT credit costs vs direct provider pricing
3

Obtain API Keys

Sign up with providers and generate API keys
4

Test in Staging

Configure API keys for a test agent first
5

Gradual Rollout

Move agents to BYOK one at a time, monitoring costs
6

Monitor Performance

Track response times and error rates after migration

FAQ

Yes! You can use BoostGPT credits for some agents and BYOK for others. Configure API keys per-agent in the dashboard.
Yes. BoostGPT provides the infrastructure, SDKs, routing, and management tools. BYOK only changes where API calls are billed.
Requests will fail with an error. BoostGPT will NOT fallback to BoostGPT credits automatically. Monitor your provider balances.
Yes! Simply remove your custom API key from the Integration settings, and your agents will use BoostGPT credits again.
Yes. All BoostGPT features work identically with BYOK, including reasoning modes, multi-channel routing, and integrations.
API keys are encrypted at rest and in transit. Only your agents use your keys, never shared with other users. See our security docs for details.

Next Steps