Skip to content
ArgusDocs
MenuModel provider keys (bring your own key)

Model provider keys (bring your own key)

Run an agent on your own Anthropic or OpenAI account. The key is sealed per project, and the provider bills you directly.

View as Markdown

On this page

By default an agent runs on the models Argus provides, and the cost counts against your project's trial budget. A project can instead use its own provider key. Runs on those models are billed by your provider, and Argus records them without charging them to the trial.

Every model call is recorded in the ledger with its cost, on either path, and attributed to the project, the agent and version, and the session and run that made it, with the end user when there is one.

Models

Models that use your key have ids that start with byok-. Name one in an agent's model field like any other model:

Model id Provider
byok-anthropic/claude-sonnet-5-5 Anthropic
byok-anthropic/claude-haiku-5-5 Anthropic
byok-anthropic/claude-opus-5-5 Anthropic
byok-openai/gpt-5.5 OpenAI

A byok- model is available only while the project holds a key for its provider. GET /v1/projects/{project}/byok-models lists the models and, for each one that is unavailable, why.

Add a key

  1. Open Settings in the app and find Model provider keys.
  2. Choose the provider and paste your key.
  3. Confirm your sign-in when asked. Writing a provider key needs a fresh sign-in (step-up), because the key is a paid credential. The check applies to adding, replacing and removing a key.

In the Studio, the model picker shows the byok- models in their own group. A model whose provider has no key is disabled, with a hint that links to Settings.

You can also set a key through the API (PUT /v1/projects/{project}/provider-keys/{provider}). Project admins and members can set and remove keys.

Billing and the trial budget

  • Your provider bills you for every run on a byok- model, under your own account and your own limits there. Set a spend limit with your provider if you want a ceiling.
  • Those runs are recorded in the ledger at a cost of zero to Argus. They do not use the trial budget, and the trial budget does not pause them. Runs on Argus-provided models still count against it.

See Budgets and limits.

Rejected keys

If the provider answers that it does not accept the key (revoked, expired or out of credit), the run fails and the session shows Provider key rejected. The key's row in Settings shows that the provider rejected it, with the time, and the Studio's hint links there.

To fix it, replace the key: paste the new one in the same place and confirm your sign-in. A replacement overwrites the old key. To stop using your key, remove it. Runs that name a byok- model then fail from their next model call, and a label move or session start that uses one is refused with 422 provider-key-missing until a key is set again.

How the key is handled

  • It is sealed with encryption per project and per provider; a copy placed anywhere else does not open.
  • Argus shows only the last four characters, after you save it. The full key cannot be read back through the product or the API.
  • It is never written to logs, events or error messages.
  • A byok- model never falls back to Argus's own credentials or to another model. With no valid key, the call fails and says so.

See Security.