Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions integrations/anthropic-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The Anthropic SDK provides official Python and TypeScript clients for interactin

# Initialize client with Edgee endpoint
client = Anthropic(
base_url="https://api.edgee.ai/v1",
base_url="https://api.edgee.ai",
api_key=os.environ.get("EDGEE_API_KEY"),
)

Expand All @@ -55,7 +55,7 @@ The Anthropic SDK provides official Python and TypeScript clients for interactin

// Initialize client with Edgee endpoint
const client = new Anthropic({
baseURL: 'https://api.edgee.ai/v1',
baseURL: 'https://api.edgee.ai',
apiKey: process.env.EDGEE_API_KEY,
});

Expand Down Expand Up @@ -84,7 +84,7 @@ Stream responses for real-time token delivery:
from anthropic import Anthropic

client = Anthropic(
base_url="https://api.edgee.ai/v1",
base_url="https://api.edgee.ai",
api_key=os.environ.get("EDGEE_API_KEY"),
)

Expand All @@ -106,7 +106,7 @@ Stream responses for real-time token delivery:
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
baseURL: 'https://api.edgee.ai/v1',
baseURL: 'https://api.edgee.ai',
apiKey: process.env.EDGEE_API_KEY,
});

Expand Down Expand Up @@ -140,7 +140,7 @@ With Edgee, you can access models from multiple providers using the same Anthrop
from anthropic import Anthropic

client = Anthropic(
base_url="https://api.edgee.ai/v1",
base_url="https://api.edgee.ai",
api_key=os.environ.get("EDGEE_API_KEY"),
)

Expand Down Expand Up @@ -172,7 +172,7 @@ With Edgee, you can access models from multiple providers using the same Anthrop
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
baseURL: 'https://api.edgee.ai/v1',
baseURL: 'https://api.edgee.ai/',
apiKey: process.env.EDGEE_API_KEY,
});

Expand Down Expand Up @@ -210,7 +210,7 @@ Use Claude's tool calling with Edgee:
from anthropic import Anthropic

client = Anthropic(
base_url="https://api.edgee.ai/v1",
base_url="https://api.edgee.ai",
api_key=os.environ.get("EDGEE_API_KEY"),
)

Expand Down Expand Up @@ -251,7 +251,7 @@ Use Claude's tool calling with Edgee:
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
baseURL: 'https://api.edgee.ai/v1',
baseURL: 'https://api.edgee.ai',
apiKey: process.env.EDGEE_API_KEY,
});

Expand Down Expand Up @@ -298,7 +298,7 @@ Add custom tags to track and filter requests in Edgee's dashboard:
from anthropic import Anthropic

client = Anthropic(
base_url="https://api.edgee.ai/v1",
base_url="https://api.edgee.ai",
api_key=os.environ.get("EDGEE_API_KEY"),
default_headers={
"x-edgee-tags": "production,anthropic-sdk,user-123"
Expand All @@ -319,7 +319,7 @@ Add custom tags to track and filter requests in Edgee's dashboard:
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
baseURL: 'https://api.edgee.ai/v1',
baseURL: 'https://api.edgee.ai',
apiKey: process.env.EDGEE_API_KEY,
defaultHeaders: {
'x-edgee-tags': 'production,anthropic-sdk,user-123'
Expand Down Expand Up @@ -350,7 +350,7 @@ The Anthropic SDK includes built-in retry logic, which works seamlessly with Edg
from anthropic import Anthropic, APIError

client = Anthropic(
base_url="https://api.edgee.ai/v1",
base_url="https://api.edgee.ai",
api_key=os.environ.get("EDGEE_API_KEY"),
max_retries=3, # SDK will retry up to 3 times
)
Expand All @@ -372,7 +372,7 @@ The Anthropic SDK includes built-in retry logic, which works seamlessly with Edg
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
baseURL: 'https://api.edgee.ai/v1',
baseURL: 'https://api.edgee.ai',
apiKey: process.env.EDGEE_API_KEY,
maxRetries: 3, // SDK will retry up to 3 times
});
Expand Down Expand Up @@ -444,7 +444,7 @@ Here's a complete application example:
def main():
# Initialize client
client = Anthropic(
base_url="https://api.edgee.ai/v1",
base_url="https://api.edgee.ai",
api_key=os.environ.get("EDGEE_API_KEY"),
default_headers={
"x-edgee-tags": "production,chat-app"
Expand Down Expand Up @@ -495,7 +495,7 @@ Here's a complete application example:
async function main() {
// Initialize client
const client = new Anthropic({
baseURL: 'https://api.edgee.ai/v1',
baseURL: 'https://api.edgee.ai',
apiKey: process.env.EDGEE_API_KEY,
defaultHeaders: {
'x-edgee-tags': 'production,chat-app'
Expand Down
12 changes: 6 additions & 6 deletions integrations/claude-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Claude Code supports custom API endpoints through its settings. You can configur
Set the following environment variables in your shell configuration (`~/.bashrc`, `~/.zshrc`, etc.):

```bash
export ANTHROPIC_BASE_URL="https://api.edgee.ai/v1"
export ANTHROPIC_BASE_URL="https://api.edgee.ai"
export ANTHROPIC_API_KEY="sk-edgee-..."
```

Expand All @@ -31,7 +31,7 @@ You can also configure Claude Code through its settings file. Create or edit `~/

```json
{
"apiEndpoint": "https://api.edgee.ai/v1",
"apiEndpoint": "https://api.edgee.ai",
"apiKey": "sk-edgee-..."
}
```
Expand Down Expand Up @@ -83,7 +83,7 @@ Tags help you categorize and filter requests in Edgee's analytics dashboard:

```json
{
"apiEndpoint": "https://api.edgee.ai/v1",
"apiEndpoint": "https://api.edgee.ai",
"apiKey": "sk-edgee-...",
"customHeaders": {
"x-edgee-tags": "production,claude-code,user-123"
Expand Down Expand Up @@ -144,7 +144,7 @@ To get your API key:
If Claude Code cannot connect to Edgee:

1. Verify your API key is correct
2. Check that the base URL is set to `https://api.edgee.ai/v1`
2. Check that the base URL is set to `https://api.edgee.ai`
3. Ensure you have internet connectivity
4. Check [Edgee's status page](https://status.edgee.cloud)

Expand All @@ -154,7 +154,7 @@ If you receive authentication errors:

```bash
# Test your API key with curl
curl https://api.edgee.ai/v1/chat/completions \
curl https://api.edgee.ai/chat/completions \
-H "Authorization: Bearer $ANTHROPIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
Expand All @@ -171,7 +171,7 @@ Here's a complete workflow for setting up Claude Code with Edgee:

```bash
# 1. Set environment variables
export ANTHROPIC_BASE_URL="https://api.edgee.ai/v1"
export ANTHROPIC_BASE_URL="https://api.edgee.ai"
export ANTHROPIC_API_KEY="sk-edgee-..."

# 2. Test the connection
Expand Down
Loading