Who it is for
Use your own key when:- You hold commitments, credits, or negotiated rates with Anthropic, AWS or OpenAI that you want your coding traffic to draw down.
- Your procurement or compliance process requires frontier spend to sit on your own provider account.
- You want a single bill, or you have no account of your own with that provider.
- You want Valar’s spend caps and failover to keep protecting your team. Both stop applying to requests served on your key — see What you give up, which you should read before you turn this on.
Using your own key is turned on per organization, by arrangement with Valar. Talk to your Valar
contact to have it enabled for yours.
What you give up
Two guardrails stop applying to any request served on your key. Both are deliberate, and neither is recoverable by retrying.Add, rotate, or remove your key
Once your organization is enabled, a box per provider appears under Bring your own key on the Settings - ValarCode settings page: Anthropic API key, AWS Bedrock API key and OpenAI API key. Each box carries a badge for the traffic that key serves - Claude, OpenAI, or both. You need the organization admin role to change a key; any member can see whether one is set. Add a key- Create the key on the account you want the traffic billed to - an API key in the
Anthropic console (starts with
sk-ant-), a long-term Bedrock API key in the AWS console under Bedrock -> API keys (starts withABSK), or an API key in the OpenAI platform console (starts withsk-). Give it enough rate limit for your whole team. - Expand the box, paste the key, and click Check & save. Valar checks the key with the provider before storing anything: a key the provider rejects is not stored, and the box says why. A key that passes is stored encrypted and switched on.
- The box now shows the verdict — Verified just now: Anthropic accepted this key. — and a
locked API key field with a redacted fingerprint (
sk-ant-api0…,ABSK…bz0=) so you can tell which key is in place. The verdict stays: after a reload it reads Verified 3 minutes ago, or Check failed 2 days ago: … with the reason.
The key is stored encrypted and is never shown again — not in the dashboard, not in the API, not
in a log. Only the redacted fingerprint is ever displayed.
OpenAI key
An OpenAI API key serves OpenAI models through the Messages API and Codex Responses API. It does not affect your Claude traffic: that keeps running wherever it ran before - on your own Anthropic or AWS key if you store one, on Valar-managed providers otherwise. When you save or check an OpenAI key, Valar asks OpenAI which models the key can reach and lists any OpenAI model it cannot. That usually means the key’s OpenAI project has not been granted access to the model; grant it in the OpenAI console and click Check key again. The key is still stored - it authenticated, and the models it can reach are served on it. This check lists available models without generating tokens. It does not verify your credit balance or permission to generate responses. A request can still fail if either is missing. Any OpenAI key shape works (sk-, sk-proj-, sk-svcacct-). Use one whose project has the spend
limits and rate limits you want for your whole team.
AWS Bedrock key
A Bedrock API key works from any AWS region. Which AWS endpoint Valar calls with it, and where in the world the model runs, is set by the Endpoint and region controls in the key box; the default lets AWS decide.Also serve OpenAI models on your Bedrock key
Bedrock supports OpenAI models as well as Claude models; your AWS account must have access to them. The Bedrock box has a switch - Also serve OpenAI models on this key - that extends the key you already stored to that traffic too. It is off by default and stays off until you turn it on, so a key you stored for Claude keeps serving Claude only, and your OpenAI-model spend does not move onto your AWS bill without you asking for it. Turning it on re-checks the key. With it on, AWS bills you for OpenAI traffic served on this key and Valar charges $0. With it off, OpenAI traffic uses your enabled OpenAI API key, if present, or Valar-managed providers with normal charges. If both keys are enabled for OpenAI, requests can use either of your accounts. The Bedrock check verifies Claude access; it does not verify OpenAI model access or change that access in AWS. When you save or check a Bedrock key, Valar tests it against every Claude model it serves through Bedrock, on the endpoint you selected, and the box lists any model the key authenticated for but cannot use, with the reason. Two kinds of line:- Transient — AWS was overloaded, timed out, or is still enabling the model on your account (the first use of each model creates a Marketplace subscription, which takes about a minute). The key is fine; click Check key again. If an Overloaded line persists for one model while the others work, your account’s on-demand throughput quota for that model is probably zero — new accounts start there for Opus-class models. Request an increase in the AWS console (Service Quotas → Bedrock), then check again.
- Not usable on your AWS account — the account itself blocks the model. The line says what to change; the common cases are under What the key check can tell you.
Endpoint and region
AWS offers two endpoints that accept the same Bedrock API key for Claude. The Bedrock key box lets you pick which one your traffic uses:
Changing a select does not apply anything by itself — the row reads Not applied yet until you
commit it with a button:
- Key already stored: click Save & check. Valar saves the setting, then re-tests your stored key on the endpoint you picked. Cancel puts the selects back and saves nothing.
- Adding or rotating a key: the selects are part of the form and are saved together with the key when you click Check & save. The new key is tested on the endpoint you picked.
us. inference profile, so the request is served only from US regions. Note that AWS
prices US-region (geographic) inference about 10% higher than global inference — see
Amazon Bedrock pricing.
The same key, different permissions. The two endpoints are gated by different IAM actions —
bedrock:InvokeModel and bedrock:CallWithBearerToken for bedrock-runtime,
bedrock-mantle:CreateInference and bedrock-mantle:CallWithBearerToken for Mantle (see AWS:
API keys → Control who can generate and use API keys
for the two CallWithBearerToken actions, and
Bedrock Mantle → Prerequisites → Permissions
for bedrock-mantle:CreateInference and bedrock:InvokeModel) — so a key that passes on one can
fail on the other, and a policy in your AWS organization can allow one and deny the other. That is
why the key check always runs on the endpoint you selected. If it fails after switching, ask your
AWS administrator to allow the actions for that endpoint on the key’s IAM user.
Failover is unchanged. With both keys, a request that fails on your selected Bedrock endpoint
falls back to your Anthropic key. With a Bedrock key only, it returns a clear error to the harness
instead — it is never served, and never billed, on Valar’s account.
Claude Fable 5 needs an opt-in
Anthropic treats Claude Fable 5 (and Mythos 5) as covered models: AWS only serves them if your account has agreed that prompts and completions may be shared with Anthropic and kept for up to 30 days for safety review. Older Claude models do not require this. AWS enforces it through an account setting called the data retention mode; a new account starts ondefault, which means
“not agreed”, so Bedrock refuses Fable 5 until you set it to provider_data_share.
On Mantle (the default endpoint) — one API call, made with your Bedrock key:
us. profile can serve from (us-east-1, us-east-2, us-west-2):
PUT https://bedrock.<region>.amazonaws.com/data-retention with the body
{"mode":"provider_data_share"}, once per region, signed with AWS credentials. Both forms are the
same control-plane API — see AWS:
Data retention → Configuring data retention → Set account-wide data retention → Bedrock Control Plane
(the PUT /data-retention call; the CLI command is its aws bedrock surface).
Two things to know about this call:
- A Bedrock API key cannot make it. It needs an IAM identity (a user or role) with the
bedrock:PutAccountDataRetentionpermission — typically an administrator signed in to the AWS account (the same AWS page’s “IAM actions reference” mapsPUT /data-retentiontobedrock:PutAccountDataRetentionandGET /data-retentiontobedrock:GetAccountDataRetention). - It can take up to about an hour to propagate. Confirm it with
aws bedrock get-account-data-retention --region <region>in each region (AWS: “Check your current configuration → Bedrock Control Plane”); when all three reportprovider_data_share, click Check key.
What the key check can tell you
Each line in the box is one situation and its action. The common ones:Known limitation: Claude Haiku 4.5 on bedrock-runtime
AWS intermittently reports Claude Haiku 4.5 (inference profileus.anthropic.claude-haiku-4-5-20251001-v1:0) as unavailable in some US regions on
bedrock-runtime. This is on AWS’s side and not something your key or account can fix.
- If you also have an Anthropic key, Haiku requests that fail on Bedrock fall back to it — you will not notice beyond a line in the key check.
- If your organization uses only a Bedrock key on bedrock-runtime + US, Haiku 4.5 requests may fail until AWS resolves it. Other Claude models are not affected.
What it costs
Valar still counts every token so the traffic is measurable. It is simply priced at zero, because
your provider bills your account for it.
Your open-weight traffic is unchanged. Models such as GLM-5.2 and Kimi-K3 still run on
Valar and are billed by Valar. A routing policy that mixes open-weight, Claude, and OpenAI
models can produce both provider charges and Valar charges.
Exactly which requests use your key
On the supported APIs below, requests served by a model for which you have an enabled, eligible key use that key. This includes Auto routing and capability escalations to those models. Claude fallback requests on the Messages API also use your eligible Claude key. Requests served by an open-weight model remain billed by Valar. BYOK covers these coding requests:
Claude requests made through Cursor or Codex do not use your stored provider keys. The OpenAI
Responses support above does not extend Claude BYOK to those tools.
Where this traffic shows up
Requests served on your key appear in BYOK usage on the ValarCode Metrics tab once the selected time window contains own-key requests. Valar records the tokens and charges $0 for inference. The regular usage and savings panels exclude this traffic. For the actual cost, use your provider’s usage dashboard: Anthropic, OpenAI, or AWS Cost Explorer for Bedrock. That provider bills your account.Next steps
Model routing
Decide which requests reach Claude in the first place.
Analytics & savings
See what the panels measure, and why own-key traffic sits outside them.