Skip to content

Use Your Own Anthropic API Key

Use BYO mode when your organization wants Pharaoh to use an Anthropic key that your organization owns. Pharaoh still charges the Production subscription and endpoint overage fees, but provider usage is paid through your Anthropic account instead of being billed by Pharaoh as managed provider usage.

Anthropic documents API access through the Anthropic Console, where you can generate API keys in account settings and use workspaces to segment keys by use case: Anthropic API overview.

In Anthropic:

  1. Sign in to the Anthropic Console with an account allowed to manage API keys.
  2. Open the API key or account settings area.
  3. Create a key for Pharaoh and give it a label that identifies the organization or workspace.
  4. Copy the key once, then store it according to your internal secret-handling policy.
  1. Open Billing.
  2. Choose BYO key as the usage mode.
  3. Paste the Anthropic API key into the provider credential field.
  4. Add a label that helps future billing admins identify the key.
  5. If your organization uses an Anthropic-compatible private or custom deployment, enter its HTTPS provider base URL in the advanced custom URL field.
  6. Save and validate the key.
  7. Confirm the billing page shows the provider credential as valid before starting provider-backed work.

Treat the key like a password:

  • Paste it only into the Pharaoh billing credential field.
  • Do not put the key in support tickets, chat, screenshots, traces, or markdown docs.
  • Do not send the key to endpoint agents or Android devices.
  • Rotate the key if it may have been exposed.

Pharaoh stores BYO credentials through billing-managed secret storage and returns only secret-free metadata such as provider, label, validation status, fingerprint or masked suffix, key version, and rotation timestamps. The full key should not be displayed back to the browser after save.

Custom provider URLs are optional. Leave the field empty to use Anthropic’s default endpoint.

When a custom URL is provided, Pharaoh normalizes it to the Anthropic messages endpoint and rejects unsafe targets. The URL must use HTTPS on the default 443 port, must not include userinfo, query strings, or fragments, and must not point at localhost, raw IP addresses, link-local metadata services, or private IP ranges.

Azure-style or other provider-specific deployment shapes are supported only when they expose an Anthropic-compatible HTTPS messages endpoint accepted by this validation policy.

BYO usage is not billed by Pharaoh as managed provider usage. Pharaoh may still show estimated provider usage analytics so you can understand model, endpoint, feature, session, prompt, token, and spend-limit impact.

If you switch from BYO to managed usage later, the switch affects future usage only. Historical rows keep the usage mode that was active when the request ran.