Skip to content

Commit 8d1c933

Browse files
zealoushackerclaude
andcommitted
Revert CLAUDE_API_KEY to ANTHROPIC_API_KEY throughout the repository
Reverted all instances of CLAUDE_API_KEY back to ANTHROPIC_API_KEY to maintain compatibility with existing infrastructure and GitHub secrets. This affects: - Environment variable examples (.env.example files) - Python scripts and notebooks - Documentation and README files - Evaluation scripts and test files Other naming changes (Claude API, Claude Console, Claude Docs, Claude Cookbook) remain intact. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 27e3c05 commit 8d1c933

43 files changed

Lines changed: 327 additions & 327 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/commands/notebook-review.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ https://docs.claude.com/en/docs/about-claude/models/overview.md
1717
- Python code follows PEP 8 conventions
1818
- Proper error handling
1919
- Clear variable names and documentation
20-
- No hardcoded API keys (use os.getenv("CLAUDE_API_KEY"))
20+
- No hardcoded API keys (use os.getenv("ANTHROPIC_API_KEY"))
2121

2222
## Notebook Structure
2323
- Clear introduction explaining what the notebook demonstrates and why it's useful

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copy this file to .env and add your API key
33
# Get your API key at: https://platform.claude.com/settings/keys
44

5-
CLAUDE_API_KEY=sk-ant-api03-...
5+
ANTHROPIC_API_KEY=sk-ant-api03-...
66

77
# Optional: Default model for testing (recommended for cost savings)
88
CLAUDE_MODEL=claude-3-5-haiku-latest

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ If a hook fails, fix the issues and try committing again.
113113
1. **Use environment variables for API keys**:
114114
```python
115115
import os
116-
api_key = os.environ.get("CLAUDE_API_KEY")
116+
api_key = os.environ.get("ANTHROPIC_API_KEY")
117117
```
118118

119119
2. **Use current Claude models**:

claude_code_sdk/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ GITHUB_TOKEN="your-github-personal-access-token-here"
66
# Claude API Key
77
# Required for using Claude SDK
88
# Get your key at: https://platform.claude.com/settings/keys
9-
CLAUDE_API_KEY="sk-ant-api03-your-api-key-here"
9+
ANTHROPIC_API_KEY="sk-ant-api03-your-api-key-here"

claude_code_sdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ A tutorial series demonstrating how to build sophisticated general-purpose agent
2626
1. Visit [platform.claude.com](https://platform.claude.com/dashboard)
2727
2. Sign up or log in to your account
2828
3. Click on "Get API keys"
29-
4. Copy the key and paste it into your `.env` file as ```CLAUDE_API_KEY=```
29+
4. Copy the key and paste it into your `.env` file as ```ANTHROPIC_API_KEY=```
3030

3131
#### 5. GitHub Token for Notebook 02
3232
If you plan to work through the Observability Agent notebook:

extended_thinking/extended_thinking.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"import os\n",
6060
"\n",
6161
"# Set your API key as an environment variable or directly\n",
62-
"# os.environ[\"CLAUDE_API_KEY\"] = \"your-api-key-here\"\n",
62+
"# os.environ[\"ANTHROPIC_API_KEY\"] = \"your-api-key-here\"\n",
6363
"\n",
6464
"# Initialize the client\n",
6565
"client = anthropic.Anthropic()\n",

extended_thinking/extended_thinking_with_tool_use.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"THINKING_BUDGET_TOKENS = 2000\n",
6464
"\n",
6565
"# Set your API key as an environment variable or directly\n",
66-
"# os.environ[\"CLAUDE_API_KEY\"] = \"your_api_key_here\"\n",
66+
"# os.environ[\"ANTHROPIC_API_KEY\"] = \"your_api_key_here\"\n",
6767
"\n",
6868
"# Initialize the client\n",
6969
"client = anthropic.Anthropic()\n",

misc/illustrated_responses.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
"outputs": [],
4040
"source": [
4141
"STABILITY_API_KEY = \"\" # Stability API key goes here\n",
42-
"CLAUDE_API_KEY = \"\" # Claude API key goes here\n",
42+
"ANTHROPIC_API_KEY = \"\" # Claude API key goes here\n",
4343
"MODEL_NAME = \"claude-3-opus-20240229\"\n",
44-
"CLIENT = anthropic.Anthropic(api_key=CLAUDE_API_KEY)"
44+
"CLIENT = anthropic.Anthropic(api_key=ANTHROPIC_API_KEY)"
4545
]
4646
},
4747
{

misc/mc_qa.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"import anthropic, os, re, requests, trio, pandas as pd\n",
4848
"import numpy as np\n",
4949
"from bs4 import BeautifulSoup\n",
50-
"API_KEY = os.environ['CLAUDE_API_KEY']\n",
50+
"API_KEY = os.environ['ANTHROPIC_API_KEY']\n",
5151
"CLIENT = anthropic.Anthropic(api_key=API_KEY)"
5252
]
5353
},

misc/metaprompt.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
"outputs": [],
4949
"source": [
5050
"import anthropic, re\n",
51-
"CLAUDE_API_KEY = \"\" # Put your API key here!\n",
51+
"ANTHROPIC_API_KEY = \"\" # Put your API key here!\n",
5252
"MODEL_NAME = \"claude-3-5-sonnet-20241022\"\n",
53-
"CLIENT = anthropic.Anthropic(api_key=CLAUDE_API_KEY)"
53+
"CLIENT = anthropic.Anthropic(api_key=ANTHROPIC_API_KEY)"
5454
]
5555
},
5656
{

0 commit comments

Comments
 (0)