> ## Documentation Index
> Fetch the complete documentation index at: https://docs.weflayr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bring your own key

> Call models with your own provider keys.

Your provider keys are shared by every project of your organization. Calls made with them are billed by your provider, plus a [Weflayr fee](https://docs.weflayr.com/product/credits.md#calls-made-with-your-own-provider-keys).

<video src="https://mintcdn.com/weflayr/VrD9fqWVGy01FKxP/images/product/bring-your-own-key.mp4?fit=max&auto=format&n=VrD9fqWVGy01FKxP&q=85&s=771740809efba78c8269088aec778c9a" poster="/images/product/bring-your-own-key-poster.jpg" aria-label="Bring your own key page: the added keys, the other providers, then the dialog editing the Microsoft Azure key with its region" controls loop muted playsInline preload="metadata" />

## Your key or Weflayr's

Wherever a deployment can be called with your key, you choose which key to use:

* **AI gateway**: `byok_preference` (see [Chat Completions](https://docs.weflayr.com/api/gateway/chat-completions.md#weflayr-fields)). By default, your key first, then Weflayr's.
* **Routing strategies** and **model benchmarks**: each deployment is listed twice, on Weflayr's key and on yours with a **BYOK** tag. Pick one or both: both means your key first, then Weflayr's.
* **A/B tests**: a model target is one deployment, on Weflayr's key or on yours.

![Model selection with gpt-4.1 listed on OpenAI twice, once with a BYOK tag](https://mintcdn.com/weflayr/VrD9fqWVGy01FKxP/images/product/byok-deployments.png?fit=max\&auto=format\&n=VrD9fqWVGy01FKxP\&q=85\&s=610cfdf73db88239c8e204a6c4c61abc)

A benchmark picked on your key only stops if the provider refuses the key. Resume it on Weflayr's keys, or retry once the key is fixed.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.