# Subscriptions vs API Keys vs QCode Keys

The short version: **a subscription is membership in the official client apps, an official API key is the pay-as-you-go credential of the developer platforms, and a QCode key (`cr_` prefix) is one gateway key that speaks four protocols.** All three are independent: none of them consumes another, and they can coexist on the same machine.

## What each of the three actually is

| | What it is | How it is billed | Where it works |
|---|---|---|---|
| **Subscription** (Claude Pro / Claude Max, ChatGPT Plus, etc.) | Membership in the official chat apps and official coding products | Flat monthly fee (see [claude.com/pricing](https://claude.com/pricing) / [chatgpt.com/pricing](https://chatgpt.com/pricing)) | Claude / ChatGPT apps; Claude Code sign-in with a Pro / Max plan |
| **Official API key** | Developer key from Anthropic Console / OpenAI Platform | Per token, topped up on the official platform | Programs calling the official APIs directly |
| **QCode key** (`cr_` prefix) | This site's gateway key — one key, four protocols (Anthropic / OpenAI Chat / Responses / Gemini) | Per token ([qcode.cc/models](https://qcode.cc/models) for rates); plans have a daily cap | Claude Code, Codex, IDE plugins, chat clients |

Both vendors state explicitly that **the subscription does not include API access**:

> "A paid Claude subscription enhances your chat experience but doesn't include access to the Claude API or Console."
> —— [Claude Help Center](https://support.claude.com/en/articles/9876003) (checked 2026-09-18)

> "Not included: API usage is separate and billed independently."
> —— [OpenAI Help Center, "What is ChatGPT Plus?"](https://help.openai.com/en/articles/6950777-what-is-chatgpt-plus) (checked 2026-09-18)

So your Anthropic / OpenAI subscription **cannot** be used through QCode and is never consumed by it; equally, QCode usage does not touch your subscription quota. Two parallel systems.

## The usual combinations

### I have Claude Pro / ChatGPT Plus — can I use it with QCode or third-party tools?

**No.** The subscription covers the official apps and the official direct channel only (e.g. Claude Code signed in with Pro / Max). It grants no API quota that anything else could use. Running Claude / GPT models on QCode goes through our own per-token plans, independent of your subscription.

The two **can coexist**: the same Claude Code installation can either sign in with your subscription or point `ANTHROPIC_BASE_URL` at QCode with a `cr_` key — whichever credential is active at the moment decides. [CC Switch](/docs/ide/cc-switch) is the recommended way to flip between them.

### Can Claude Desktop use my GPT subscription?

**No.** Claude Desktop's third-party inference accepts only gateways that **implement the Anthropic Messages API** — official wording: *"The gateway must implement the Anthropic Messages API: POST /v1/messages with streaming and tool use is required."* ([official docs](https://claude.com/docs/third-party/claude-desktop/gateway)). The OpenAI protocol is out of scope for it, and a GPT subscription certainly does not fit. For GPT / Chinese models on the desktop, pick a client that speaks the OpenAI protocol (see [Tool Compatibility Overview](/docs/ide/tool-compatibility)).

### What happens if I set the `ANTHROPIC_API_KEY` environment variable while logged into Claude Code with a subscription?

**It overrides the subscription sign-in and bills you per API token.** From the Anthropic Help Center:

> "Important: If you have an ANTHROPIC_API_KEY environment variable set on your system, Claude Code will use this API key for authentication instead of your Claude subscription (Pro, Max, Team, or Enterprise plans), resulting in API usage charges rather than using your subscription's included usage."
> —— [Use Claude Code with your Pro or Max plan](https://support.claude.com/en/articles/11145838) (checked 2026-09-18)

This is the most common cause of "it worked yesterday, today it wants money" or "I am signed in but get 401": a stale key in your shell config hijacks the auth path. Step 2 of the [troubleshooting guide](/docs/reference/troubleshooting) checks exactly this.

## Which one do I need?

- Just chatting / writing in the official apps: the **subscription** is enough, no QCode involved.
- Calling models from your own scripts: an official API key or a QCode key — QCode covers four protocols and Chinese models with a single key.
- Claude, GPT, GLM, Kimi side by side in Claude Code / Codex / IDE plugins: **QCode key**; the protocol and Base URL matrix is in [Endpoints and API paths](/docs/getting-started/endpoints-and-api-paths).
- Flipping between subscription sign-in and the gateway: [CC Switch](/docs/ide/cc-switch).

## Related docs

- [FAQ](/docs/reference/faq)
- [Endpoints and API paths](/docs/getting-started/endpoints-and-api-paths)
- [Billing](/docs/reference/billing)
- [CC Switch Setup](/docs/ide/cc-switch)
- [Tool Compatibility Overview](/docs/ide/tool-compatibility)