Skip to main content

What is BYOK?

Bring Your Own Key (BYOK) mode lets you use your existing API key from any LLM provider (OpenAI, Anthropic, etc.) while still getting OpenCompress’s compression benefits.

How it works

Your App → OpenCompress (compress) → Your Provider (with your key) → Response
In BYOK mode:
  1. Your prompts are compressed by OpenCompress
  2. The compressed request is forwarded to your provider using your API key
  3. You pay your provider directly at their rates
  4. OpenCompress charges only 20% of the savings as a fee

Setup

When creating an API key in the dashboard, select BYOK mode and provide:
FieldDescriptionExample
Upstream Base URLYour provider’s API base URLhttps://api.openai.com/v1
Upstream API KeyYour provider’s API keysk-...

Pricing comparison

Router ModeBYOK Mode
Who pays the LLM?OpenCompress (via OpenRouter)You (your provider)
LLM costIncluded in your chargeYou pay directly
Compression fee20% of savings20% of savings
Total you pay usLLM cost + feeFee only
BYOK is ideal if you already have negotiated rates, enterprise agreements, or credits with an LLM provider. You get compression savings on top of your existing deal.

Supported providers

Any OpenAI-compatible API endpoint works with BYOK:
ProviderBase URL
OpenAIhttps://api.openai.com/v1
Anthropic (via proxy)Anthropic’s OpenAI-compatible endpoint
Azure OpenAIhttps://your-resource.openai.azure.com/openai/deployments/your-model/v1
Together AIhttps://api.together.xyz/v1
Groqhttps://api.groq.com/openai/v1
Any OpenAI-compatibleYour custom base URL

Security

  • Your upstream API key is stored encrypted and only used for forwarding requests
  • OpenCompress never logs your upstream key in plaintext
  • You can revoke your OpenCompress key at any time to stop forwarding