AI prompts
base on High Performance LLM Reverse Proxy <div align="center">
<img src="./assets/clewdr-logo.svg" alt="ClewdR" height="60">
<p><em>High-Performance LLM Proxy for the Modern Era</em></p>
[](https://deepwiki.com/Xerxes-2/clewdr)
[](https://github.com/Xerxes-2/clewdr/releases/latest)
[](./LICENSE)
[](#performance-metrics)
[](#technical-architecture)
<h3>🌍 Language Support</h3>
<p>
<a href="./README.md"><strong>🇺🇸 English</strong></a> |
<a href="./README_zh.md"><strong>🇨🇳 简体中文</strong></a>
</p>
</div>
---
## 🎯 **What is ClewdR?**
**ClewdR** is a production-grade, high-performance proxy server engineered specifically for **Claude** (Claude.ai, Claude Code) and **Google Gemini** (AI Studio, Vertex AI). Built with **Rust** for maximum performance and minimal resource usage, it provides enterprise-level reliability with consumer-friendly simplicity.
### 🏆 **Why ClewdR?**
- **🚄 10x Performance**: Outperforms script-language implementations
- **💾 1/10th Memory**: Uses only single-digit MB in production
- **🔧 Production Ready**: Handles thousands of requests per second
- **🌐 Multi-Platform**: Native support for Windows, macOS, Linux, Android
## ✨ **Core Features**
<table>
<tr>
<td width="50%">
### 🎨 **Full-Featured Web Interface**
- **React-powered dashboard** with real-time monitoring
- **Multi-language support** (English/Chinese)
- **Secure authentication** with auto-generated passwords
- **Hot configuration reload** without service interruption
- **Visual cookie & key management**
### 🏗️ **Enterprise Architecture**
- **Tokio + Axum** async runtime for maximum throughput
- **Event-driven design** with decoupled components
- **Moka-powered caching** with intelligent invalidation
- **Chrome-level fingerprinting** for seamless API access
- **Multi-threaded processing** with optimal resource usage
### 🧠 **Intelligent Resource Management**
- **Smart cookie rotation** with status classification
- **API key health monitoring** and automatic failover
- **Rate limiting protection** with exponential backoff
- **Connection pooling** with keep-alive optimization
</td>
<td width="50%">
### 🌍 **Universal Compatibility**
- **Static compilation** - single binary, zero dependencies
- **Cross-platform native** - Windows, macOS, Linux, Android
- **Docker ready** with optimized images
- **Reverse proxy friendly** with custom endpoint support
### 🚀 **Protocol Support**
#### **Claude Integration**
- ✅ **Claude.ai** web interface
- ✅ **Claude Code** specialized support
- ✅ **System prompt caching** for efficiency
- ✅ **Extended Thinking** mode
- ✅ **Image attachments** & web search
- ✅ **Custom stop sequences**
#### **Google Gemini Integration**
- ✅ **AI Studio** & **Vertex AI**
- ✅ **OAuth2 authentication** for Vertex
- ✅ **HTTP Keep-Alive** optimization
- ✅ **Model switching** with automatic detection
#### **API Compatibility**
- ✅ **OpenAI format** - drop-in replacement
- ✅ **Native formats** - Claude & Gemini
- ✅ **Streaming responses** with real-time processing
</td>
</tr>
</table>
## 📊 **Performance Metrics**
<div align="center">
| Metric | ClewdR | Traditional Proxies |
|--------|--------|-------------------|
| **Memory Usage** | `<10 MB` | `100-500 MB` |
| **Requests/sec** | `1000+` | `100-200` |
| **Startup Time** | `<1 second` | `5-15 seconds` |
| **Binary Size** | `~15 MB` | `50-200 MB` |
| **Dependencies** | `Zero` | `Node.js/Python + libs` |
</div>
## 🚀 **Quick Start Guide**
### **Step 1: Download & Run**
```bash
# Download the latest release for your platform
wget https://github.com/Xerxes-2/clewdr/releases/latest/download/clewdr-[platform]
# Extract the binary (if necessary)
tar -xzf clewdr-[platform].tar.gz
# Navigate to the directory
cd clewdr-[platform]
# Make executable (Linux/macOS)
chmod +x clewdr
# Run ClewdR
./clewdr
```
<details>
<summary>📦 <strong>Platform Downloads</strong></summary>
| Platform | Architecture | Download Link |
|----------|-------------|--------------|
| 🪟 Windows | x64 | [clewdr-windows-x64.exe](https://github.com/Xerxes-2/clewdr/releases/latest) |
| 🐧 Linux | x64 | [clewdr-linux-x64](https://github.com/Xerxes-2/clewdr/releases/latest) |
| 🐧 Linux | ARM64 | [clewdr-linux-arm64](https://github.com/Xerxes-2/clewdr/releases/latest) |
| 🍎 macOS | x64 | [clewdr-macos-x64](https://github.com/Xerxes-2/clewdr/releases/latest) |
| 🍎 macOS | ARM64 (M1/M2) | [clewdr-macos-arm64](https://github.com/Xerxes-2/clewdr/releases/latest) |
| 🤖 Android | ARM64 | [clewdr-android-arm64](https://github.com/Xerxes-2/clewdr/releases/latest) |
</details>
### **Step 2: Access Web Interface**
1. 🌐 Open your browser to **`http://127.0.0.1:8484`**
2. 🔐 Use the **Web Admin Password** displayed in the console
3. 🎉 Welcome to ClewdR's management interface!
> **💡 Pro Tips:**
>
> - **Forgot password?** Delete `clewdr.toml` and restart
> - **Docker users:** Password appears in container logs
> - **Change password:** Use the web interface settings
### **Step 3: Configure Your Services**
<table>
<tr>
<td width="50%">
#### 🍃 **Claude Setup**
1. **Add Cookies**: Paste your Claude.ai session cookies
2. **Configure Proxy**: Set upstream proxy if needed
3. **Test Connection**: Verify cookie status in dashboard
</td>
<td width="50%">
#### 🔹 **Gemini Setup**
1. **Add API Keys**: Input your Google AI Studio keys
2. **Vertex AI** (Optional): Configure OAuth2 for enterprise
3. **Model Selection**: Choose your preferred models
</td>
</tr>
</table>
### **Step 4: Connect Your Applications**
ClewdR provides multiple API endpoints. Check the console output for available endpoints:
#### 🔗 **API Endpoints**
```bash
# Claude Endpoints
Claude Web: http://127.0.0.1:8484/v1/messages # Native format
Claude OpenAI: http://127.0.0.1:8484/v1/chat/completions # OpenAI compatible
Claude Code: http://127.0.0.1:8484/code/v1/messages # Claude Code
# Gemini Endpoints
Gemini Native: http://127.0.0.1:8484/v1/v1beta/generateContent # Native format
Gemini OpenAI: http://127.0.0.1:8484/gemini/chat/completions # OpenAI compatible
Vertex AI: http://127.0.0.1:8484/v1/vertex/v1beta/ # Vertex AI
```
#### ⚙️ **Application Configuration Examples**
<details>
<summary><strong>SillyTavern Configuration</strong></summary>
```json
{
"api_url": "http://127.0.0.1:8484/v1/chat/completions",
"api_key": "your-api-password-from-console",
"model": "claude-3-sonnet-20240229"
}
```
</details>
<details>
<summary><strong>Continue VSCode Extension</strong></summary>
```json
{
"models": [
{
"title": "Claude via ClewdR",
"provider": "openai",
"model": "claude-3-sonnet-20240229",
"apiBase": "http://127.0.0.1:8484/v1/",
"apiKey": "your-api-password-from-console"
}
]
}
```
</details>
<details>
<summary><strong>Cursor IDE Configuration</strong></summary>
```json
{
"openaiApiBase": "http://127.0.0.1:8484/v1/",
"openaiApiKey": "your-api-password-from-console"
}
```
</details>
### **Step 5: Verify & Monitor**
- ✅ Check cookie/key status in the web dashboard
- ✅ Monitor request logs for successful connections
- ✅ Test with a simple chat request
- ✅ Enjoy blazing-fast LLM proxy performance!
## Community Resources
**Github Aggregated Wiki**: <https://github.com/Xerxes-2/clewdr/wiki>
## Acknowledgements
- [wreq](https://github.com/0x676e67/wreq) - Excellent browser fingerprinting library used for API access.
- [Clewd Modified Version](https://github.com/teralomaniac/clewd) - A modified version of the original Clewd, providing many inspirations and foundational features.
- [Clove](https://github.com/mirrorange/clove) - Provides the support logic for Claude Code.
", Assign "at most 3 tags" to the expected json: {"id":"14268","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"