NIyueeE/ds-free-api

DeepSeek网页端API代理,支持OpenAI与Anthropic兼容接口 | OpenAI & Anthropic compatible API proxy for DeepSeek web

What it solves

DS-Free-API allows users to access the free web-based version of DeepSeek as a standard API. It eliminates the need for an official API key by acting as a reverse proxy that converts the web interface's internal communication into OpenAI and Anthropic compatible API protocols, making it easy to integrate DeepSeek's capabilities into existing AI clients and tools.

How it works

Built with Rust for high performance, the project creates a gateway that translates incoming API requests (OpenAI Chat Completions or Anthropic Messages) into a format the DeepSeek web interface understands. It manages a pool of user accounts to distribute requests and bypass session-level rate limits using exponential backoff retries. To avoid security blocks, it requires a device_id (browser fingerprint) for each account. The system also includes a robust "self-repair" pipeline to ensure that tool calls and JSON outputs from the model are correctly formatted before being returned to the client.

Who it’s for

Developers and AI enthusiasts who want to use DeepSeek's web-based models in their own applications or third-party clients without paying for API credits or managing official API keys.

Highlights

  • Dual Protocol Support: Fully compatible with both OpenAI and Anthropic API standards.
  • Tool Call Reliability: Features a three-layer self-repair pipeline (text → JSON → model fallback) to handle malformed tool calls.
  • Automated File Handling: Automatically uploads inline data URLs (images/documents) to DeepSeek sessions and triggers search mode for HTTP URLs.
  • Account Pool Management: Includes a built-in Web management panel for monitoring account status, managing API keys, and configuring settings via a responsive PWA interface.
  • Prompt Bypass: Automatically uses chunked completion and file uploads when prompts exceed model limits.
  • High Performance: Implemented as a single Rust binary with no external runtime dependencies.

Related

  • Project
  • Project
  • Project
  • Project