Telegram : t.me/j49_c
https://deepseek-pow.contact-3mh.workers.devPOST with Content-Type: application/json.
POST /api/chat
Solves PoW automatically, sends your message to DeepSeek, returns thinking + response.
pow_response remains as an optional override.| Param | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Your message |
| token | string | Yes | Your DeepSeek token — the worker keeps no account (get one via POST /api/login) |
| session_id | string | No | Reuse existing session |
| parent_message_id | string | No | Continue from a message (multi-turn) |
| thinking_enabled | bool | No | Enable thinking (default: true) |
| search_enabled | bool | No | Enable web search (default: false) |
| system_prompt | string | No | Override system instructions |
| model | string | No | Model name (if supported) |
| temperature | number | No | Sampling 0.0–2.0 (default: 1.0) |
| max_tokens | number | No | Max output tokens (default: 8192) |
| presence_penalty | number | No | -2.0 to 2.0 (new topics) |
| frequency_penalty | number | No | -2.0 to 2.0 (repetition) |
| pow_response | string | No | Pre-solved PoW (base64) |
{"prompt": "Hello!", "token": "YOUR_TOKEN"}
Response: (parent_message_id lets you continue the conversation)
{
"session_id": "uuid",
"parent_message_id": "uuid",
"thinking": "The user said hello...",
"response": "Hi there! How can I help?",
"usage": {"prompt_tokens": 12, "completion_tokens": 34, "total_tokens": 46},
"pow_time": "0.6s",
"pow_difficulty": 144000,
"method": "worker"
}
POST /api/chat/stream
Same as Chat but returns a Server-Sent Events stream for real-time responses.
{"prompt": "Tell me a joke", "token": "YOUR_TOKEN"}
POST /api/chat/session
Create a new DeepSeek chat session. Reuse its id for threaded history.
{"token": "YOUR_DEEPSEEK_TOKEN"}
Response: {"success": true, "session_id": "uuid", "title": "..."}
List: POST /api/chat/sessions/list (alias /api/chat/sessions; GET with ?token= also works)
Delete: POST /api/chat/sessions/delete with {"chat_session_id": "uuid"}
POST /api/pow
Solves a DeepSeek PoW challenge. Returns the nonce answer.
| Param | Type | Description |
|---|---|---|
| challenge | string | 64-char hex hash |
| salt | string | Random salt |
| difficulty | number | Nonce search space |
| expire_at | number | Expiration timestamp |
| signature | string | Optional signature |
| start | number | Chunk mode: first nonce to try |
| count | number | Chunk mode: nonces per request (max 1200) |
{"challenge":"f9ee...4c06","salt":"ed95...dc8eb","difficulty":144000,"expire_at":1787692750574}
start/count) remains useful for incremental/parallel client implementations.POST /api/pow/batch
Solve multiple PoW challenges at once (max 10).
{"challenges": [
{"challenge":"...","salt":"...","difficulty":144000,"expire_at":...},
{"challenge":"...","salt":"...","difficulty":100000,"expire_at":...}
]}
POST /api/login
Authenticate with DeepSeek and get a token.
{"email": "you@email.com", "password": "your_pass"}
Response: {"success": true, "token": "..."}
POST /api/upload
Upload a file (text/image/PDF/audio) to DeepSeek. Images are forked to the vision model automatically.
Params: filename (string, optional), file_data (data URL or base64), file_url (public https URL, alternative)
{"filename": "report.txt", "file_data": "data:text/plain;base64,SGVsbG8="}
Response: {"ok":true, "file":{"file_id":"file-xxx"}, "vision_file_id":"file-yyy"}
Check status: POST /api/upload/status {"file_ids":["file-xxx"]}
Full OpenAI/Anthropic-compatible endpoints. Every request carries your own DeepSeek token.
| Endpoint | Format | Description |
|---|---|---|
| POST /v1/chat/completions | OpenAI | Chat with tools, file parts, web search |
| POST /v1/messages | Anthropic | Claude-shaped with tools + files |
| POST /anthropic/v1/messages | Anthropic | Alias of /v1/messages |
| POST /v1/messages/count_tokens | Anthropic | Token estimation (~4 chars/tok) |
| POST /v1/responses | OpenAI | Responses API with instruction + tools |
| GET /v1/models | OpenAI | List available models |
| GET /v1/models/refresh | OpenAI | Drop the cache and re-fetch models |
Auth: token in body, Authorization: Bearer, or x-deepseek-token header — required on every request.
{"model":"deepseek-chat","messages":[{"role":"user","content":"Hi"}],"stream":false}
cURL — Solve PoW:
curl -X POST https://deepseek-pow.contact-3mh.workers.dev/api/pow \
-H "Content-Type: application/json" \
-d '{"challenge":"...","salt":"...","difficulty":144000,"expire_at":1787692750574}'
cURL — Chat:
curl -X POST https://deepseek-pow.contact-3mh.workers.dev/api/chat \
-H "Content-Type: application/json" \
-d '{"prompt":"Hello!"}'
# The worker holds no account — a DeepSeek token is always required.
cURL — File upload:
curl -X POST https://deepseek-pow.contact-3mh.workers.dev/api/upload \
-H "Content-Type: application/json" \
-d '{"filename":"report.txt","file_data":"data:text/plain;base64,SGVsbG8="}'
# Then chat with it: {"prompt":"summarize the file","files":["<file_id>"]}"
Python:
import requests
r = requests.post("https://deepseek-pow.contact-3mh.workers.dev/api/chat", json={
"prompt": "What is 2+2?",
"token": "YOUR_TOKEN"
})
print(r.json()["response"])
Full system prompt and API documentation in plain text format (like GitHub raw files).
/raw — System Prompt & Full DocsAlso routed: legacy GET /get_pow?authorization=<token> (Telegram-bot PoW shape), GET /api/relay-debug (PoW-solver probe), GET /health (liveness).
/api/pow, /api/pow/batch and /get_pow: 600 requests/min (chunked solving needs many parallel requests). All other endpoints: 60 requests/min per IP. Exceeding returns 429. Tune with worker vars POW_RPM (default 600) and RATE_LIMIT_RPM (default 60).