Stop Paying: Get $4,000 in AI Credits for VS Code (Kimi 128k, DeepSeek R1 & Claude 3.5)

Hcnsec AI Assistant in VS Code

Paying for Copilot or Cursor? There’s a relay gateway handing new accounts promotional API credits — one sk- key, OpenAI-compatible, drops straight into VS Code. Kimi K2, DeepSeek R1, Qwen3 Max, Claude Sonnet, all from one endpoint.

Register → make a token → paste it in your editor. Three steps, no card.

:information_source: Full disclosure: I built the VS Code extension in this guide (source on GitHub, MIT). No referral links anywhere — and everything below works with any OpenAI-compatible client, not just mine.

━━━━━━━━━━━━━━━━━━━━━━

📋 Every model on the gateway — Kimi, Claude, DeepSeek, Qwen, GPT

One key, all of these:

├─ Kimi K2 Thinking
├─ Moonshot 128K
├─ Claude 3.7 Sonnet Thinking
├─ Claude 3.5 Sonnet
├─ DeepSeek R1
├─ DeepSeek Coder
├─ Qwen3 Max
├─ Qwen2.5 Coder
└─ GPT models (availability varies)

:light_bulb: That’s the real pull of an OpenAI-compatible gateway: swap between any of them without changing your editor, compare answers from several models side by side, and use whichever one suits the task — all on a single API key.

⚙️ Step 1–4 — Register, generate the sk- key, install, configure

1. Create the account
api.hcnsec.cn/sign-up

2. Generate your key
├─ Open Tokens / API Keys
├─ Click Add Token
├─ Set quota to Unlimited (this means “no separate cap on this key” — it does NOT mean unlimited credits; the account balance is still what you spend)
└─ Copy the key starting with sk-

3. Install the extension
├─ Open VS Code → Extensions view (Ctrl + Shift + X)
├─ Search Hcnsec AI Assistant
├─ Click Install
└─ Reload VS Code if prompted

:link: Marketplace listing · GitHub source

4. Configure
Base URL https://api.hcnsec.cn/v1 · paste your sk- key · pick a model.

🔍 Check what you're actually getting — one curl before you build on it

Relay gateways route your request to whichever upstream is cheapest for them. That’s how the pricing works, and it’s fine — but you should know what answers you, not assume.

Run this first. It takes five seconds:

curl https://api.hcnsec.cn/v1/models -H "Authorization: Bearer sk-YOUR-KEY"

:white_check_mark: You get the exact model IDs the gateway serves. Use those strings, not the marketing names — a wrong model ID is the #1 cause of “it connects but nothing happens.”

Check your real balance the same way:

curl https://api.hcnsec.cn/api/usage/token -H "Authorization: Bearer sk-YOUR-KEY"

↳ Returns total_granted / total_available / unlimited_quota. That’s your actual credit, straight from the source.

:light_bulb: Sanity check on any relay: look at the model field echoed back in the response and confirm it matches what you asked for.

🧠 Which model for which job — and the planner/executor split that actually works
Task Model Why
Fast code completion, boilerplate, unit tests, helper functions Qwen2.5 Coder / Qwen3 Max Cheap, fast, trained on code — the everyday workhorse
Long files, whole-repo refactors Moonshot 128K / Kimi K2 Thinking 128k context holds an entire codebase at once
Hard debugging, architecture decisions DeepSeek R1 Reasoning model — thinks before answering
Code-specific generation DeepSeek Coder Tuned purely for code output
Production-ready code Claude 3.7 Sonnet Thinking / 3.5 Sonnet Strongest at clean, working output

:high_voltage: Agent Mode — two models, one job:

If the extension supports Agent Mode, this is the setup that works:

DeepSeek R1          ->  planner   (designs the implementation strategy)
Claude 3.7 Sonnet    ->  executor  (generates the production-ready code)

↳ Not a random pairing — Aider benchmarked R1-as-architect + Sonnet-as-editor and it topped their polyglot leaderboard at a fraction of the cost: the benchmark writeup.

Reasoning model = one that works through the problem step by step before replying — slower, better at hard logic.

🔧 Same key, other editors — Cline, Roo Code, Continue, Kilo Code, Aider

The key is OpenAI-compatible, so any of these take it. Set Base URL https://api.hcnsec.cn/v1, paste the sk-, pick a model ID from the /v1/models list.

├─ :electric_plug: ClineOpenAI-compatible setup · has Plan/Act modes for the planner+executor split
├─ :electric_plug: Roo Codesetup · Architect vs Code modes · per-mode model profiles
├─ :electric_plug: ContinueapiBase config
├─ :electric_plug: Kilo Codesetup
└─ :laptop: Aider (terminal) — OPENAI_API_BASE + --model openai/<name> · architect mode · keep keys out of shell history

:warning: Roo Code uses native tool calling — if agent actions misfire on any relay, that’s the first thing to test.

🛟 When the promo credits run dry — official free tiers for these same models

Promotional credits are promotional. When they’re gone, these give you the same models direct from the source, free:

├─ :free_button: Google AI Studio — generous free Gemini tier, OpenAI-compatible endpoint available
├─ :free_button: OpenRouter free models — a rotating set of :free models, one key, OpenAI-compatible
├─ :free_button: ModelScope — daily free Qwen inference quota
├─ :free_button: DeepSeek Platform — R1 and Coder direct, cheapest official rates
└─ :desktop_computer: Ollama or LM Studio — run Qwen Coder / DeepSeek on your own machine. Serves an OpenAI-compatible /v1 on localhost, so every editor above connects with zero changes and nothing to revoke

:light_bulb: The pattern worth stealing: the editor doesn’t care where the endpoint lives. Gateway today, official API tomorrow, your own laptop after that — same config box.

🏗️ Run the gateway layer yourself — New API and LiteLLM, self-hosted

This site runs New API (open source). You can run the identical stack and point it at your own upstream accounts:

├─ :package: Install guide — Docker, Compose, 1Panel, or binary
├─ :package: Ready docker-compose.yml
└─ :package: First-run walkthrough — add channel → make token → point client at https://your-host/v1

Or LiteLLM — a proxy that fronts many providers at once:

├─ :gear: Docker quickstart — your own /v1 and your own sk-
├─ :key: Virtual keys with real budgets — per-tool keys, spend caps, model allowlists
├─ :repeat_button: Fallbacks and retries — one dead upstream doesn’t stop your IDE
└─ :link: Add any OpenAI-compatible upstream — including this gateway, as one channel among several

:white_check_mark: End state: your editor points at your endpoint forever. Providers become swappable parts instead of single points of failure.

━━━━━━━━━━━━━━━━━━━━━━

The short version: register, generate the key, curl /v1/models to see what you really have, then paste it into whichever editor you already use. Credits are promotional and provider terms change — build the setup so swapping the endpoint is a one-line edit.

A key you can point anywhere is worth more than credits you can only spend in one place.

1 Like