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

# Bring Your Own Keys

> Use your own API keys for full control over costs and model access

Use your own API keys for full control over costs and model access.

## Supported Key Types

| Key Type                  | Format             | Provider                 |
| ------------------------- | ------------------ | ------------------------ |
| **Anthropic API Key**     | `sk-ant-api...`    | Anthropic Console        |
| **Anthropic OAuth Token** | `sk-ant-oat01-...` | `claude setup-token` CLI |
| **OpenAI API Key**        | `sk-...`           | OpenAI Dashboard         |

## Adding a Key

1. Go to **Settings → API Keys** on the OpenClaws dashboard
2. Paste your key in the input field
3. Click **Save**

The key type is auto-detected from the prefix. Your gateway will use the new key on the next request.

## Security

<Info>
  All keys are **encrypted at rest** using AES-256 via Supabase pgcrypto. Keys are only decrypted server-side when pushed to your isolated gateway environment variables.
</Info>

Keys are never:

* Stored in plaintext
* Logged or displayed after saving
* Shared between users
* Accessible via the API after creation

## Priority Order

When multiple keys are configured, the gateway uses this priority:

1. **User's own key** (BYO API key or OAuth token)
2. **Platform managed key** (included with subscription)

If you remove your BYO key, the gateway falls back to the platform managed key automatically.

## BYO Key Chat (Free)

With a saved Anthropic or OpenAI key, you can **chat immediately from the Dashboard** — no subscription required. Your key is decrypted server-side and used to call the AI provider directly.

<Info>
  BYO Key Chat gives you instant value with zero infrastructure cost. For browser automation, messaging channels, 51+ skills, and persistent memory, upgrade to OpenClaws Pro.
</Info>

## When Can You Add Keys?

You can save and validate BYO API keys **at any time** — even before subscribing. Your keys are stored encrypted and ready to go.

| Action                               | Requires Subscription? |
| ------------------------------------ | ---------------------- |
| Save / validate API keys             | No (free)              |
| Select preferred model               | No (free)              |
| Connect Composio toolkits            | No (free)              |
| **Chat with BYO key**                | **No (free)**          |
| **Deploy gateway** (full experience) | **Yes (\$29/mo)**      |
