OpenCode

Use uncensored models in OpenCode

Add Silk Compute as a provider in OpenCode's config file. Every model we serve then shows up in /models.

1. Install OpenCode

curl -fsSL https://opencode.ai/install | bash

2. Set your API key

Create a key on the API keys page, then export it. Add the line to ~/.zshrc or ~/.bashrc so new terminals have it too.

Shell
export SILK_API_KEY="sk-..."

3. Add Silk Compute

Save this as ~/.config/opencode/opencode.json for every project, or as opencode.json in one project. If the file exists, add the silkcompute provider to it.

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "model": "silkcompute/deepseek-v4.1-flash-1017-uncensored",
  "provider": {
    "silkcompute": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Silk Compute",
      "options": {
        "baseURL": "https://api.silkcompute.com",
        "apiKey": "{env:SILK_API_KEY}"
      },
      "models": {
        "kimi-k3.1-pro-uncensored": {
          "name": "Kimi K3.1 Pro",
          "tool_call": true,
          "interleaved": { "field": "reasoning_content" },
          "modalities": { "input": ["text", "image", "video"], "output": ["text"] },
          "limit": { "context": 1048576, "output": 131072 },
          "cost": { "input": 5, "output": 25, "cache_read": 0.4 },
          "variants": {
            "none": { "reasoningEffort": "none" },
            "low": { "reasoningEffort": "low" },
            "high": { "reasoningEffort": "high" },
            "max": { "reasoningEffort": "max" }
          }
        },
        "deepseek-v4.1-flash-1017-uncensored": {
          "name": "DeepSeek V4.1 Flash 1017",
          "tool_call": true,
          "interleaved": { "field": "reasoning_content" },
          "modalities": { "input": ["text", "image"], "output": ["text"] },
          "limit": { "context": 1048576, "output": 131072 },
          "cost": { "input": 0.28, "output": 1, "cache_read": 0.07 },
          "variants": {
            "none": { "reasoningEffort": "none" },
            "low": { "reasoningEffort": "low" },
            "high": { "reasoningEffort": "high" },
            "max": { "reasoningEffort": "max" }
          }
        },
        "deepseek-v4.1-flash-1017-fast-uncensored": {
          "name": "DeepSeek V4.1 Flash 1017 Fast",
          "tool_call": true,
          "interleaved": { "field": "reasoning_content" },
          "modalities": { "input": ["text", "image"], "output": ["text"] },
          "limit": { "context": 1048576, "output": 131072 },
          "cost": { "input": 0.24, "output": 0.9, "cache_read": 0.05 },
          "variants": {
            "none": { "reasoningEffort": "none" },
            "low": { "reasoningEffort": "low" },
            "high": { "reasoningEffort": "high" },
            "max": { "reasoningEffort": "max" }
          }
        },
        "glm-5.3-uncensored": {
          "name": "GLM-5.3",
          "tool_call": true,
          "interleaved": { "field": "reasoning_content" },
          "modalities": { "input": ["text"], "output": ["text"] },
          "limit": { "context": 1048576, "output": 131072 },
          "cost": { "input": 2, "output": 4, "cache_read": 0.3 },
          "variants": {
            "none": { "reasoningEffort": "none" },
            "low": { "reasoningEffort": "low" },
            "high": { "reasoningEffort": "high" },
            "max": { "reasoningEffort": "max" }
          }
        },
        "glm-5.3-flash-uncensored": {
          "name": "GLM-5.3 Flash",
          "tool_call": true,
          "interleaved": { "field": "reasoning_content" },
          "modalities": { "input": ["text", "image"], "output": ["text"] },
          "limit": { "context": 1048576, "output": 131072 },
          "cost": { "input": 0.24, "output": 1, "cache_read": 0.08 },
          "variants": {
            "none": { "reasoningEffort": "none" },
            "low": { "reasoningEffort": "low" },
            "high": { "reasoningEffort": "high" },
            "max": { "reasoningEffort": "max" }
          }
        },
        "hy4-uncensored": {
          "name": "Hy4",
          "tool_call": true,
          "interleaved": { "field": "reasoning_content" },
          "modalities": { "input": ["text", "image"], "output": ["text"] },
          "limit": { "context": 1048576, "output": 65536 },
          "cost": { "input": 1.6, "output": 3.2, "cache_read": 0.3 },
          "variants": {
            "none": { "reasoningEffort": "none" },
            "low": { "reasoningEffort": "low" },
            "high": { "reasoningEffort": "high" },
            "max": { "reasoningEffort": "max" }
          }
        }
      }
    }
  }
}

4. Run it

Shell
opencode

Switch the model with /models and the effort with ctrl+t.

Troubleshooting

Run this in the same terminal. A list of models means the key works. A 401 means SILK_API_KEY is empty or wrong there.

Shell
curl -s https://api.silkcompute.com/models -H "Authorization: Bearer $SILK_API_KEY"