Secure Anthropic Inference with DeepFellow
Use Claude models through DeepFellow's anonymization layer via the native Anthropic SDK or the OpenAI-compatible API.
Using Anthropic Claude models through DeepFellow is safer than using them directly thanks to our anonymization layer.
You need to have an Anthropic API Key and the "claude" service installed — read how to install services in the Infra Web Panel guide.
Native Anthropic SDK
DeepFellow exposes a native Anthropic-compatible endpoint at /v1/messages. Point the Anthropic SDK at your DeepFellow server, and all other Anthropic SDK features work without any code changes.
curl -X 'POST' \
'https://deepfellow-server-host/v1/messages' \
-H 'Authorization: Bearer DEEPFELLOW-PROJECT-API-KEY' \
-H 'anthropic-version: 2023-06-01' \
-H 'Content-Type: application/json' \
-d '{
"model": "claude-opus-4-7",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Explain how AI works."
}
]
}'from anthropic import Anthropic
client = Anthropic(
auth_token="DEEPFELLOW-PROJECT-API-KEY",
base_url="https://deepfellow-server-host",
)
response = client.messages.create(
model="claude-opus-4-7",
max_tokens=1024,
messages=[
{"role": "user", "content": "Explain how AI works."}
],
)
print(response.content[0].text)import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
authToken: 'DEEPFELLOW-PROJECT-API-KEY',
baseURL: 'https://deepfellow-server-host'
});
const response = await client.messages.create({
model: 'claude-opus-4-7',
maxTokens: 1024,
messages: [{ role: 'user', content: 'Explain how AI works.' }]
});
console.log(response.content[0].text);OpenAI SDK
DeepFellow also provides an OpenAI-compatible API, so you can use the OpenAI SDK with Claude models by pointing it at your DeepFellow server.
from openai import OpenAI
client = OpenAI(
api_key="DEEPFELLOW-PROJECT-API-KEY",
base_url="https://deepfellow-server-host/v1",
)
response = client.chat.completions.create(
model="claude-opus-4-7",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{
"role": "user",
"content": "Explain how AI works."
}
]
)
print(response.choices[0].message.content)import OpenAI from 'openai';
const openai = new OpenAI({
apiKey: 'DEEPFELLOW-PROJECT-API-KEY',
baseURL: 'https://deepfellow-server-host/v1'
});
const response = await openai.chat.completions.create({
model: 'claude-opus-4-7',
messages: [
{ role: 'system', content: 'You are a helpful assistant.' },
{
role: 'user',
content: 'Explain how AI works.'
}
]
});
console.log(response.choices[0].message.content);We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.