Free AI models from OpenCode exposed as standard OpenAI and Anthropic APIs.
One server — works with any tool that speaks OpenAI or Anthropic format: Cursor, Continue, Cline, Claude Code, aider, opencode CLI, raw curl, whatever.
git clone https://github.com/bigdata2211it-web/opencode-free-proxy.git
cd opencode-free-proxy
npm install
node server.mjsDone. Server is at http://localhost:6446. API keys are in api-keys.json (auto-generated on first run).
| Model | What it is | Reliability |
|---|---|---|
deepseek-v4-flash-free |
DeepSeek V4 Flash | Solid |
big-pickle |
DeepSeek V4 Flash (alias) | Solid |
minimax-m2.5-free |
MiniMax M2.5 | Solid |
nemotron-3-super-free |
NVIDIA Nemotron 3 Super | Hit or miss |
qwen3.6-plus-free |
Qwen 3.6 Plus | Intermittent |
All models support streaming, tool calls, and system messages.
curl http://localhost:6446/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash-free",
"messages": [{"role": "user", "content": "Hello"}],
"stream": true
}'curl http://localhost:6446/v1/messages \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash-free",
"system": "You are helpful.",
"messages": [{"role": "user", "content": "Hello"}],
"max_tokens": 1024,
"stream": true
}'| Method | Path | What |
|---|---|---|
GET |
/v1/models |
List models |
GET |
/health |
Health + version |
Both Authorization: Bearer KEY and x-api-key: KEY work on all endpoints.
Add to ~/.config/opencode/opencode.json:
{
"provider": {
"free": {
"name": "free",
"type": "openai",
"apiKey": "YOUR_KEY",
"baseURL": "http://localhost:6446/v1",
"models": {
"free/deepseek-v4-flash-free": {
"id": "deepseek-v4-flash-free",
"name": "free/deepseek-v4-flash-free",
"attachment": true,
"reasoning": true
}
}
}
}
}- Base URL:
http://YOUR_HOST:6446/v1 - API Key: your key from
api-keys.json - Model:
deepseek-v4-flash-free
- Base URL:
http://YOUR_HOST:6446 - API Key: your key from
api-keys.json - Works with
/v1/messagesendpoint
# On your VPS
git clone https://github.com/bigdata2211it-web/opencode-free-proxy.git
cd opencode-free-proxy
npm install
node server.mjs # foreground
# or
nohup node server.mjs > proxy.log 2>&1 & # backgroundIf your VPS doesn't expose port 6446, use an SSH tunnel:
ssh -L 6446:127.0.0.1:6446 user@your-vps
# Now http://localhost:6446 works locally# /etc/systemd/system/opencode-proxy.service
[Unit]
Description=OpenCode Free Proxy
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/opencode-proxy
ExecStart=/usr/bin/node server.mjs
Restart=always
RestartSec=5
Environment=PROXY_PORT=6446
[Install]
WantedBy=multi-user.targetsudo systemctl enable --now opencode-proxy| Variable | Default | What |
|---|---|---|
PROXY_PORT |
6446 |
Server port |
KEYS_FILE |
./api-keys.json |
API keys file path |
Your tool (Cursor, CLI, curl, etc.)
│
▼
opencode-free-proxy ← this server, translates formats
│
▼ HTTPS
opencode.ai/zen/v1/ ← free tier API
The proxy adds x-opencode-* authentication headers that the Zen API requires. These were discovered by reverse engineering the opencode binary — without them, even Authorization: Bearer public gets rejected with AuthError.
Authorization: Bearer public
User-Agent: opencode/1.15.0 ai-sdk/provider-utils/4.0.23 runtime/bun/1.3.13
x-opencode-client: cli
x-opencode-project: global
x-opencode-request: msg_<unique_id>
x-opencode-session: ses_<unique_id>
MIT