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

# Bring Your Own AI API Key (BYOK)

> Connect your Anthropic API key to bypass Hiveku's credit system

Bring Your Own Key (BYOK) lets you use your own Anthropic API key for every AI request in Hiveku. You stop drawing from Hiveku credits and start drawing from your Anthropic account directly.

## Why BYOK?

* **Never run out of credits** — your Anthropic quota is the only limit
* **Direct cost control** — see usage in the Anthropic console, pay Anthropic directly
* **Higher rate limits** — use your own tier on Anthropic instead of Hiveku's shared pool
* **Bonus: unlock Hiveku Max on the Hosting Only plan** — see below

<Info>
  BYOK must be enabled by an account Owner or Admin. If you don't see the option, ask your admin to turn it on in account settings.
</Info>

## Get an Anthropic API Key

<Steps>
  <Step title="Go to the Anthropic Console">
    Visit [console.anthropic.com](https://console.anthropic.com) and sign in (or sign up).
  </Step>

  <Step title="Create a key">
    Navigate to **API Keys > Create Key**. Give it a name like *Hiveku* so you can identify it later.

    Copy the key immediately — Anthropic only shows it once.
  </Step>

  <Step title="Make sure the key has credits">
    Check **Billing** in the Anthropic console. A new key has no credits by default — add a payment method and credits before continuing.
  </Step>
</Steps>

## Add Your Key to Hiveku

<Steps>
  <Step title="Open AI settings">
    Go to **Settings > AI Credits & Billing**.
  </Step>

  <Step title="Find the API Key (BYOK) section">
    Click **Add API Key**.
  </Step>

  <Step title="Paste and save">
    Paste your Anthropic key into the field and click **Save & Verify**.

    Hiveku sends a test request to Anthropic to confirm the key is valid. If verification succeeds, the key is stored and BYOK is active.

    <Warning>
      Your key is encrypted at rest with AES-256-GCM and never shown in plaintext again. You'll only see a masked preview (e.g., `sk-ant-...abc123`) going forward. Keep your original copy somewhere safe.
    </Warning>
  </Step>
</Steps>

Once active, every AI request in Hiveku uses your key. No credits are deducted.

## Update or Remove Your Key

<Steps>
  <Step title="Update">
    In **Settings > AI Credits & Billing**, click **Update** next to your masked key. Paste the new key and save. The old key is overwritten.
  </Step>

  <Step title="Remove">
    Click the trash icon next to your key. BYOK is turned off and AI requests revert to the credit system.
  </Step>
</Steps>

## Bonus: Unlock Hiveku Max on Hosting Only

If you're on the **Hosting Only** plan, you only have access to Hiveku Mini (the budget AI tier) by default. Adding a BYOK key unlocks **Hiveku Max** — full Claude Sonnet — because the cost is on your Anthropic account, not Hiveku's.

This is a great option if you want to keep your plan lean but occasionally need the stronger model.

## Verifying It Works

Open any project, ask the AI a quick question, and then:

1. Check **Settings > AI Credits & Billing** — the credit balance should be unchanged
2. Check your Anthropic console — you should see a request logged in the usage dashboard (Anthropic usage can lag by a minute or two)

## Troubleshooting

<AccordionGroup>
  <Accordion title="Key invalid on save">
    * Confirm the key is still active in the Anthropic console (not revoked)
    * Confirm the Anthropic account has credits — a zero-credit key fails verification
    * Check for whitespace or accidental line breaks when you pasted
  </Accordion>

  <Accordion title="Rate limited during AI requests">
    Anthropic applies per-minute and per-day limits based on your tier. If you hit them, wait for the window to reset or request a higher tier in the Anthropic console. Hiveku surfaces the Anthropic error message directly so you know which limit tripped.
  </Accordion>

  <Accordion title="BYOK option is hidden">
    Your account admin hasn't enabled BYOK. Ask them to toggle it on in the account-level AI settings.
  </Accordion>

  <Accordion title="I pasted the wrong key by accident">
    Click **Update**, paste the correct key, and save. The incorrect key is overwritten immediately — Hiveku doesn't retain old keys.
  </Accordion>
</AccordionGroup>

## What's Next?

<CardGroup cols={2}>
  <Card title="AI Credits Reference" icon="book" href="/settings/ai-credits">
    Plan tiers, credit model, and BYOK deep dive
  </Card>

  <Card title="Team Roles" icon="users" href="/how-tos/team-roles">
    Manage who can enable BYOK and change AI settings
  </Card>
</CardGroup>
