# Bring Your Own Key (BYOK)

Use an organization-owned Anthropic or OpenAI key for eligible hosted model requests.

Source: https://magistermarketing.com/docs/billing/byok

BYOK (Bring Your Own Key) lets an organization route eligible hosted-model requests through its own provider account. You pay that provider directly instead of drawing Magister model credits for those requests.

**Paid Agent requirement** — BYOK works on a paid Agent plan only. Connect uses the model credentials from Claude, ChatGPT, Codex, or another external assistant, so Magister BYOK does not apply there. The free start and inactive organizations cannot save or use provider keys, so the free start's credits are its limit. If an organization already has a stored key when it loses eligibility, Magister keeps the key disabled until a paid Agent plan returns.

**Supported providers**
- **Anthropic** — Claude models
- **OpenAI** — GPT models

Google/Gemini keys are not accepted by the current BYOK settings or save API.

**How to add a key** — open **Organization Settings → Model keys**. Paste the Anthropic or OpenAI key and save. Only organization managers can change model keys.

**Where your key is stored** — encrypted server-side in the gateway. The full key is never shown back to you after you save it; the UI displays the last 4 characters so you can recognize it (e.g. `••••a1b2`).

**Removing a key** — click **Remove** next to any saved key. The key is deleted from storage and Magister goes back to using its own infrastructure (and your credits).

**Model availability** — BYOK does not unlock a model that the live hosted picker does not offer. It changes routing and billing for a supported provider/model combination.

**Usage reporting** — Magister Billing separates estimated usage through **Your model keys** from platform-funded credits. The provider's own bill is authoritative for the amount charged.

**Combining BYOK and credits** — if you save a key for one supported provider but not the other, eligible requests for that provider use your key and other hosted requests use Magister credits.

**Connect** — your external assistant's model credentials and model bill remain with that assistant provider. A Connect organization neither needs nor accepts a Magister provider key; upgrading to Agent makes its organization BYOK settings usable.
