A portable, ultra-fast OpenAI-compatible API Gateway designed to run fully on your local machine. It automatically manages your local OpenCode daemon background process, translates standard chat completion prompts, and exposes a premium glassmorphic playground dashboard.
With this setup, your local PC acts as a secure, high-speed AI inference instanceโallowing you to call OpenCode's free model catalog dynamically locally, or share them securely across the internet.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Client App (Cursor / Continue IDE) โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโ
โ (1) POST /v1/chat/completions (Port 4000)
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Aetherix Local Gateway Proxy (:4000) โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโ
โ (2) Auto-spawns & communicates
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Local OpenCode Serve CLI (:3333) โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโ
โ (3) Executes on free models
โผ
๐ค [Dynamic Active Models]
- ๐ Frictionless OpenAI Compatibility: Drop-in replacement for standard OpenAI client libraries. Just point your
baseURLtohttp://localhost:4000/v1. - ๐ง Zero-Config Daemon Management: The gateway automatically starts and monitors the local
opencode serveprocess on boot. It gracefully shuts down the background daemon when terminated. - ๐ Secure Sharing (Tunneling): Want to expose your local models to another computer or mobile device? Expose it securely to the world with a single command.
- โก Intuitively Bypassed Local Auth: Localhost requests bypass API-key checks automatically to save developer configuration steps.
- ๐ 100% Dynamic Model Detection: Models list is never hardcoded! The server queries
opencode modelsin real-time and serves available models dynamically. When OpenCode adds or removes a model, it automatically updates without code edits. - ๐๏ธ Generation Parameter Control: Adjust model Creativity (Temperature) and Max Token Limits directly from the local dashboard settings before prompting.
- ๐ฎ Premium Glassmorphism Dashboard: Exposes a gorgeous, dark-themed dashboard at root
http://localhost:4000with real-time status indicators and a built-in playground chat client.
Important
OpenCode Account and CLI Auth Required:
- Node.js (v18.0.0 or higher) must be installed.
- OpenCode CLI must be installed:
- macOS/Linux:
curl -sSf https://opencode.ai/install.sh | sh - Windows: Install the CLI executable from the official OpenCode site.
- macOS/Linux:
- Login session (Optional): If needed, authenticate your CLI locally before running:
opencode login
git clone https://github.com/yousufkidiya17/opencode-local-proxy.git
cd opencode-local-proxyRun the automated setups to install all dependencies and verify environment paths:
- Windows: Double-click or run
setup.batin CMD/PowerShell. - macOS/Linux: Run
bash setup.shin your terminal.
Start both the proxy gateway and background daemon with one command:
npm startOnce started:
- Local API endpoint is live at:
http://localhost:4000/v1 - Premium Dashboard UI is live at:
http://localhost:4000
To share your local models with another device (or a friend across the internet) run:
npm run shareThis spawns a secure public tunnel via Localtunnel. Simply copy the generated public URL (e.g. https://aetherix-ai-tunnel.loca.lt) and use it in your remote configs.
You can create a .env file in the root directory to customize parameters:
| Variable | Default Value | Description |
|---|---|---|
PORT |
4000 |
Port of the local gateway proxy server |
OPENCODE_PORT |
3333 |
Port of the local OpenCode daemon server |
API_KEY |
aetherix-sk-master-9f3a7b2e1d |
Token required for remote/non-localhost connections |
STRICT_AUTH |
false |
Set to true to require authentication headers even for localhost |
Add the following blocks to your ~/.continue/config.json configuration file:
{
"models": [
{
"title": "Local DeepSeek Free",
"provider": "openai",
"model": "opencode/deepseek-v4-flash-free",
"apiBase": "http://localhost:4000/v1",
"apiKey": "aetherix-sk-master-9f3a7b2e1d"
},
{
"title": "Local Big Pickle",
"provider": "openai",
"model": "opencode/big-pickle",
"apiBase": "http://localhost:4000/v1",
"apiKey": "aetherix-sk-master-9f3a7b2e1d"
}
]
}- Navigate to Cursor Settings > Models.
- Scroll to OpenAI API Key and click Override OpenAI Base URL.
- Set the override base URL to
http://localhost:4000/v1. - Enter the default key
aetherix-sk-master-9f3a7b2e1d. - Under model selectors, add your desired targets:
opencode/deepseek-v4-flash-free,opencode/big-pickle.
from openai import OpenAI
# Connect directly to your local instance
client = OpenAI(
base_url="http://localhost:4000/v1",
api_key="aetherix-sk-master-9f3a7b2e1d"
)
response = client.chat.completions.create(
model="opencode/big-pickle",
messages=[{"role": "user", "content": "Explain Quicksort algorithm in short."}],
temperature=0.5,
max_tokens=1024
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "http://localhost:4000/v1",
apiKey: "aetherix-sk-master-9f3a7b2e1d"
});
const chatCompletion = await client.chat.completions.create({
model: "opencode/deepseek-v4-flash-free",
messages: [{ role: "user", content: "Tell me a space joke." }],
temperature=0.8
});
console.log(chatCompletion.choices[0].message.content);Licensed under the MIT License. Created by Aetherix Core.