---
title: "Why we let you bring your own API key — ServiceAgentX Blog"
description: "The reasoning behind BYOK in AgentX Teams: why the usage limits stayed when the charge went, and the two bugs we had to fix before a customer key could work at all."
url: https://www.serviceagentx.com/blog/why-we-let-you-bring-your-own-key
markdown: https://www.serviceagentx.com/blog/why-we-let-you-bring-your-own-key.md
---

# Why we let you bring your own key

Engineering · November 25, 2026 · Rafi

Giving customers a way to pay someone else for the expensive part sounds like a bad business decision. Here is the reasoning, and what it cost us to build it honestly.

---

The obvious objection to BYOK is that it removes a line from the invoice. A customer who was paying us for Claude tokens now pays Anthropic for them instead, and we are left holding the hosting bill. From a spreadsheet, it looks like a mistake.

It is not, and the reason is in the feedback we kept getting. People trying the product would say some version of the same sentence: *this is good, but it is slower than I want.* Not "this is too expensive". Not "this does not work". **Slower.** And a lot of them were already paying for an AI account with headroom sitting unused on it.

When the thing standing between someone and liking your product is a model you could not afford to put behind their request, and they are holding an account that could, the answer is not to defend the margin. It is to get out of the way and be judged on the rest.

## The decision we spent the longest on

Once you stop charging for tokens, the obvious next question is whether the usage limits should lift too. A customer paying their own provider can reasonably ask why they are still capped.

We kept the limits, and it is worth being plain about why. **The 5-hour and weekly limits were never a billing mechanism.** They are how the product stays responsive for everyone on it. A turn costs the same amount of our queue, our workers and our GPU scheduling whoever paid for the inference. Lifting the caps for key-holders would just mean the people without one get a slower product — which is exactly the complaint BYOK exists to answer.

> Bringing a key buys you the inference. It does not buy an exemption from the plan, because the plan is not about the inference.

So the usage row is still written, with the real token counts, and it still counts toward your limits. Only the cost on it is zero. In the code that is a four-line difference and a deliberate omission: `byok` is not in the list of billing sources the weekly limit excludes, and it must not be added to it.

## Write-only, and what that cost

A key is encrypted the moment it arrives and there is no endpoint that reads one back. Not an admin one, not a "reveal" button, not for the owner. The field in the sheet is empty even when a key is saved, and the only thing ever shown is the last four characters.

The cost of that is a worse experience in exactly one place: if you lose the key, you cannot look it up here. You paste a new one. We think that is the right trade, because the alternative is a screen that exists for the sole purpose of showing a customer secret, and every such screen is one bug away from showing it to someone else.

## Two bugs BYOK found on its way in

Building it surfaced something uncomfortable: for Pro specialists, BYOK could not have worked at all, for a reason that had nothing to do with keys.

Those agents went through a queue builder that kept only the local models from the list you had set and re-derived the cloud ones from our catalog. Set your specialist to Claude and it ran a local model instead — your choice silently discarded. Since a customer key is only ever reached *through the model you picked*, a dropped pick meant a dropped key. The model picker is the contract now: the list you see is the list that runs.

The second was adjacent. Web and browser work was being escalated to a stronger local model, prepended to any agent whose primary was AgentX Fast — whatever else that agent was set to. So an Estate Planning specialist would announce a handoff to a model branded **AgentX Code**, on every message, and its owner had no way to understand why. Escalation can only reorder an agent's own models now. It never adds one.

Neither bug was reported as a BYOK bug. They were found because a feature that depends on honouring your model choice forces you to check whether you actually do.

## What it looks like

A **BYOK** button on every frontier model in either picker, and an **AI providers** section in Settings › Vault. All three open the same sheet. Saving makes one cheap authenticated call so you find out about a typo immediately. A model running on your key says **Your key** on its row, because whose bill it is should not be something you have to remember.
