Updated
Abliterated API in Python
To call an abliterated model from Python, install the openai package and set base_url to the provider. The same client then streams, calls tools and sets reasoning effort.
- 1
Install the SDK
Python 3.9 or later. For the Anthropic SDK, follow the Anthropic quickstart.
pippip install openaiuvuv add openai - 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
Run chat.py
Save the program below as chat.py and run it.
Runpython chat.py
chat.py
chat.pyimport os
from openai import OpenAI
client = OpenAI(
base_url="https://api.silkcompute.com",
api_key=os.environ["SILK_API_KEY"],
)
reply = client.chat.completions.create(
model="deepseek-v4.1-flash-1017-uncensored",
messages=[{"role": "user", "content": "What is a mutex?"}],
)
print(reply.choices[0].message.content)Example output
A lock only one thread can hold at a time.