Documentation

Wire your editor to the gateway.

Quickstart

DarkCoder.ai runs where your code lives. Three commands and you have a gateway with a full admin cockpit.

npm install
npm run dev
# open http://localhost:3000/login

The demo build seeds a local account: admin@darkcoder.ai / darkcoder.

The endpoint

Every request goes to one OpenAI-compatible surface: https://darkcoder.ai/v1. The model field accepts auto (the default combo), a combo slug like never-stop-coding, or a direct provider/model id like gh/gpt-5.5.

Cursor

Cursor talks to DarkCoder through its OpenAI-compatible override — no plugins, no login links.

Cursor → Settings → Models

1. Enable "OpenAI API Key" and paste:
   dc_live_demo_cursor_home_0000000000003f9a
2. Set "Override OpenAI Base URL" to:
   https://darkcoder.ai/v1
3. Add a custom model named:
   auto

VS Code · Continue

# ~/.continue/config.yaml
models:
  - name: DarkCoder auto
    provider: openai
    model: auto
    apiBase: https://darkcoder.ai/v1
    apiKey: dc_live_demo_cursor_home_0000000000003f9a
    roles: [chat, edit, autocomplete]

Cline

Cline → Settings → API Provider

Provider:        OpenAI Compatible
Base URL:        https://darkcoder.ai/v1
API Key:         dc_live_demo_cursor_home_0000000000003f9a
Model ID:        auto

curl

curl -N https://darkcoder.ai/v1/chat/completions \
  -H "Authorization: Bearer dc_live_demo_cursor_home_0000000000003f9a" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "stream": true,
    "messages": [{ "role": "user", "content": "Explain this diff." }]
  }'

SDKs

Node

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://darkcoder.ai/v1",
  apiKey: "dc_live_demo_cursor_home_0000000000003f9a",
});

const res = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "Hello" }],
});

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://darkcoder.ai/v1",
    api_key="dc_live_demo_cursor_home_0000000000003f9a",
)

res = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Hello"}],
)

Gateway keys

Sharing done right: invite a teammate with the base URL plus a dc_live_… gateway key you can revoke or rotate any time — never a Copilot login link. Raw provider tokens never leave this box; logs redact secrets automatically.

Combos

A combo is an ordered fallback chain with a strategy. The seeded never-stop-coding walks gh/gpt-5.5 → claude/claude-sonnet-4.5 → deepseek/deepseek-v3.2 → groq/llama-3.3-70b. Build your own in the cockpit under /app/combos.

Account vs API key

Every provider declares which connect modes it supports. account mode signs in with the vendor's official flow — OAuth PKCE or device code, the same flows the vendor CLIs use — so your subscription (Copilot Pro, Claude Max, ChatGPT Plus/Pro, Google AI Pro) serves the gateway. apikey mode takes a pay-per-token key. Both can exist for one provider; you pick in the connect drawer.

Where the vendor supports it, account mode offers a Temporary chat switch — gateway conversations are ephemeral and never land in your account's chat history. DarkCoder.ai never reads browser cookies, never asks for the vendor password, and never replays web-chat sessions.

GitHub Copilot, Claude, OpenAI·ChatGPT, Cursor, Antigravity, Gemini support account sign-in; Claude, ChatGPT and Gemini also take API keys. DeepSeek, Kimi, GLM are key-only; Groq is free-tier or key; Ollama is local.

Mock vs real

Today the provider adapters are mocks — the demo runs fully offline. The seam for real adapters (Copilot device flow, Anthropic, Gemini, OpenAI-compatible, Ollama) is src/server/adapters/: implement ProviderAdapter — listModels, chat, checkQuota — and register it in registry.ts. Nothing else changes.