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

# Bring your own AI provider key

> Add your company's own Anthropic and OpenAI API keys so DinoAI agents run those models on your keys, and choose what happens when a key fails.

Bring your own key (BYOK) lets DinoAI agents call [Anthropic](https://www.anthropic.com/) and [OpenAI](https://openai.com/) models with your company's own API keys instead of Paradime's. You add the keys in the **AI Providers** section of **Settings** > **Integrations**.

## What you can do

* Run the Anthropic and OpenAI models of DinoAI agents on your company's API keys, so those calls use your provider account.
* Choose for each key whether Paradime's key takes over when your key fails.
* See which models run on your key from the **Your key** badge in the agent builder and on the new chat page.
* Review every change to a key in the [audit logs](https://docs.paradime.io/products/settings/configuration/audit-logs.md).

## Prerequisites

> [!NOTE]
>
> Before you add a key, make sure you have:
>
> * The Admin role in Paradime. Only admins see the **AI Providers** cards.
> * An API key from your company's Anthropic account, OpenAI account, or both.
> * For a restricted OpenAI key: the **Models: Read** permission, so that Paradime can check the key, and permission to call the models DinoAI uses.

## What your key serves

Your key serves DinoAI agent sessions. Every call an agent makes to a model from that provider uses your key: its main model, its sub-agents, planning, and fallback models from the same provider.

| Key | Models it serves |
| - | - |
| **Anthropic** | Opus 5.5, Sonnet 5.5, Haiku 5.5 |
| **OpenAI** | GPT-6.2 Astra, GPT-6.2 Sol, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Astra, GPT-6 Luna |

Models from other providers (Gemini, Grok, Kimi, and DeepSeek) keep using Paradime's keys. The DinoAI copilot in the Code IDE, and other DinoAI features in the editor such as code autocomplete, also use Paradime's keys. See [Supported models](https://docs.paradime.io/products/dino-ai/supported-models.md) for the full lineup.

Each key is set once for your organization, and DinoAI agents in every workspace use it. Calls that run on your key count toward your provider account's usage and limits.

> [!NOTE]
>
> If the card shows **Bring your own key is not on for this account yet**, Paradime keeps your key, but DinoAI doesn't use it until Paradime turns bring-your-own-key on for your account. Contact the Paradime team at [support@paradime.io](mailto:support@paradime.io) to turn it on.

## Add a key

1. In Paradime, go to **Settings** > **Integrations** (see [connecting integrations](https://docs.paradime.io/integrations/connecting-integrations.md)).
2. In the **Workspace** section, under **AI Providers**, find **Anthropic** or **OpenAI** and click **Add key**.
3. Paste the key into **Anthropic API key** or **OpenAI API key**.
4. Click **Save key**. Paradime checks the key with the provider before it saves it. The check lists the provider's models with your key, so it uses no tokens.
5. When the form shows **Key saved**, click **Close**.

Paradime stores the key in Vault and shows only its last 4 characters, for example `…a1b2`. Agent sessions that start after you save the key use it.

### If Paradime doesn't save the key

The form shows **Connection failed** with the reason. Fix the problem and click **Try again**.

| Message | What to do |
| - | - |
| "Anthropic refused this key. Check it and try again." (or OpenAI) | The provider doesn't accept the key. Copy the key again, or create a new one. |
| "This OpenAI key cannot list models, so it cannot be checked. Give it the Models: Read permission, or use an unrestricted key." | Give the restricted key the **Models: Read** permission in OpenAI, or use an unrestricted key. |
| "Anthropic is rate limiting the check. Try again in a minute." (or OpenAI) | Wait a minute, then try again. |
| "Could not reach Anthropic to check the key. Try again." (or OpenAI) | Try again. If it keeps failing, check the provider's status page. |
| "That is not an API key: it is too long." or "That is not an API key: it has characters a key never has." | Paste only the key, with no other text. Paradime accepts keys of up to 256 characters. |

## Choose what happens when your key fails

Each key has a setting, **If this key doesn't work, use Paradime's key**. It's off by default.

| Setting | What happens |
| - | - |
| **Off** (default) | Only your key is used, for every model from that provider, fallback models included. DinoAI retries a failed call as usual. If the call still fails because of your key, the agent stops with an error that names your key. |
| **On** | DinoAI tries your key first. If the call fails on your key, Paradime's key answers it. After the provider refuses your key, or reports it out of credit, DinoAI skips your key for 5 minutes and uses Paradime's key. |

To change the setting:

1. Go to **Settings** > **Integrations**, find **Anthropic** or **OpenAI**, and click **Manage**.
2. Turn **If this key doesn't work, use Paradime's key** on or off.

The change applies to agent sessions that start after it. A session that is already running keeps the setting it started with.

With the setting off, the error says whether your key was refused, may not use the model, is out of credit or over its spending limit, or is over its rate limit. For example:

```text theme={"system"}
your company's own Anthropic key was refused (401). An account admin can fix it in Account Settings → AI Providers, or turn on "If this key doesn't work, use Paradime's key".
```

A provider outage shows DinoAI's usual error instead.

## See which models run on your key

DinoAI marks the models your key serves with a **Your key** badge. Hover it to read "Served by your company's own API key".

* In the agent builder's [**Model**](https://docs.paradime.io/products/dino-ai/programmable-agents/creating-agents-in-the-app.md#model) section: next to each of a preset's models (**Main**, **Sub-agents**, **Planning**) that runs on your key, and next to a preset in the list when all three of its models do.
* On the [new chat page](https://docs.paradime.io/products/dino-ai/programmable-agents/agent-sessions.md#starting-a-new-chat): next to an agent's model family, when all three of its models run on your key.

The badge shows only while bring-your-own-key is on for your account. A preset that mixes providers, such as **Fast** (Gemini 3.8 Flash with Sonnet 5.5 for planning), shows the badge only on the models your key serves.

## Replace a key

1. Go to **Settings** > **Integrations**, find **Anthropic** or **OpenAI**, and click **Manage**. The panel shows **Your key** with its last 4 characters.
2. Click **Replace key**. The form says that saving replaces your current key.
3. Paste the new key and click **Save key**.

The **If this key doesn't work, use Paradime's key** setting stays as it was. Agent sessions pick up the new key within about a minute.

## Remove a key

1. Go to **Settings** > **Integrations**, find **Anthropic** or **OpenAI**, and click **Manage**.
2. Click **Remove key**, then confirm with **Remove key**. To cancel, click **Keep connected**.

Paradime deletes your key and its setting. Agent sessions that start after you remove the key use Paradime's key.

## Audit log events

Paradime records every change in the [audit logs](https://docs.paradime.io/products/settings/configuration/audit-logs.md), under the `integrations` event source. The events never include the key or its last characters.

| Event | When it's recorded | Metadata |
| - | - | - |
| `ai_provider_key_set` | An admin saves a key, the first one or a replacement. | `provider` (`anthropic` or `openai`), and `replaced`: `true` when the key replaced a different one. |
| `ai_provider_key_fallback_changed` | An admin turns **If this key doesn't work, use Paradime's key** on or off. | `provider`, and `fallback_to_paradime`: `true` when the setting is on. |
| `ai_provider_key_removed` | An admin removes a key. | `provider` |

## Troubleshooting

### An agent stops with an error about your company's key

The setting **If this key doesn't work, use Paradime's key** is off, and the provider refused the call on your key. Fix the problem in your provider account (credit, spending limit, rate limit, or model access), [replace the key](#replace-a-key), or [turn the setting on](#choose-what-happens-when-your-key-fails).

### An agent session doesn't start

If the session fails with "We couldn't read your company's AI provider keys. Try again in a moment.", Paradime couldn't read your stored keys when the session started. Paradime doesn't start the session on its own keys instead. Try again in a moment, and contact [support@paradime.io](mailto:support@paradime.io) if it keeps happening.


## Related topics

- [Run DinoAI agents on your own Anthropic and OpenAI keys](https://docs.paradime.io/changelog/2026-11-26/byok.md)
- [Supported models](https://docs.paradime.io/products/dino-ai/supported-models.md)
- [Bring Your Own Cloud on Azure](https://docs.paradime.io/products/settings/deployment/byoc/azure.md)
- [Bring Your Own Cloud on GCP](https://docs.paradime.io/products/settings/deployment/byoc/gcp.md)
- [Bring Your Own Cloud on AWS](https://docs.paradime.io/products/settings/deployment/byoc/aws.md)


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