DeepSeek V3 R1 is a large language model known for its capabilities and cost-effectiveness. While the official DeepSeek platform offers paid API access, a resourceful community has developed a "reverse API" that allows developers to tap into its potential for free. This article delves into the DeepSeek V3 Free API, exploring its features, setup, usage, and important considerations.
The DeepSeek V3 Free API, developed by LLM-Red-Team, is a reverse-engineered interface that grants access to the DeepSeek-V3 R1 large language model. It boasts several features:
The API strives for compatibility with the OpenAI API, making it easier to integrate into existing projects.
Before diving in, it's crucial to acknowledge the following:
This API is intended for personal use, research, and educational purposes. Commercial use or providing it as a service is discouraged.
Here's a step-by-step guide to setting up and using the DeepSeek V3 Free API:
F12
).userToken
and copy its value
. This will be your Authorization Bearer Token.Several deployment methods are available:
docker run -it -d --init --name deepseek-free-api -p 8000:8000 -e TZ=Asia/Shanghai vinlic/deepseek-free-api:latest
You can also pass the user token as an environment variable:
docker run -it -d --init --name deepseek-free-api -p 8000:8000 -e TZ=Asia/Shanghai -e DEEP_SEEK_CHAT_AUTHORIZATION=YOUR_TOKEN vinlic/deepseek-free-api:latest
docker-compose.yml
file for a more declarative approach.
version: '3'
services:
deepseek-free-api:
container_name: deepseek-free-api
image: vinlic/deepseek-free-api:latest
restart: always
ports:
- "8000:8000"
environment:
- TZ=Asia/Shanghai
The API primarily supports the /v1/chat/completions
endpoint, compatible with the OpenAI Chat Completions API.
POST /v1/chat/completions
Authorization: Bearer YOUR_USER_TOKEN
{
"model": "deepseek",
"messages": [
{
"role": "user",
"content": "Tell me a joke."
}
],
"stream": false
}
Explanation:
model
: Specifies the model variant. Options include:
deepseek
(default)deepseek-think
or deepseek-r1
(deep thinking)deepseek-search
(web search)deepseek-r1-search
or deepseek-think-search
(deep thinking + web search)messages
: An array of message objects representing the conversation history.
stream
: A boolean indicating whether to use streaming output.
Response Body (Example):
{
"id": "unique_id",
"model": "deepseek",
"object": "chat.completion",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Why don't scientists trust atoms? Because they make up everything!"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 10,
"completion_tokens": 15,
"total_tokens": 25
},
"created": 1678886400
}
You can provide multiple user tokens separated by commas in the Authorization
header:
Authorization: Bearer TOKEN1,TOKEN2,TOKEN3
The API will randomly select a token for each request.
proxy_buffering off;
chunked_transfer_encoding on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 120;
The DeepSeek V3 Free API provides a valuable opportunity to explore the capabilities of a powerful language model without immediate cost constraints. However, it's imperative to use it responsibly, respecting the terms of service and limitations of a reverse-engineered solution. Consider the official DeepSeek API for production environments requiring stability and reliability.