| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Terminal UI coding agent powered by DeepSeek Web API. A Claude Code alternative that works through a local proxy.
# Clone the repository
git clone https://github.com/ForgetMeAI/FreeDeepseekAPI.git
cd FreeDeepseekAPI
# Install dependencies
npm install
# Make nithcode globally available
npm linkOr manually copy nithcode.js and create a batch/shell script.
In one terminal:
cd FreeDeepseekAPI
node server.jsSelect option 3 (Start Server) in the menu.
If you haven't authenticated yet:
npm run deepseek:authThis will open Chrome and save cookies for API access.
In another terminal:
nithcodeOr with specific model:
nithcode --model deepseek-v4-pro| Command | Description |
|---|---|
| /model | Open model selection menu |
| /new | Clear conversation history |
| Ctrl+C | Exit |
| Ctrl+O | Toggle reasoning overlay (thinking models) |
| Ctrl+J | Toggle server logs |
| Ctrl+L | Clear screen |
Launch with bypass mode:
nithcode --permission-mode bypassPermissions| Variable | Default | Description |
|---|---|---|
| NITHCODE_MODEL | deepseek-chat | Default model |
| NITHCODE_BASE_URL | http://localhost:9655/v1 | API endpoint |
| NITHCODE_API_KEY | nithcode-local | API key |
| NITHCODE_PERMISSION_MODE | ask | Permission mode |
| NITHCODE_MAX_TOKENS | 8192 | Max tokens per request |
┌─────────────┐ HTTP ┌──────────────────┐ WebSocket ┌─────────────┐ │ nithcode │ ◄────────────► │ FreeDeepseekAPI │ ◄───────────────► │ DeepSeek │ │ (client) │ localhost │ (proxy) │ cookies/auth │ (web) │ └─────────────┘ :9655 └──────────────────┘ └─────────────┘
Make sure FreeDeepseekAPI server is started in another terminal:
node server.js
# Select 3 (Start Server)Port 9655 is occupied. Kill existing Node processes:
# Windows
taskkill /F /IM node.exe
# Linux/Mac
killall nodeMIT — see LICENSE
curl -X POST http://localhost:9655/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-chat-search",
"messages": [{"role": "user", "content": "Найди свежий факт про DeepSeek и ответь кратко."}],
"stream": false
}'curl -N -X POST http://localhost:9655/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-chat",
"messages": [{"role": "user", "content": "Напиши короткую шутку."}],
"stream": true
}'curl -X POST http://localhost:9655/v1/messages \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-chat",
"max_tokens": 512,
"messages": [{"role": "user", "content": "Ответь ровно OK"}],
"stream": false
}'Для Claude Code можно указывать backend напрямую:
export ANTHROPIC_BASE_URL="http://127.0.0.1:9655"
export ANTHROPIC_AUTH_TOKEN="dummy-key"
export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1
claude --model deepseek-chatcurl -X POST http://localhost:9655/v1/responses \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-chat",
"input": "Ответь ровно OK",
"stream": false
}'FreeDeepseekAPI принимает:
Прокси просит DeepSeek вернуть строгий JSON tool call, но также умеет парсить fallback-форматы:
GET /v1/models возвращает только aliases, которые сейчас проверены и работают через этот proxy.
| Alias | Web mode | Reasoning | Web search | Комментарий |
|---|---|---|---|---|
| deepseek-chat | Быстрый / default | нет | нет | базовый chat |
| deepseek-v3 | Быстрый / default | нет | нет | совместимый alias |
| deepseek-default | Быстрый / default | нет | нет | совместимый alias |
| deepseek-reasoner | Быстрый / default | да | нет | thinking_enabled=true |
| deepseek-r1 | Быстрый / default | да | нет | R1-compatible alias |
| deepseek-chat-search | Быстрый / default | нет | да | web search |
| deepseek-default-search | Быстрый / default | нет | да | web search alias |
| deepseek-reasoner-search | Быстрый / default | да | да | reasoning + search |
| deepseek-r1-search | Быстрый / default | да | да | R1-compatible + search |
| deepseek-expert | Эксперт / expert | нет | нет | Expert mode |
| deepseek-v4-pro | Эксперт / expert | да | нет | Expert + reasoning |
Полный маппинг:
curl http://localhost:9655/v1/model-capabilitiesПо официальной странице DeepSeek V4 Preview deepseek-chat и deepseek-reasoner сейчас route'ятся в deepseek-v4-flash non-thinking/thinking. В самом chat.deepseek.com direct stream точное имя чекпойнта не отдаётся (model: ""), поэтому proxy фиксирует одновременно web-режим (default / Быстрый) и актуальную официальную маршрутизацию (DeepSeek-V4-Flash).
Текущий вывод DeepSeek Web remote config показывает такие web-режимы:
Search для Expert по remote config недоступен, поэтому deepseek-expert-search остаётся unsupported.
| Method | Path | Назначение |
|---|---|---|
| GET | / или /health | статус proxy |
| GET | /v1/models | список рабочих OpenAI-compatible aliases |
| GET | /v1/model-capabilities | полный маппинг aliases, real model, capabilities |
| POST | /v1/chat/completions | OpenAI-compatible Chat Completions |
| POST | /v1/messages | Anthropic Messages API shim |
| POST | /v1/responses | OpenAI Responses API shim |
| GET | /v1/sessions | активные локальные agent sessions |
| POST | /reset-session?agent=<id> | сбросить одну session |
| POST | /reset-session?agent=all | сбросить все sessions |
Base URL для Open WebUI в Docker:
http://host.docker.internal:9655/v1
Для локального запуска без Docker:
http://localhost:9655/v1
API key можно указать любой: proxy сам ходит в DeepSeek Web через сохранённую browser-сессию.
npm run auth
npm startЕсли DeepSeek начал отвечать 401, 403 или просит новый PoW/session — повторите npm run auth и обновите сохранённую browser-сессию.
Локальные файлы авторизации не должны попадать в GitHub:
Они уже добавлены в .gitignore.
Синтаксическая проверка проекта:
npm testLive smoke-тесты против запущенного локального proxy:
BASE_URL=http://127.0.0.1:9655 MODEL=deepseek-chat npm run test:liveFreeDeepseekAPI — экспериментальный web-chat proxy для локального использования и интеграций. Он зависит от текущего контракта DeepSeek Web Chat, поэтому при изменениях на стороне DeepSeek может потребоваться обновление auth/session logic или model mapping.
Если что-то перестало работать:
ForgetMeAI · Telegram
| Back | FazBrowse Home | New Git URL |