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

# Bring Your Own Claude

> Connect your Anthropic account for unlimited AI usage

## What is Bring Your Own Claude?

Bring Your Own Claude (BYOC) lets you connect your personal Anthropic account to OptiDev. Instead of using workspace credits, you'll be billed directly by Anthropic based on your existing subscription or API usage.

**Benefits:**

* **Unlimited usage** - No credit limits within OptiDev
* **Use existing subscription** - Claude Pro, Max, Team, or Enterprise subscribers can use their existing plan
* **Direct billing** - All AI costs go to your Anthropic account

## Who Can Use BYOC?

| Plan     | Access           |
| -------- | ---------------- |
| Free     | Upgrade required |
| Standard | Full access      |
| Pro      | Full access      |

<Note>
  BYOC is optional. If you don't connect your own account, OptiDev Agent uses your workspace credits automatically.
</Note>

***

## Connecting Your Account

Go to **Settings** → **Workspace** tab. Scroll down to find the **Bring Your Own Claude** card.

<img src="https://mintcdn.com/aericastinc/lJjtmOibl5UCF3bF/images/features/byoc/byoc-card-disconnected.png?fit=max&auto=format&n=lJjtmOibl5UCF3bF&q=85&s=443b944659ba603a8c50b107f7aa53bb" alt="BYOC card in Workspace Settings showing Connect button" style={{maxWidth: "700px"}} width="3112" height="1210" data-path="images/features/byoc/byoc-card-disconnected.png" />

Click **Connect** to open the connection modal. You'll see two options:

<img src="https://mintcdn.com/aericastinc/lJjtmOibl5UCF3bF/images/features/byoc/byoc-method-select.png?fit=max&auto=format&n=lJjtmOibl5UCF3bF&q=85&s=8e9464c65999834d352aa5f5c11fff21" alt="Choose connection method - Claude subscription or API key" style={{maxWidth: "420px"}} width="846" height="586" data-path="images/features/byoc/byoc-method-select.png" />

### Option 1: Claude Subscription (Recommended)

Best for users with an active Claude Pro, Max, Team, or Enterprise subscription.

1. Click **Claude account with subscription**
2. Click **Open authorization page** to go to claude.ai

<img src="https://mintcdn.com/aericastinc/lJjtmOibl5UCF3bF/images/features/byoc/byoc-oauth-flow.png?fit=max&auto=format&n=lJjtmOibl5UCF3bF&q=85&s=02758bc8dd1e45902f0925616f582a00" alt="OAuth flow with authorization link and code input" style={{maxWidth: "400px"}} width="842" height="568" data-path="images/features/byoc/byoc-oauth-flow.png" />

3. Sign in to your Claude account if prompted
4. Authorize OptiDev to access your account
5. Copy the authentication code shown on screen

<img src="https://mintcdn.com/aericastinc/lJjtmOibl5UCF3bF/images/features/byoc/anthropic-auth-code.png?fit=max&auto=format&n=lJjtmOibl5UCF3bF&q=85&s=2b993d4ca42196b3f28cb1059d1beda8" alt="Anthropic authentication code page" style={{maxWidth: "550px"}} width="2380" height="1022" data-path="images/features/byoc/anthropic-auth-code.png" />

6. Paste the code back in OptiDev and click **Connect**

<img src="https://mintcdn.com/aericastinc/lJjtmOibl5UCF3bF/images/features/byoc/byoc-success.png?fit=max&auto=format&n=lJjtmOibl5UCF3bF&q=85&s=892d5a0cdfdc1392cf6cd1c7d3eb4f63" alt="Connection successful confirmation" style={{maxWidth: "380px"}} width="930" height="576" data-path="images/features/byoc/byoc-success.png" />

### Option 2: API Key

Best for developers with an Anthropic API account.

1. Click **Enter API Key**
2. Go to [console.anthropic.com/settings/keys](https://console.anthropic.com/settings/keys) to create or copy a key

<img src="https://mintcdn.com/aericastinc/lJjtmOibl5UCF3bF/images/features/byoc/byoc-api-key-entry.png?fit=max&auto=format&n=lJjtmOibl5UCF3bF&q=85&s=6c2f77b65ba0f40a560c2f89c5d6fb77" alt="API key entry form" style={{maxWidth: "400px"}} width="842" height="480" data-path="images/features/byoc/byoc-api-key-entry.png" />

3. Paste your API key (starts with `sk-ant-api03-...`)
4. Click **Connect**

<Tip>
  Create a dedicated API key for OptiDev so you can revoke it without affecting other integrations.
</Tip>

***

## Viewing Connection Status

Once connected, the BYOC card shows your connection status:

<img src="https://mintcdn.com/aericastinc/lJjtmOibl5UCF3bF/images/features/byoc/byoc-card-connected.png?fit=max&auto=format&n=lJjtmOibl5UCF3bF&q=85&s=d099362669ac44497eed73807d33fc4e" alt="BYOC card showing connected status" style={{maxWidth: "600px"}} width="1982" height="276" data-path="images/features/byoc/byoc-card-connected.png" />

You'll also see this status in the workspace selector dropdown:

<img src="https://mintcdn.com/aericastinc/lJjtmOibl5UCF3bF/images/features/byoc/workspace-selector-byoc.png?fit=max&auto=format&n=lJjtmOibl5UCF3bF&q=85&s=818279767840b9c187f076f69d057bd6" alt="Workspace selector showing Using your Claude subscription" style={{maxWidth: "320px"}} width="600" height="708" data-path="images/features/byoc/workspace-selector-byoc.png" />

***

## Disconnecting

To stop using your personal account and return to workspace credits:

1. Go to **Settings** → **Workspace**
2. Find the **Bring Your Own Claude** card
3. Click **Disconnect**

Your connection is removed immediately. OptiDev Agent will use workspace credits for future requests.

***

## If Your Session Expires

OAuth tokens refresh automatically in the background. However, if your session becomes invalid (e.g., you revoke access from Anthropic or the refresh token expires), you'll see a notification:

<img src="https://mintcdn.com/aericastinc/lJjtmOibl5UCF3bF/images/features/byoc/byoc-expired-modal.png?fit=max&auto=format&n=lJjtmOibl5UCF3bF&q=85&s=578a2895fce0673b937d8cf623c3bd70" alt="Claude Session Expired notification modal" style={{maxWidth: "380px"}} width="736" height="478" data-path="images/features/byoc/byoc-expired-modal.png" />

When this happens:

* OptiDev automatically switches to using workspace credits
* Your work is not interrupted
* Click **Reconnect** to go to Settings and reconnect your account

***

## FAQ

### Will I be charged twice?

No. When BYOC is connected, all Claude AI usage is billed to your Anthropic account. Workspace credits are not used.

### What happens if I run out of API credits?

If your Anthropic API account has insufficient credits, requests will fail. You can either:

* Add credits to your Anthropic account
* Disconnect BYOC to use workspace credits instead

### Can I switch between API key and subscription?

Yes. Disconnect your current connection first, then reconnect using the other method.

### Is my API key secure?

Yes. Your credentials are encrypted using AES-256-GCM and stored securely. API keys are never logged or displayed in full.
