Skip to main content

What is BYOK?

Bring Your Own Key means you can use your own AI provider API keys with OCCode instead of (or alongside) the built-in credits system. This gives you:
  • Model choice — use Claude, GPT, Gemini, Llama, or any supported model
  • Cost control — pay your provider directly at their rates
  • No credit limits — your usage is limited only by your provider’s quota

Supported providers

ProviderModelsHow to get a key
AnthropicClaude 4, Claude Opus, Claude Sonnetconsole.anthropic.com
OpenAIGPT-5, GPT-4o, o3platform.openai.com
GoogleGemini 3, Gemini 2.5aistudio.google.com
OpenRouter200+ modelsopenrouter.ai
OpenRouter is a great option if you want access to many models with a single key.

Adding your API key

Open the Models app

In OCCode, navigate to the Models app from the sidebar.

Click Add Provider

Select your provider from the list.

Paste your API key

Enter your API key. OCCode validates it immediately.

Set as default (optional)

Choose whether to use this provider as your default model.

How billing works with BYOK

SetupWho pays
No custom keysYou pay via OCCode credits
Custom keys addedYour provider bills you directly
Mixed (some BYOK, some default)Each model bills its respective source
When you use your own keys, no OCCode credits are consumed for those models. Your credit balance is only used for the built-in Legacy Model.

Which key is used where?

See Which Key is Used Where for a detailed breakdown of how OCCode decides which API key to use for each interaction.