Skip to main content
Back

DS2API Lets Developers Run DeepSeek Behind Any AI SDK

A Go middleware that wraps DeepSeek's web chat as OpenAI, Claude and Gemini compatible APIs, with account pooling and tool calling built in.

Repo, Full Access
  • DS2API wraps DeepSeek web chat as OpenAI, Claude, and Gemini compatible APIs in Go.
  • Repository crossed 4.8k stars and 1.6k forks before the maintainer archived it as read-only.
  • Ships a pure Go DeepSeekHashV1 proof-of-work solver with millisecond response times.
  • Multi-account rotation, automatic token refresh, per-account concurrency queues, and hot-reloadable runtime settings.
  • Tool calls use a custom DSML XML wrapper with anti-leak parsing that ignores examples inside Markdown code blocks.
  • Deploys via prebuilt binaries, Docker, Vercel serverless, or Zeabur, with a React admin panel at /admin.

An open source project called DS2API has been quietly picking up traction, crossing 4.8k stars and 1.6k forks before its maintainer flipped it to read-only. The pitch is simple: wrap DeepSeek's web chat interface in the API contracts your tooling already speaks, and let you point Codex, Claude Code, or the OpenAI SDK at it without changing a line of client code.

The repo has since been archived by its owner, but the code remains available under AGPL-3.0, and the architecture is worth a look if you build against multiple LLM protocols.

One backend, three API dialects

DS2API converts DeepSeek Web chat capability into OpenAI, Claude and Gemini compatible APIs. The backend is pure Go with no Python runtime, and a React admin panel is served under /admin. Whichever SDK your codebase already uses can talk to DeepSeek by changing only the base URL and API key.

Coverage across the three protocol families is fairly complete:

  • OpenAI: /v1/chat/completions, /v1/responses, /v1/embeddings, /v1/files, plus model listing endpoints
  • Claude: /anthropic/v1/messages and count_tokens, with shortcut paths at /v1/messages and /messages
  • Gemini: generateContent and streamGenerateContent under /v1beta/models/{model}:*
  • Ollama: /api/version, /api/tags, /api/show for tools that assume a local Ollama server

The compatibility matrix explicitly lists Codex CLI/SDK with both chat and responses wire APIs, OpenAI SDK, Vercel AI SDK, Anthropic SDK, Google Gemini SDK, and LangChain / LlamaIndex / OpenWebUI as verified integrations.