Ключи Anthropic Console API: создание, workspace и ротация (2026)
Выпустить ключ sk-ant- в Console и не смешивать с подпиской Claude Pro на claude.ai.
Чтобы вызывать Claude API, ключ создаётся в Claude Console (platform.claude.com/settings/keys) — это не то же самое, что подписка Claude Pro на claude.ai.
The query is как создать и управлять ключами Anthropic Console API. This page follows Anthropic’s platform.claude.com/docs/ru/get-api-key and API overview. For first signup and a first Messages call, see our API key getting-started note; for the browser plan, see Claude Pro & Projects. To sync integration plans, use wbstorm—create and join a room.
Console API keys vs Claude Pro
| Need | Console API key | Claude Pro (claude.ai) |
|---|---|---|
| Primary use | Messages API, SDKs, automation | Chat in browser / official apps |
| Where to enable | platform.claude.com + Billing | claude.ai account & subscription |
| Credential | sk-ant-… key or federation token | Signed-in claude.ai session |
| Next step here | Create & rotate Console keys | Claude Pro guide |
Pick a key type
Personal key
Acts as you—good for local dev. Stops working if you leave the org.
Service account key
Tied to a service account—preferred for CI, production, and long-running agents.
Workspace key (legacy)
Belongs to a workspace without an owner; Anthropic recommends personal or service account keys so access ends when accounts are removed.
Create a key in Console
- 1
Sign in
Open
platform.claude.comand sign in (or register per Anthropic’s flow). Confirm your region is supported per Anthropic’s Supported regions doc. - 2
Open API keys
Go to
platform.claude.com/settings/keys. If Create key is disabled, your role may lack permission—ask an org admin or have them create a service account key. - 3
Name, expiry, linkage
Click Create key, set a name, choose expiration, pick Linked account (you or a service account), and optionally scope to a workspace.
- 4
Copy once
The full
sk-ant-secret appears only at creation. Store it in a secrets manager immediately; you cannot view it again—create a new key if lost.
Use the key in code
- 1
Environment variable
Official pattern:
export ANTHROPIC_API_KEY="sk-ant-api03-…". Client SDKs readANTHROPIC_API_KEYautomatically. - 2
HTTP headers
For REST calls, send the key via
x-api-keyorAuthorization: Bearerplus required headers such asanthropic-version(see Authentication docs). - 3
Multi-workspace keys
If one key works across workspaces, include
anthropic-workspace-idon each request.
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"claude-sonnet-4-20250514","max_tokens":256,"messages":[{"role":"user","content":"Hello"}]}'Model IDs and fields change—follow the current Messages API reference on platform.claude.com/docs. The curl above illustrates headers only.
Billing, limits, workspaces
- 1
Billing
Add a legitimate payment method at
platform.claude.com/settings/billing. API usage bills through Console; see that page for current rates—no guessed prices here. - 2
Rate limits
Review RPM/TPM and spend tiers at
platform.claude.com/usage/limits. Use Request tier increase if you need higher caps. - 3
Workspaces
Split dev/staging/prod at
platform.claude.com/settings/workspacesand bind keys when you create them.
Rotate and revoke
- 1
Issue replacement
Create a new key with a clear name (date/environment).
- 2
Update secrets
Swap CI secrets, K8s secrets, or local
.envfiles; send a smoke request. - 3
Revoke old key
Delete the old key once nothing references it. If leaked, revoke immediately and review Billing for anomalies.
Does Claude Pro include API credits?
No—different products. Claude Pro is the consumer claude.ai plan; API usage bills through Console. See Anthropic’s official product boundaries.
What if a key leaks?
Revoke it in Console, mint a new key, rotate every deployment, and check usage logs. Contact Anthropic support with a request-id if needed.
Is this the same as Bedrock or Vertex?
No. This page covers direct Claude API access via Console keys. Cloud marketplaces use their own IAM and billing—see Anthropic’s platform-specific docs.