Claude API key
Create a Claude API key in the Claude Console under API keys; it starts with sk-ant- and shows only once [1]. A Straitly key also works in Anthropic's SDK: set ANTHROPIC_BASE_URL to https://api.straitly.ai and ANTHROPIC_API_KEY to it [4][7]. Claude Fable 5.2 lists at $8.00 per 1M input tokens and $40.00 per 1M output tokens on Anthropic. [5]
Updated
export ANTHROPIC_BASE_URL="https://api.straitly.ai"
export ANTHROPIC_API_KEY="sk-YOUR_KEY"from anthropic import Anthropic
client = Anthropic() # reads both variables
reply = client.messages.create(
model="claude-fable-5.2",
max_tokens=16000, # thinking counts toward this
messages=[{"role": "user", "content": "Hello"}],
)
for block in reply.content:
if block.type == "text":
print(block.text)What is the difference between an Anthropic key and a Straitly key?
Both call Claude in Anthropic's Messages format, so your code stays the same. The Straitly key also calls other labs.
| Detail | Anthropic key | Straitly key |
|---|---|---|
| Where you create it | API keys page in the Claude Console [1] | API keys page after you sign up [6] |
| What it looks like | Starts with sk-ant-, shown once at creation [1] | Starts with sk- [6] |
| Base URL for Anthropic's SDK | https://api.anthropic.com, the default [2] | https://api.straitly.ai [7] |
| How it is sent | Authorization: Bearer plus anthropic-version; SDKs read ANTHROPIC_API_KEY [2][4] | Authorization: Bearer, or Anthropic's SDK with your Straitly key [6][7] |
| Models it calls | Claude models [5] | Claude and other labs, 117 models [11] |
| How you pay | Per token, on your Console organization [3][5] | Per token, from prepaid credits. No subscription, no minimum [10] |
| Limits to start | Set by usage tier; new organizations may start below the standard limits, and each tier has a monthly spend cap [3] | 300 / minute to start, 64 requests in flight, shared across keys [8] |
| One key per app | Personal or service account keys, optionally scoped to a workspace [1][2] | Child keys, each with its own budget and rate limit [9] |
Which Claude models does the key call, and what do they cost?
Every current Claude line, newest first, from the live catalog. Cache, batch and long-context rates are on Claude API pricing.
USD per 1M tokens, input / output
| Model | Released | Context | Model ID | Anthropic list price |
|---|---|---|---|---|
| Claude Fable 5.2Anthropic | 9 Nov 2026 | 1M | claude-fable-5.2 | $8.00 / $40.00 |
| Claude Haiku 5.5Anthropic | 7 Oct 2026 | 1M | claude-haiku-5-5 | $0.10 / $0.50 |
| Claude Sonnet 5.5Anthropic | 28 Sep 2026 | 1M | claude-sonnet-5-5 | $2.00 / $10.00 |
| Claude Opus 5.5Anthropic | 22 Sep 2026 | 1M | claude-opus-5-5 | $4.00 / $20.00 |
From the live catalog on 25 November 2026 [11]. Each model's rate is on its own page. List prices are Anthropic's own, matched on its pricing page on 24 November 2026 [5]. Where a maker sells a model at more than one rate, the list price shown is the lowest one it sells for live calls outside mainland China, and the model's page says which.
What else do people ask about Claude API keys?
Ask a question- With an Anthropic key, set ANTHROPIC_API_KEY and approve the key once when Claude Code asks. To run it on Straitly, set ANTHROPIC_BASE_URL to https://api.straitly.ai and ANTHROPIC_AUTH_TOKEN to your Straitly key [14]. The Claude Code API page has the details and what changes [13], and the setup guide has a one-paste setup.
- No. Zero data retention is on by default for every account and key: prompts and completions are never written to disk or logs and never used for training. Only billing metadata is kept: timestamp, model, key, token counts, latency, status and the amount charged [12].
- You pay per token at each model's rate, from prepaid credits, with no subscription and no minimum. A failed request costs nothing. Each model's current rate is on its own page at straitly.ai/models. Claude Fable 5.2 lists at $8.00 per 1M input tokens and $40.00 per 1M output tokens on Anthropic. That is Anthropic's list price, matched on 24 November 2026. [5][10][11]
Sources
Last updated 23 November 2026. Anthropic's Console and docs change often. If something here is out of date, tell us at straitly.ai/contact.
- [1]Anthropic docs: get your Claude API key
- [2]Anthropic docs: API overview
- [3]Anthropic docs: rate limits
- [4]Anthropic docs: Python SDK
- [5]Anthropic pricing
- [6]Straitly quickstart
- [7]Straitly endpoints
- [8]Straitly errors and limits
- [9]Straitly child keys
- [10]Straitly pricing
- [11]Straitly models
- [12]Straitly data retention
- [13]Claude Code API
- [14]Claude Code docs: connect to an LLM gateway
What each source says
- Anthropic docs: get your Claude API key
- Keys live on the API keys page of the Claude Console. Create key, name it, pick an expiration and linked account. The full key starts with sk-ant- and is shown only once, at creation; a lost key cannot be viewed again, so create a new one.
- Anthropic docs: API overview
- The Claude API is at https://api.anthropic.com. Requests need a Console account and an API key, sent as Authorization: Bearer (x-api-key is a legacy fallback, still supported), plus anthropic-version. Workspaces separate environments; a key not scoped to a workspace also sends anthropic-workspace-id.
- Anthropic docs: rate limits
- Limits are set per organization by usage tier and measured in requests, input tokens and output tokens per minute. New organizations may start in an Evaluation tier below the standard limits. The Start, Build and Scale tiers each carry a monthly spend cap.
- Anthropic docs: Python SDK
- The client reads ANTHROPIC_API_KEY, and the ANTHROPIC_BASE_URL environment variable sets the base URL.
- Anthropic pricing
- Anthropic's own per-token prices for every Claude model. The list prices on this page are the ones matched on it on 24 November 2026; it was opened again on 23 November 2026 and showed the same rates.
- Straitly quickstart
- Create a key on the API keys page and keep it in an environment variable. Auth is Authorization: Bearer sk-.... OpenAI /chat/completions and Anthropic /messages formats.
- Straitly endpoints
- Base URL https://api.straitly.ai/v1. The Anthropic SDK takes https://api.straitly.ai and adds /v1/messages itself; the OpenAI SDK takes the full base URL. Keep the key on your server, not in browser code or a public repository.
- Straitly errors and limits
- Default account limits, shared across keys; rate-limit answers carry Retry-After. Accounts can have custom limits.
- Straitly child keys
- Give each app or customer its own key with its own budget, rate limit and history, all billed to your prepaid balance.
- Straitly pricing
- Billed per token from prepaid credits. Nothing is added on top. A failed request costs nothing. No subscription and no minimum.
- Straitly models
- Every model on Straitly with its ID, context window and current rate, from the live catalog.
- Straitly data retention
- Zero data retention on by default for every account and key; prompts and completions never written to disk or logs and never used for training; only billing metadata is kept.
- Claude Code API
- How Claude Code runs on an API key or a gateway base URL instead of a subscription, from Anthropic's Claude Code docs.
- Claude Code docs: connect to an LLM gateway
- Point Claude Code at a gateway with ANTHROPIC_BASE_URL. ANTHROPIC_AUTH_TOKEN is sent as Authorization: Bearer; ANTHROPIC_API_KEY is sent as X-Api-Key and asks you to approve it once. If you were not told which kind, use ANTHROPIC_AUTH_TOKEN.
Get a key and send one request.
Prepaid, per token, no subscription and no minimum.