Skip to main content

Bring your own key

Bring your own key, or BYOK, lets a Qodex project use your OpenAI API key for LLM calls. This is useful when your team wants provider billing to go directly to your own account, wants separate usage visibility, or has internal controls around model spend.

What changes with BYOK

Qodex takes zero margin on BYOK usage.

1. Open LLM keys

In your Qodex project, go to Settings > LLM keys and choose OpenAI API key.

2. Save your key

Paste an OpenAI API key that starts with sk-. Qodex validates the key before saving it. If OpenAI rejects the key, Qodex shows the upstream error so you can fix it before running tests. The saved key is encrypted at rest. The UI only shows the last four characters after save.

3. Run Qodex normally

After the key is saved, the next LLM call for that project uses your key. Open Usage from the project account menu to review usage behavior. BYOK traffic is billed through your provider account rather than the platform-funded key.

4. Rotate or remove the key

Go to Settings > LLM keys, then choose Remove for the OpenAI key and confirm Remove. To rotate a key, save the replacement before removing the old key. Removing the key returns the project to the platform-funded key only when the project is admin-approved. Otherwise, the project returns to pending and Qodex stops working until a valid key is added or access is approved.

Limits

  • OpenAI BYOK is the live provider path today.
  • Anthropic and Google BYOK are planned.
  • Keys are project-scoped. Each project stores its own key.
  • Qodex validates the key at save time. If the provider later revokes it, the failure appears in run logs.
  • Qodex plan caps do not limit BYOK provider spend. Use your provider account controls for that.

Next steps

Usage and cost caps

Understand how BYOK affects project caps.

Self-hosted environment variables

Configure platform fallback keys when self-hosting.

How Qodex works

See where LLM calls fit into the agent loop.

Integrations

Return to all integrations.