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

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

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.