Updated
Abliterated model with the Anthropic SDK
The Anthropic SDKs reach an abliterated model through POST /v1/messages once you pass the provider's base URL. The SDK adds /v1/messages itself, so pass the bare base URL.
- 1
Install the SDK
Both SDKs read the base URL from the client options.
Pythonpip install anthropicTypeScriptnpm install @anthropic-ai/sdk - 2
Set your key
Create a key on Silk Compute's API keys page and add credits from $5. Keep it in an environment variable.
Shellexport SILK_API_KEY="sk-..." - 3
Send a message
Without
thinkingthe model thinks as little as it can. A budget under 8,192 runs as low effort, and 32,768 or more as max.
https://api.silkcompute.com
import os
from anthropic import Anthropic
client = Anthropic(
base_url="https://api.silkcompute.com",
api_key=os.environ["SILK_API_KEY"],
)
message = client.messages.create(
model="deepseek-v4.1-flash-1017-uncensored",
max_tokens=2048,
messages=[{"role": "user", "content": "What is a mutex?"}],
)
print(message.content[0].text)Example output
A lock only one thread can hold at a time.import Anthropic from '@anthropic-ai/sdk'
const client = new Anthropic({
baseURL: 'https://api.silkcompute.com',
apiKey: process.env.SILK_API_KEY,
})
const message = await client.messages.create({
model: 'deepseek-v4.1-flash-1017-uncensored',
max_tokens: 2048,
messages: [{ role: 'user', content: 'What is a mutex?' }],
})
console.log(message.content)Example output
[ { type: 'text', text: 'A lock only one thread can hold at a time.' } ]message = client.messages.create(
model="deepseek-v4.1-flash-1017-uncensored",
max_tokens=16000,
thinking={"type": "enabled", "budget_tokens": 8192},
messages=[{"role": "user", "content": "Find the race condition in this function."}],
)
for block in message.content:
if block.type == "thinking":
print("thinking:", block.thinking)
elif block.type == "text":
print(block.text)const message = await client.messages.create({
model: 'deepseek-v4.1-flash-1017-uncensored',
max_tokens: 16000,
thinking: { type: 'enabled', budget_tokens: 8192 },
messages: [{ role: 'user', content: 'Find the race condition in this function.' }],
})
for (const block of message.content) {
if (block.type === 'thinking') console.log('thinking:', block.thinking)
if (block.type === 'text') console.log(block.text)
}What differs from Anthropic's API
The full parameter list is in the Messages reference.
| Feature | On /v1/messages |
|---|---|
| Video input | Returns 400 |
| PDFs and token counting | Not supported |
| Server tools such as web search | Not available |
| cache_control markers | Not needed, caching is automatic |
| Error shape | {"type": "error", "error": {...}} |