DeepReasoning 🐬🧠

Harness the power of DeepSeek R1's reasoning and Claude's creativity and code generation capabilities with a unified API and chat interface.
[](https://github.com/getasterisk/deepreasoning/blob/main/LICENSE.md)
[](https://www.rust-lang.org/)
[](https://deepreasoning.asterisk.so)
[Getting Started](#getting-started) •
[Features](#features) •
[API Usage](#api-usage) •
[Documentation](#documentation) •
[Self-Hosting](#self-hosting) •
[Contributing](#contributing)
---
> [!NOTE]
> **Disclaimer:** This project is not affiliated with, endorsed by, or sponsored by Anthropic. Claude is a trademark of Anthropic, PBC. This is an independent developer project using Claude.
## Table of Contents
- [Overview](#overview)
- [Features](#features)
- [Why R1 + Claude?](#why-r1--claude)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Configuration](#configuration)
- [API Usage](#api-usage)
- [Basic Example](#basic-example)
- [Streaming Example](#streaming-example)
- [Configuration Options](#configuration-options)
- [Self-Hosting](#self-hosting)
- [Security](#security)
- [Contributing](#contributing)
- [License](#license)
- [Acknowledgments](#acknowledgments)
## Overview
DeepReasoning is a high-performance LLM inference API that combines DeepSeek R1's Chain of Thought (CoT) reasoning capabilities with Anthropic Claude's creative and code generation prowess. It provides a unified interface for leveraging the strengths of both models while maintaining complete control over your API keys and data.
## Features
🚀 **Zero Latency** - Instant responses with R1's CoT followed by Claude's response in a single stream, powered by a high-performance Rust API
🔒 **Private & Secure** - End-to-end security with local API key management. Your data stays private
⚙️ **Highly Configurable** - Customize every aspect of the API and interface to match your needs
🌟 **Open Source** - Free and open-source codebase. Contribute, modify, and deploy as you wish
🤖 **Dual AI Power** - Combine DeepSeek R1's reasoning with Claude's creativity and code generation
🔑 **Managed BYOK API** - Use your own API keys with our managed infrastructure for complete control
## Why R1 + Claude?
DeepSeek R1's CoT trace demonstrates deep reasoning to the point of an LLM experiencing "metacognition" - correcting itself, thinking about edge cases, and performing quasi Monte Carlo Tree Search in natural language.
However, R1 lacks in code generation, creativity, and conversational skills. Claude 3.5 Sonnet excels in these areas, making it the perfect complement. DeepReasoning combines both models to provide:
- R1's exceptional reasoning and problem-solving capabilities
- Claude's superior code generation and creativity
- Fast streaming responses in a single API call
- Complete control with your own API keys
## Getting Started
### Prerequisites
- Rust 1.75 or higher
- DeepSeek API key
- Anthropic API key
### Installation
1. Clone the repository:
```bash
git clone https://github.com/getasterisk/deepreasoning.git
cd deepreasoning
```
2. Build the project:
```bash
cargo build --release
```
### Configuration
Create a `config.toml` file in the project root:
```toml
[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
```python
import requests
response = requests.post(
"http://127.0.0.1:1337/",
headers={
"X-DeepSeek-API-Token": "