How-toUpdated November 18, 2026
Switch from the OpenAI API to a private AI API
To switch from the OpenAI API to a private AI API, change the base URL, API key and model name, since most accept the OpenAI format.
Silk Compute does not store your prompts or model outputs.
Python, with the OpenAI SDK
from openai import OpenAI
client = OpenAI(
base_url="https://api.silkcompute.com",
api_key="YOUR_SILK_COMPUTE_KEY",
)
reply = client.chat.completions.create(
model="deepseek-v4.1-flash-1017-uncensored",
messages=[{"role": "user", "content": "Summarize this contract."}],
)
print(reply.choices[0].message.content)The same two lines work for any OpenAI-compatible API.
Node, with the OpenAI SDK
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.silkcompute.com",
apiKey: process.env.SILK_COMPUTE_KEY,
});
const reply = await client.chat.completions.create({
model: "glm-5.3-uncensored",
messages: [{ role: "user", content: "Review this diff." }],
});
curl
curl https://api.silkcompute.com/chat/completions \
-H "Authorization: Bearer $SILK_COMPUTE_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "kimi-k3.1-pro-uncensored", "messages": [{"role": "user", "content": "Hello"}]}'
Anthropic SDK and Claude Code
Silk Compute also takes the Anthropic Messages format, so Claude Code works with three environment variables.
export ANTHROPIC_BASE_URL=https://api.silkcompute.com
export ANTHROPIC_AUTH_TOKEN=YOUR_SILK_COMPUTE_KEY
export ANTHROPIC_MODEL=kimi-k3.1-pro-uncensored
claudeSilk Compute has guides for Claude Code, Codex, OpenCode and Cursor.
Pick a model
| Model | Model id | Context | Price per 1M (in / out) |
|---|---|---|---|
| Kimi K3.1 Pro | kimi-k3.1-pro-uncensored | 1,048,576 | $3.00 / $8.00 |
| DeepSeek V4.1 Flash 1017 | deepseek-v4.1-flash-1017-uncensored | 1,048,576 | $0.24 / $0.90 |
| DeepSeek V4.1 Flash 1017 Fast | deepseek-v4.1-flash-1017-fast-uncensored | 1,048,576 | $0.24 / $0.90 |
| GLM-5.3 | glm-5.3-uncensored | 1,048,576 | $2.00 / $4.00 |
| GLM-5.3 Flash | glm-5.3-flash-uncensored | 1,048,576 | $0.24 / $1.00 |
| Hy4 | hy4-uncensored | 1,048,576 | $1.60 / $3.20 |
Kimi K3.1 Pro is the strongest for security research and agentic coding, and DeepSeek V4.1 Flash 1017 has the lowest blended price. Prices read November 18, 2026.
What to change in your app
- Assistants, threads and vector stores have no stateless equivalent, so send the full conversation each time.
- Silk Compute's
/responsesendpoint is stateless, so pass the full input instead of a previous response id. - Swap GPT model ids for the ids above, and raise
max_tokensfor Hy4, which thinks for thousands of tokens first. - Your proxy, tracing tool and error reporter still record prompts. See the checklist.
Sign up at platform.silkcompute.com, and the quickstart has the rest.