# BYOK profile (/execution/byok)



BYOK (bring your own key) bypasses Zumik's contracted accounts. The
[Execution Broker](/concepts/execution-profiles) calls the resolved provider with the customer's own
sealed credential, the provider bills the customer directly, and Zumik charges its platform fee on
top. Everything else - alias resolution, project policy, session state, diagnostics, purge evidence -
stays exactly as it is on the managed path.

It is first-class for all five primary providers: OpenAI, Anthropic, xAI, Google Gemini, and
Fireworks AI. The profile that served the request comes back as `Agent-Execution-Profile: byok`, and
the credential used rides on `Agent-Byok-Credential-Id`.

## The path [#the-path]

```text
Client
  ↓
Product API Core            alias resolution, project policy, the Execution Broker
  ↓
Provider adapter            called with the customer's decrypted key
  ↓
Customer-owned provider account
```

The broker selects BYOK when the project has a stored credential for the resolved provider and no
[subscription](/guides/subscriptions) route applies. The decrypted key is held in zeroizing memory
for the call and wiped when the credential drops - it is never logged and never returned. See
[BYOK setup](/guides/byok-setup) and the
[provider-credentials API](/api-v2/provider-credentials) for sealing and rotating keys.

## What it inherits [#what-it-inherits]

BYOK keeps the full provider-native cost and speed surface. The work runs under your key, but the
broker still routes for the same optimizations the managed path uses:

* [Anthropic](/providers/anthropic) `cache_control` breakpoints and the 90% cache-read
  discount.
* [Gemini](/providers/gemini) implicit caching and the Context Caching API.
* [Fireworks](/providers/fireworks) dedicated-tier latency and speculative decoding.
* [OpenAI](/providers/openai) and Anthropic Batch APIs for non-interactive work.

Provider-native caching works identically - the discount shows up in `cached_tokens` on `/v1` and in
the full reuse waterfall on `/v2/usage`, because it is the same provider mechanism, just billed to your
account. The per-provider facts live in the [capability manifest](/concepts/capability-manifests).

<Note>
  Caching under your own key is itself a reason some customers choose BYOK: the cache lives in the
  account they control, which can matter for account-level retention and compliance requirements.
</Note>

## Billing relationship [#billing-relationship]

This is the practical difference from the managed profile. The provider invoices the customer for
tokens; Zumik invoices the customer for the control plane (resolution, state, diagnostics, purge) plus
its platform fee. There is no Zumik markup on the provider tokens themselves. The
[plans page](/pricing/plans) covers how the platform fee is structured.

<Warning>
  BYOK never falls back to OpenRouter. The customer's key is an explicit choice, so if the provider
  call fails the request degrades to a clear error rather than being silently brokered through a
  third party. This is the one behavioral difference from the managed path's
  [emergency fallback](/execution/openrouter-fallback).
</Warning>

## When to use BYOK [#when-to-use-byok]

<CardGroup cols="2">
  <Card title="Existing provider agreements" icon="file-signature">
    You already have contracted rates, committed-use discounts, or an enterprise agreement with a
    provider and want to run on them.
  </Card>

  <Card title="Account-level retention" icon="shield-halved">
    Your provider account carries a private retention or zero-retention policy that has to apply to
    the inference calls.
  </Card>

  <Card title="Quota and rate reservations" icon="gauge">
    Customer-specific rate limits or reserved quota that live on your provider account, not Zumik's.
  </Card>

  <Card title="Procurement and billing control" icon="receipt">
    Procurement constraints or a billing relationship you need to own directly with the provider.
  </Card>
</CardGroup>

If a few model paths concentrate hard enough that dedicated infrastructure would beat both managed and
BYOK on blended cost, the next escalation is [BYOC](/execution/byoc) - but only after
[replay](/guides/replay) proves it.
