DeepReasoning exposes a Rust-based high-performance API and chat interface that combines DeepSeek R1 CoT reasoning with Anthropic Claude for code generation and creativity. It supports local API key management and streaming responses, with self-hosting capabilities.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
DeepReasoning is a high-performance LLM inference API and chat UI that integrates DeepSeek R1's CoT reasoning traces with Anthropic Claude models.
How it works
The project provides a unified API and chat interface that streams R1 CoT reasoning followed by Claude responses in a single flow. It enforces private key management and allows configuration of separate DeepSeek and Anthropic settings via config objects in requests.
Getting started
Prerequisites
- Rust 1.75 or higher
- DeepSeek API key
- Anthropic API key
Installation
git clone https://github.com/getasterisk/deepreasoning.git
cd deepreasoning
cargo build --release
Configuration
Create a config.toml file in the project root:
[server]
host = "127.0.0.1"
port = 3000
[pricing]
# Configure pricing settings for usage tracking
API Usage
See API Docs: https://deepreasoning.chat
Basic Example
import requests
response = requests.post(
"http://127.0.0.1:1337/",
headers={
"X-DeepSeek-API-Token": "<YOUR_DEEPSEEK_API_KEY>",
"X-Anthropic-API-Token": "<YOUR_ANTHROPIC_API_KEY>"
},
json={
"messages": [
{"role": "user", "content": "How many 'r's in the word 'strawberry'?"}
]
}
)
print(response.json())
Streaming Example
import asyncio
import json
import httpx
async def stream_response():
async with httpx.AsyncClient() as client:
async with client.stream(
"POST",
"http://127.0.0.1:1337/",
headers={
"X-DeepSeek-API-Token": "<YOUR_DEEPSEEK_API_KEY>",
"X-Anthropic-API-Token": "<YOUR_ANTHROPIC_API_KEY>"
},
json={
"stream": True,
"messages": [
{"role": "user", "content": "How many 'r's in the word 'strawberry'?"}
]
}
) as response:
response.raise_for_status()
async for line in response.aiter_lines():
if line:
if line.startswith('data: '):
data = line[6:]
try:
parsed_data = json.loads(data)
if 'content' in parsed_data:
content = parsed_data.get('content', '')[0]['text']
print(content, end='',flush=True)
else:
print(data, flush=True)
except json.JSONDecodeError:
pass
if __name__ == "__main__":
asyncio.run(stream_response())
Configuration Options
The API supports extensive configuration through the request body:
{
"stream": false,
"verbose": false,
"system": "Optional system prompt",
"messages": [...],
"deepseek_config": {
"headers": {},
"body": {}
},
"anthropic_config": {
"headers": {},
"body": {}
}
}
Self-Hosting
DeepReasoning can be self-hosted. Steps:
- Configure environment variables or
config.toml - Build the Docker image or compile from source
- Deploy to your hosting platform
Security
- No data storage or logged
- BYOK (Bring Your Own Keys) architecture
- Regular security audits and updates
License
MIT
Acknowledgments
Free and open-source project by Asterisk; thanks to DeepSeek and Anthropic






