Ключи 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.

Sign inCreate keyStore & rotate

Console API keys vs Claude Pro

NeedConsole API keyClaude Pro (claude.ai)
Primary useMessages API, SDKs, automationChat in browser / official apps
Where to enableplatform.claude.com + Billingclaude.ai account & subscription
Credentialsk-ant-… key or federation tokenSigned-in claude.ai session
Next step hereCreate & rotate Console keysClaude Pro guide

Pick a key type

01

Personal key

Acts as you—good for local dev. Stops working if you leave the org.

02

Service account key

Tied to a service account—preferred for CI, production, and long-running agents.

03

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. 1

    Sign in

    Open platform.claude.com and sign in (or register per Anthropic’s flow). Confirm your region is supported per Anthropic’s Supported regions doc.

  2. 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. 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. 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. 1

    Environment variable

    Official pattern: export ANTHROPIC_API_KEY="sk-ant-api03-…". Client SDKs read ANTHROPIC_API_KEY automatically.

  2. 2

    HTTP headers

    For REST calls, send the key via x-api-key or Authorization: Bearer plus required headers such as anthropic-version (see Authentication docs).

  3. 3

    Multi-workspace keys

    If one key works across workspaces, include anthropic-workspace-id on 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. 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. 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. 3

    Workspaces

    Split dev/staging/prod at platform.claude.com/settings/workspaces and bind keys when you create them.

Rotate and revoke

  1. 1

    Issue replacement

    Create a new key with a clear name (date/environment).

  2. 2

    Update secrets

    Swap CI secrets, K8s secrets, or local .env files; send a smoke request.

  3. 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.

Начать бесплатную встречу