Quick answer
Claude Code can authenticate in more than one way. Individual users often sign in with a Claude.ai account. API users or teams may use Claude Console, cloud providers, or a supported third-party provider path. A Claude.ai account and an API Key are not the same thing. Claude.ai login is for the official product experience. An API Key is used for model API requests and is usually paired with a Base URL and provider configuration. If you use a third-party API gateway, the important fields are API Key and Base URL. You must also confirm whether the tool expects an Anthropic-compatible or OpenAI-compatible protocol.When this matters
- You see a login prompt during Claude Code setup
- You are unsure whether Claude Pro or Max gives you an API Key
- You want to route Claude Code through a custom API gateway
- You need to choose between official login and a third-party provider
- A team needs one consistent authentication pattern
Key concepts
| Concept | Meaning |
|---|---|
| Claude.ai account | Official product login for Claude experiences |
| Claude Console API | Developer-side API access and usage management |
| API Key | Credential used for model API requests |
| Base URL | The endpoint where requests are sent |
| Provider | The authentication and model-request source Claude Code uses |
| Third-party API gateway | A compatibility, routing, billing, or observability layer between the tool and model providers |
Recommended decision flow
- If you only want the official Claude Code experience and use a Claude.ai plan, start with official login.
- If you need API billing or team-managed API access, review Claude Console or your team provider.
- If you need a custom API gateway, confirm that Claude Code supports the provider path, then configure API Key and Base URL.
- If you need official app features plus a third-party inference provider, decide whether you must preserve the official login state.
https://www.llmeasy.ru.
Common mistakes
- Treating a Claude.ai subscription as an API Key.
- Pasting a ChatGPT Plus or other subscription credential into Claude Code.
- Copying only the API Key and forgetting to change the Base URL.
- Putting an OpenAI-compatible Base URL into Claude Code’s Anthropic-compatible configuration.
- Sharing
auth.json, refresh tokens, or session credentials as if they were API Keys.
About LLMEasy
If you choose the API Key + Base URL path, LLMEasy can provide the compatible endpoint and a dashboard for API Keys, balance, and usage history. LLMEasy does not replace Claude.ai login or turn a Claude.ai subscription into an API Key. It only handles the model API layer.Related docs
- Claude Code setup guide
- How to configure API Key and Base URL in Claude Code
- How do I keep the Codex login state while using a third-party API?
- OpenAI-compatible API vs Anthropic-compatible API

