Bring Your Own Key
Connect Anthropic, OpenAI, Google, or Vercel AI Gateway keys so the Trickest agent bills your provider account.
On this page17
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 you need a verified key before the agent can chat. Platform-billed models are available on enterprise plans only.
Open the page at 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 |
| OpenAI | OpenAI API key | OpenAI models on your account | platform.openai.com/api-keys |
| Google AI Studio API key | Google models on your account | aistudio.google.com/apikey | |
| Vercel AI Gateway | Vercel AI Gateway API key | Full model catalog through your Gateway account | Vercel AI Gateway auth docs |
Each workspace holds one key per provider. To replace a key, delete or rotate the existing one first.
Gateway vs direct keys
- The agent prefers a verified Vercel AI Gateway key over direct Anthropic, OpenAI, or Google keys, and lists the full model catalog.
- Direct keys list only that provider's models.
- Without a Gateway key, pick models from the providers you 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.
Go to Settings > Agent > Bring Your Own Key, or open trickest.io/settings/model-providers.
Find the provider row and turn the switch on. A nested panel opens with the key field.
Paste the API key into the field. You can add a Label so you can tell keys apart later.
Click Save & verify. The platform probes the provider live (no model spend) and stores the key as Verified or Failed.
Look for the Verified pill and the masked last four characters (••••••••••••abcd). The model picker stays empty until verification succeeds.
Provider Guides
Anthropic
Open Anthropic Console → API keys, create a key, and copy it.
On Bring Your Own Key, enable Anthropic API Key, paste the key, and click Save & verify.
After Verified, the model picker lists Claude models. The Anthropic key covers model IDs that begin with claude-.
OpenAI
Open OpenAI API keys, create a key, and copy it.
Enable OpenAI API Key, paste the key, and click Save & verify.
After Verified, the picker lists OpenAI models. Usage bills your OpenAI account.
Google (AI Studio)
Open Google AI Studio → API key, create a key, and copy it.
Enable Google API Key, paste the Google AI Studio key, and click Save & verify.
After Verified, the picker lists Google models. Usage bills your Google account.
Vercel AI Gateway
Follow Vercel AI Gateway authentication and create a Gateway API key.
Enable Vercel AI Gateway, paste the key, and click Save & verify.
After Verified, the agent prefers this key over direct provider keys and lists the full Gateway model catalog.
Quick Connect from the Composer
If the agent composer has no models yet, it shows Connect a model provider to chat with shortcuts for Anthropic and OpenAI. Those use the same save-and-verify path. For Google or Vercel AI Gateway, open Bring Your Own Key from Settings.
After Verification
- The agent composer is ready and the model picker lists entitled models.
- A Gateway key lists the full catalog. Direct keys list only that provider.
- 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 | |
|---|---|---|
| Agent chat | Requires a verified BYOK key | Can use Trickest platform models without BYOK |
| Model catalog | Only models from your verified keys (or full catalog with Gateway) | Platform catalog, plus optional BYOK |
| Mid-turn fallback | None. Turns stay on your keys | Optional Platform fallback on the BYOK page |
On Community, without a verified key the model picker stays empty and the composer asks you to connect a provider.
Platform fallback (enterprise)
On enterprise plans, Platform fallback appears on the BYOK page. Turn it on if you want a mid-turn retry on Trickest platform billing when your key fails. It stays off by default. Community plans cannot enable it.
Rotate or Delete a Key
- Open Bring Your Own Key.
- 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.
- 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. |
| Empty model picker on Community | Verify at least one key. Add a Gateway key for the full catalog, or pick models from Anthropic, OpenAI, or Google after those keys verify. |
| Composer still blocked | Confirm the key shows Verified, then reload the agent view. |
| Unexpected provider invoice | Check AI Usage for BYOK turns and the matching provider dashboard. |