# Bring your own key

> Use KwikQA with your own model key and models, on BYOK from $19 a month, BYOK Teams from $119 a month for the whole organization, or BYOK Enterprise from $649 a month.

> **The BYOK plans are coming soon**, with the other paid plans. Until they open, every account uses Hobby, which runs on KwikQA's hosted models; this page describes BYOK as it'll work.

On the BYOK plans, the CLI sends requests straight to the model endpoint you choose, with your own key, and that endpoint bills your account for model usage. Your evidence never passes through KwikQA's servers.

| Plan | Price | Limits |
| --- | --- | --- |
| BYOK | $25 / month, or $228 / year ($19 / month) | 200 analyses and 50 fixes a month |
| BYOK Teams | $149 / month, or $1,428 / year ($119 / month) | 500 analyses and 150 fixes a month, shared by the organization |
| BYOK Enterprise | From $7,788 / year ($649 / month), through KwikQA's sales | 3,600 analyses and 900 fixes a month, shared by the organization |

BYOK Teams and BYOK Enterprise are priced for the whole organization, like Teams and Enterprise, with no seats. BYOK has the CI rules of Pro, and BYOK Teams and BYOK Enterprise have those of Teams and Enterprise, with twice as many CI jobs at a time, since your endpoint does the work. See [Plans and usage](https://kwikqa.com/docs/plans/#teams) and [Plan rules in CI](https://kwikqa.com/docs/ci/#plan-rules).

To count requests toward your plan, the CLI tells KwikQA each request's kind (analysis or fix), model, and provider before it sends it, and nothing else. If the endpoint doesn't answer, the request is given back.

## Model endpoints

Every BYOK plan (BYOK, BYOK Teams, and BYOK Enterprise) can use any of these endpoints, with your own key. `KWIKQA_ENDPOINT` chooses one, from kwikqa 0.4.0:

- **OpenRouter** (`openrouter`), the default.
- **Anthropic API** (`anthropic`), with a Claude API key.
- **OpenAI API** (`openai`).
- **Azure OpenAI** (`azure-openai`), by deployment.
- **Amazon Bedrock** (`bedrock`), with SigV4 keys or a Bedrock API key.
- **GitHub Models** (`github-models`), with a GitHub token.

Subscription logins for Claude Code, Codex, or Copilot aren't model endpoints: their terms tie them to the vendor's own apps. Use the same vendor's API instead: a Claude API key, an OpenAI API key, or GitHub Models with a GitHub token. To hold the test changes those agents make to KwikQA's gates, use [`kwikqa check`](https://kwikqa.com/docs/check/).

## 1. Subscribe

```
$ npx kwikqa upgrade byo
$ npx kwikqa upgrade byo-team --annual
```

Or choose the plan in [Billing](https://kwikqa.com/dashboard/billing/). BYOK Enterprise is arranged with KwikQA's sales: write to sales@kwikqa.com.

## 2. Provide your key

Everything comes from the environment, so a CI job sets it from its own secrets. For OpenRouter, the default, export your key in the shell that runs KwikQA:

```
$ export OPENROUTER_API_KEY=sk-or-...
```

For another endpoint, set `KWIKQA_ENDPOINT` and that endpoint's credentials:

| `KWIKQA_ENDPOINT` | Credentials |
| --- | --- |
| `anthropic` | `ANTHROPIC_API_KEY` |
| `openai` | `OPENAI_API_KEY`, and optionally `OPENAI_ORG_ID` and `OPENAI_PROJECT_ID` |
| `azure-openai` | `AZURE_OPENAI_ENDPOINT` (https) and `AZURE_OPENAI_API_KEY`, and optionally `AZURE_OPENAI_API_VERSION` |
| `bedrock` | `AWS_REGION`, and `AWS_BEARER_TOKEN_BEDROCK` or `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` (with `AWS_SESSION_TOKEN` if needed) |
| `github-models` | `GITHUB_TOKEN` with `models: read`, and optionally `KWIKQA_GITHUB_MODELS_ORG` |

```
$ export KWIKQA_ENDPOINT=azure-openai
$ export AZURE_OPENAI_ENDPOINT=https://acme.openai.azure.com
$ export AZURE_OPENAI_API_KEY=...
$ export KWIKQA_DIAGNOSIS_MODEL=kwikqa-gpt-5   # your deployment
```

KwikQA reads credentials from the environment and never stores them. If one is missing, commands stop before sending anything. Your tests never see them: capture, probing, and validation run without your endpoint's model key, `OPENROUTER_API_KEY`, and `KWIKQA_TOKEN`. `GITHUB_TOKEN` and AWS access keys are passed through, because tests often need them, so give KwikQA a model-only credential, such as a Bedrock API key, where you can.

## 3. Choose models

On an endpoint other than OpenRouter, `KWIKQA_DIAGNOSIS_MODEL` is required: the model ID or deployment your endpoint serves, such as `claude-sonnet-4-5` on the Anthropic API. `KWIKQA_REPAIR_MODEL` is optional; repairs use the diagnosis model unless it's set. Optionally, set `KWIKQA_MODEL_CONTEXT` (the context window, 128000 unless set), `KWIKQA_MODEL_MAX_OUTPUT`, `KWIKQA_MODEL_REASONING=true` for a reasoning model, and `KWIKQA_MODEL_PRICING=3,15` (your USD price per million prompt and completion tokens), so the preview's cost estimate is yours.

On OpenRouter, by default you use the same models as the hosted plans. To choose your own, set routes as `author/model@provider`:

```
$ export KWIKQA_DIAGNOSIS_MODEL=anthropic/claude-haiku-5.5@anthropic
$ export KWIKQA_REPAIR_MODEL=openai/gpt-6.1-sol@openai
```

- On OpenRouter, the model must support strict JSON Schema output through that provider. KwikQA checks OpenRouter's endpoint details before every request and refuses routes that can't meet it.
- OpenRouter requests use only the provider you name, with fallbacks turned off.
- With your own model routes, KwikQA sends no reasoning-effort setting.
- Token and cost caps still apply to every request and are shown in each preview.

> **Quality.** KwikQA's prompts and caps are tuned for the hosted models. Other models may diagnose less reliably.

---

Source: https://kwikqa.com/docs/byo-key/, updated 2026-11-22
