DeepFellow DOCS

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.

The Anonymize and Abuse Detection plugins apply to /v1/messages in streaming and non-streaming requests. thinking blocks keep the anonymization tokens, because Anthropic rejects a changed thinking block when the client sends it back.

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-6",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Explain how AI works."
    }
  ]
}'

Error Format

On /v1/messages, DeepFellow Server returns errors in the Anthropic error format instead of the OpenAI-style error format of the OpenAI-compatible endpoints:

{
    "type": "error",
    "error": {
        "type": "invalid_request_error",
        "message": "messages: Field required"
    }
}

When DeepFellow Infra is unreachable or rejects the API key of DeepFellow Server, or when DeepFellow Server fails with an internal error, the error keeps the OpenAI-style error format. An error that DeepFellow Infra returns passes through unchanged.

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-6",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {
            "role": "user",
            "content": "Explain how AI works."
        }
    ]
)

print(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.

On this page