> For the complete documentation index, see [llms.txt](https://docs.cortecs.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cortecs.ai/features/bring-your-own-key-beta.md).

# Bring Your Own Key \[BETA]

{% hint style="warning" %}
This feature is currently in beta. For any issues or feedback, please contact us via [Discord](https://discord.com/invite/bPFEFcWBhp) or <support@cortecs.ai>.
{% endhint %}

BYOK lets you connect your own provider credentials to Cortecs, allowing requests to be routed through your own provider account.

When BYOK is enabled for a provider, Cortecs can use your API key either before or after the Cortecs-managed endpoints, depending on the selected usage mode. This gives you more control over provider billing and quota while still using Cortecs routing, model selection, and API interface.

### Adding a Provider Key

To add your own provider key:

1. Go to [**Settings**](https://cortecs.ai/userArea/console)
2. Select the [**BYOK**](https://cortecs.ai/userArea/console?tab=byok) tab
3. Click **Add provider key**
4. Select the provider
5. Enter the required credential fields
6. Choose a usage mode
7. Click **Save**

Only project administrators can add, update, or delete provider keys.

### BYOK Usage Modes

Cortecs supports two BYOK modes:

<table><thead><tr><th>Mode</th><th width="187">Behavior</th><th>Platform Key Used?</th><th>Balance Check</th></tr></thead><tbody><tr><td><strong>Prefer my key</strong></td><td>Cortecs tries your provider key first. If the request fails, Cortecs retries using the Cortecs-managed endpoints.</td><td>Yes, as backup</td><td>Required</td></tr><tr><td><strong>Fallback to my key</strong></td><td>Cortecs first tries its managed endpoints. If those endpoints fail, Cortecs retries the request using your provider key.</td><td>Yes, first</td><td>Required</td></tr></tbody></table>

### Billing

{% hint style="info" %}
There is currently no Cortecs usage fee for requests served using your own BYOK key. BYOK is currently available at no additional cost on the Cortecs platform.
{% endhint %}

### Supported Providers

#### Providers Requiring Only an API Key

For the following providers, you only need to provide the provider API key:

* Mistral
* OVH
* Nebius
* Tensorix
* Inceptron
* Infercom
* Ionos
* Scaleway
* AKI
* Berget

#### Amazon Bedrock

Cortecs currently supports Bedrock API keys for BYOK. AWS key authentication is not supported yet for BYOK, but may be added in the future.

#### Google Vertex AI

For Google Vertex AI, you need to provide a **Google service account JSON** file. You can download this file from the *Google Cloud Console*.

{% hint style="warning" %}
Ensure the service account has permission to access Vertex AI and the models you intend to use.
{% endhint %}

You do not need to specify a region. Cortecs automatically routes through supported EU regions. Ensure the models you plan to use are enabled in the appropriate EU regions of your Google Cloud project.

#### Azure OpenAI

Cortecs currently supports Azure OpenAI resources for BYOK using:

```
*.openai.azure.com
```

You need to provide:

* Resource name
* API key
* API version, optional

Cortecs automatically constructs the Azure endpoint from the resource name.

Example:

```
Resource name: my-azure-resource
Endpoint used: https://my-azure-resource.openai.azure.com
```

{% hint style="warning" %}
Azure OpenAI requires explicit model deployments. The deployment name in your Azure resource must match the Cortecs model ID you are requesting.
{% endhint %}

{% hint style="info" %}
More advanced BYOK configuration options will be added over time based on user needs.
{% endhint %}
