---
title: "Bring Your Own Key"
canonical: https://trickest.com/docs/using-the-app/ai-agent/bring-your-own-key
description: "Connect Anthropic, OpenAI, or Google keys so the Trickest agent bills your provider account."
---

# Bring Your Own Key

## Overview

Bring Your Own Key (BYOK) runs the Trickest agent on your own AI provider account. You add a provider API key under **Settings > Agent > Bring Your Own Key**. Agent turns then bill that account instead of Trickest.

On the [Community plan](/docs/key-concepts/community-plan) you need a **verified** key before the agent can chat. Without one, **Agent Mode** opens on a connect empty state right away. You do not get an empty composer first. Platform-billed models are available when the workspace has platform AI enabled (enterprise).

Open the page at [trickest.io/settings/model-providers](https://trickest.io/settings/model-providers).

## Supported Providers

| Provider | What you paste | Models available | Get a key |
|---|---|---|---|
| **Anthropic** | Anthropic API key | Claude models (names beginning with `claude-`) | [console.anthropic.com/settings/keys](https://console.anthropic.com/settings/keys) |
| **OpenAI** | OpenAI API key | OpenAI models on your account | [platform.openai.com/api-keys](https://platform.openai.com/api-keys) |
| **Google** | Google AI Studio API key | Google models on your account | [aistudio.google.com/apikey](https://aistudio.google.com/apikey) |

Each workspace holds **one key per provider**. To replace a key, delete or rotate the existing one first. The model picker lists models from the providers you have verified.

## Prerequisites

- Your workspace plan includes AI access (Community includes this for BYOK).
- You need vault admin permission to create or delete keys.
- Have the provider API key ready before you open the form.

## Add a Key (All Providers)

The Settings UI uses the same flow for every provider.

<Steps>
  <Step title="Open Bring Your Own Key">
    Go to **Settings > Agent > Bring Your Own Key**, or open [trickest.io/settings/model-providers](https://trickest.io/settings/model-providers).
  </Step>
  <Step title="Enable the provider">
    Find the provider row and turn the switch on. A nested panel opens with the key field.
  </Step>
  <Step title="Paste the key">
    Paste the API key into the field. You can add a **Label** so you can tell keys apart later.
  </Step>
  <Step title="Save and verify">
    Click **Save & verify**. The platform probes the provider live (no model spend) and stores the key as **Verified** or **Failed**.
  </Step>
  <Step title="Confirm the status">
    Look for the **Verified** pill and the masked last four characters (`••••••••••••abcd`). The model picker stays empty until verification succeeds.
  </Step>
</Steps>

<Note>
The platform encrypts keys at rest and never shows the full key again after save. You only see the mask and status.
</Note>

## Provider Guides

### Anthropic

<Steps>
  <Step title="Create an Anthropic key">
    Open [Anthropic Console → API keys](https://console.anthropic.com/settings/keys), create a key, and copy it.
  </Step>
  <Step title="Add it in Trickest">
    On **Bring Your Own Key**, enable **Anthropic API Key**, paste the key, and click **Save & verify**.
  </Step>
  <Step title="Use Claude in the agent">
    After **Verified**, the model picker lists Claude models. The Anthropic key covers model IDs that begin with `claude-`.
  </Step>
</Steps>

### OpenAI

<Steps>
  <Step title="Create an OpenAI key">
    Open [OpenAI API keys](https://platform.openai.com/api-keys), create a key, and copy it.
  </Step>
  <Step title="Add it in Trickest">
    Enable **OpenAI API Key**, paste the key, and click **Save & verify**.
  </Step>
  <Step title="Use OpenAI models">
    After **Verified**, the picker lists OpenAI models. Usage bills your OpenAI account.
  </Step>
</Steps>

### Google (AI Studio)

<Steps>
  <Step title="Create a Google AI Studio key">
    Open [Google AI Studio → API key](https://aistudio.google.com/apikey), create a key, and copy it.
  </Step>
  <Step title="Add it in Trickest">
    Enable **Google API Key**, paste the Google AI Studio key, and click **Save & verify**.
  </Step>
  <Step title="Use Google models">
    After **Verified**, the picker lists Google models. Usage bills your Google account.
  </Step>
</Steps>

## No Key Yet

If the workspace has no platform AI and no verified BYOK key, opening **Agent Mode** (`/agent`) shows the connect empty state titled **Connect a key to chat**. You stay on Agent Mode; the app does not redirect you away.

From that surface you can:

1. **Your key:** quick-connect **Anthropic** or **OpenAI** (same save-and-verify path as Settings). Or open **Bring Your Own Key settings** for any supported provider, including Google.
2. **Or from your agent:** integrate **Claude Code**, **Cursor**, or **Codex** if you prefer to drive Trickest from an external coding agent.

After a key verifies, reload or return to Agent Mode; the welcome / composer flow replaces the empty state.

If the model picker shows no entitled models yet, it can offer **Add provider key**, which opens the same **Connect a model provider** dialog.

## After Verification

- Agent Mode leaves the connect empty state and the model picker lists models from your verified providers.
- The cost chip can show **Your provider** when the turn bills BYOK.
- Check usage under **Settings > Agent > AI Usage**. BYOK LLM invoices stay on your provider; Trickest does not charge model dollars for those turns.

## Community vs Enterprise

| | Community | Enterprise (platform AI) |
|---|---|---|
| Agent chat | Requires a verified BYOK key; Agent Mode shows the connect empty state until then | Can use Trickest platform models without BYOK |
| Model catalog | Only models from your verified keys | Platform catalog, plus optional BYOK |
| Mid-turn fallback | None. Turns stay on your keys | None. BYOK turns stay on your keys |

On Community, without a verified key you see **Connect a key to chat** as soon as you open Agent Mode.

## Rotate or Delete a Key

1. Open **Bring Your Own Key**.
2. On the saved key row, click the trash control to delete, or paste a new key to rotate through the same save-and-verify flow.
3. To retry a **Failed** key without replacing it, click the refresh control to re-verify (rate-limited).

Deleting a key removes it from the vault. Add a new key before you expect the agent to use that provider again.

## Troubleshooting

| Symptom | What to do |
|---|---|
| Status **Failed** after save | Click refresh to re-verify, or delete and paste a fresh key from the provider console. |
| Toast says verification failed | Confirm the key is active, has API access, and belongs to the provider you selected. |
| "A … key already exists" | Delete or rotate the existing key for that provider first. |
| Agent Mode stuck on **Connect a key to chat** | Verify at least one Anthropic, OpenAI, or Google key. Quick-connect covers Anthropic and OpenAI; use Settings for Google. |
| Empty model picker | Confirm a key shows **Verified**, then reload Agent Mode. |
| Unexpected provider invoice | Check **AI Usage** for BYOK turns and the matching provider dashboard. |

## Related

<CardGroup cols={2}>
  <Card title="Community Plan" icon="id-badge" href="/docs/key-concepts/community-plan">
    Plan contents and how execution works on your machines.
  </Card>
  <Card title="Agent Integrations" icon="plug" href="/docs/developer-tools/sdk/agent-integrations">
    Drive Trickest from Claude Code, Cursor, or Codex.
  </Card>
</CardGroup>

---
_Markdown source of https://trickest.com/docs/using-the-app/ai-agent/bring-your-own-key._
