@@ -12,14 +12,31 @@ Claude Code supports custom API endpoints through its settings. You can configur
1212
1313### Option 1: Environment Variables
1414
15+ The configuration differs depending on whether you're using Claude Pro/Max or API billing:
16+
17+ #### For Claude Pro/Max Users
18+
19+ Set the following environment variables in your shell configuration (` ~/.bashrc ` , ` ~/.zshrc ` , etc.):
20+
21+ ``` bash
22+ export ANTHROPIC_BASE_URL=" https://api.edgee.ai"
23+ export ANTHROPIC_CUSTOM_HEADERS=" x-edgee-api-key:sk-edgee-..."
24+ ```
25+
26+ #### For API Billing Users
27+
1528Set the following environment variables in your shell configuration (` ~/.bashrc ` , ` ~/.zshrc ` , etc.):
1629
1730``` bash
1831export ANTHROPIC_BASE_URL=" https://api.edgee.ai"
1932export ANTHROPIC_AUTH_TOKEN=" sk-edgee-..."
20- export ANTHROPIC_API_KEY=
33+ export ANTHROPIC_API_KEY=" "
2134```
2235
36+ <Note >
37+ Replace ` sk-edgee-... ` with your actual Edgee API key from the [ Edgee Console] ( https://www.edgee.ai ) .
38+ </Note >
39+
2340Then restart your terminal or run:
2441
2542``` bash
@@ -74,9 +91,19 @@ claude --model gpt-4o "Refactor this function"
7491
7592Control token compression and add tags using HTTP headers:
7693
77- ** Using Environment Variables :**
94+ ** For Claude Pro/Max Users (using ANTHROPIC_CUSTOM_HEADERS) :**
7895
7996``` bash
97+ export ANTHROPIC_BASE_URL=" https://api.edgee.ai"
98+ export ANTHROPIC_CUSTOM_HEADERS=" x-edgee-api-key:sk-edgee-...,x-edgee-enable-compression:true,x-edgee-compression-rate:0.8,x-edgee-tags:development,claude-code,team-backend"
99+ ```
100+
101+ ** For API Billing Users (using ANTHROPIC_HEADERS):**
102+
103+ ``` bash
104+ export ANTHROPIC_BASE_URL=" https://api.edgee.ai"
105+ export ANTHROPIC_AUTH_TOKEN=" sk-edgee-..."
106+ export ANTHROPIC_API_KEY=" "
80107export ANTHROPIC_HEADERS=' {
81108 "x-edgee-enable-compression": "true",
82109 "x-edgee-compression-rate": "0.8",
@@ -188,10 +215,30 @@ If this fails, your API key may be invalid or expired. Generate a new one from t
188215
189216Here's a complete workflow for setting up Claude Code with Edgee:
190217
218+ ** For Claude Pro/Max Users:**
219+
220+ ``` bash
221+ # 1. Set environment variables
222+ export ANTHROPIC_BASE_URL=" https://api.edgee.ai"
223+ export ANTHROPIC_CUSTOM_HEADERS=" x-edgee-api-key:sk-edgee-..."
224+
225+ # 2. Test the connection
226+ claude " Hello, Edgee!"
227+
228+ # 3. Start coding with full observability
229+ claude --file src/app.py " Add comprehensive error handling"
230+
231+ # 4. Check usage in Edgee Console
232+ # Visit https://www.edgee.ai to see real-time metrics
233+ ```
234+
235+ ** For API Billing Users:**
236+
191237``` bash
192238# 1. Set environment variables
193239export ANTHROPIC_BASE_URL=" https://api.edgee.ai"
194- export ANTHROPIC_API_KEY=" sk-edgee-..."
240+ export ANTHROPIC_AUTH_TOKEN=" sk-edgee-..."
241+ export ANTHROPIC_API_KEY=" "
195242
196243# 2. Test the connection
197244claude " Hello, Edgee!"
0 commit comments