Skip to content

BYOK: Your Own API Keys

Bring your own API keys for OpenAI, Anthropic, and Gemini to bypass Glassy Cloud's AI cost caps and use the models you already pay for.

Walkthrough preview for BYOK: Your Own API Keys
Walkthrough video coming soon

Before you start

  • local-ai/04-cloud-ai-and-smart-routing

What you'll learn

  • Understand when to use BYOK vs Glassy's managed cloud AI
  • Add a provider key (OpenAI, Anthropic, Gemini)
  • Understand how BYOK bypasses the per-tier cost cap
  • Rotate and revoke provider keys safely

What is BYOK?

BYOK (Bring Your Own Key) lets you connect your own API keys for cloud AI providers directly to Glassy. When BYOK is enabled:

  • Cloud AI calls use your API key instead of Glassy’s managed key
  • The per-tier AI cost cap does not apply (you pay the provider directly)
  • You can use higher-tier models that Glassy’s managed plan doesn’t include

When to use BYOK vs managed

FactorManaged (Glassy’s key)BYOK (Your key)
CostIncluded in tier, cappedYou pay provider directly, no cap
Model selectionLimited to Glassy’s configured modelsAny model the provider offers
Rate limitsGlassy’s limits applyProvider’s limits apply
BillingGlassy subscriptionSeparate provider account
SetupZero configAdd API key in Settings

Use BYOK if:

  • You already pay for an OpenAI / Anthropic / Gemini account
  • You need models beyond Glassy’s managed plan
  • You want to remove the AI cost cap for heavy workloads
  • You’re self-hosted and want cloud AI (system keys are disabled on the appliance)

Step 1: Get an API key

Choose a provider

Glassy supports:

  • OpenAI — GPT-4o, GPT-4o mini, o-series, etc.
  • Anthropic — Claude 3.5 Sonnet, Claude 3 Opus, etc.
  • Google Gemini — Gemini 2.0 Flash, Gemini 2.5 Pro, etc.

Create a key

Log in to your provider’s dashboard:

  • OpenAI: platform.openai.com → API Keys → Create new secret key
  • Anthropic: console.anthropic.com → API Keys → Create Key
  • Gemini: aistudio.google.com → Get API Key

Step 2: Add the key in Glassy

Open Settings → API Keys

Open the Account HUD → Settings → Connections & dataAPI keys. This section is only visible when BYOK is enabled.

Add a provider key

Click Add key, select the provider, and paste your API key. Glassy verifies the key with a test call to the provider.

If verification succeeds, the key is saved and a fingerprint (first 8 characters) is shown. The full key is never displayed again.

Select the key for AI calls

When composing an AI query, select your BYOK provider from the model dropdown. Glassy routes through your key instead of the managed key.

How BYOK bypasses the cost cap

Glassy’s AI metering tracks spending per user per billing period. Each tier has a cap. When you use BYOK, the metering system detects the call used a user-provided key and does not count it toward the cap. You’re billed directly by the provider.

Cross-provider fallback

Glassy’s AI router supports cross-provider fallback. If your primary provider returns an auth or quota error, Glassy can retry the same task via a different configured provider (skipped for image-generation and audio-transcription, which are Gemini-only). This means adding keys for multiple providers gives you resilience, not just choice.

Key rotation and revocation

Rotate a key

  1. Generate a new key in your provider’s dashboard
  2. In Glassy Settings → API Keys, click Update next to the provider
  3. Paste the new key — it replaces the old one immediately

Revoke a key

  1. In Glassy Settings → API Keys, click Delete next to the provider
  2. Glassy stops using the key immediately
  3. For security, also revoke the key in your provider’s dashboard

What’s next?

You’ve covered the Glassy Cloud AI path. Self-hosted users should continue to Ollama: Local Models on Your Server and AI Without Limits on the Appliance.