Claude Code Nexus is a proxy platform that forwards Claude Code requests to any OpenAI-compatible API service. It supports smart model mapping, streaming, and is deployed on Cloudflare Workers. It enables developers to use Claude Code with various OpenAI-compatible services, improving flexibility and integration capabilities.
git clone https://github.com/KroMiose/claude-code-nexus.gitClaude Code Nexus is a Cloudflare Workers-based proxy service that integrates Claude Code CLI with any OpenAI-compatible API backend. It supports intelligent model mapping, allowing you to redirect claude-3 model requests to alternative services like OneAPI, Azure OpenAI, or Ollama without modifying your Claude Code setup. The platform handles streaming responses, tool use, and multimodal inputs while encrypting API keys and isolating user data. Developers benefit from vendor flexibility, reduced costs through service comparison, and the ability to self-host or deploy on Cloudflare's global network for low-latency access.
["Deploy Claude Code Nexus on Cloudflare Workers using the provided template at https://github.com/anthropics/claude-code-nexus. Configure your OpenAI-compatible API service endpoint in the Workers environment variables.","Define your model mapping in the proxy configuration. For example, map 'claude-3-sonnet-20240229' to 'gpt-4-0125-preview' if you need specific model compatibility.","Test the connection by running a simple task like generating a Python script that processes data from a public API. Verify the streaming response and token usage metrics.","Integrate the proxy endpoint into your development workflow by updating your Claude Code configuration to use the Nexus endpoint instead of direct API calls.","Monitor performance using Cloudflare Analytics. Adjust model mappings and timeouts based on your specific use case and API service limitations."]
Route Claude Code CLI requests to cost-effective OpenAI-compatible services
Map Claude model names to alternative LLM providers transparently
Self-host AI infrastructure with encrypted API key management
Reduce vendor lock-in by switching backends without code changes
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/KroMiose/claude-code-nexusCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Set up a proxy connection to [OPENAI_COMPATIBLE_API_SERVICE] using Claude Code Nexus deployed on Cloudflare Workers. Map the model [CLAUDE_MODEL] to [TARGET_MODEL] for this session. Stream the response and include the API endpoint [API_ENDPOINT_URL] in the output. Test the connection by running a simple Python script generation task: 'Write a script to parse JSON data from [DATA_SOURCE_URL] and extract [SPECIFIC_DATA_FIELDS].'
```
Claude Code Nexus Proxy Setup Complete
--------------------------------------
Proxy Endpoint: https://claude-code-nexus.workers.dev/v1
Model Mapping: claude-3-opus-20240229 → gpt-4-turbo-20240409
Streaming: Enabled (real-time response)
API Endpoint: https://api.openai.com/v1/chat/completions
Testing Connection with Python Script Generation Task
----------------------------------------------------
Task: Generate a Python script to parse JSON data from https://api.example.com/data/orders and extract customer_id, order_total, and payment_status.
Generated Script:
```python
import requests
import json
# Fetch data from API
response = requests.get('https://api.example.com/data/orders')
data = response.json()
# Extract required fields
results = []
for order in data['orders']:
results.append({
'customer_id': order['customer_id'],
'order_total': order['order_total'],
'payment_status': order['payment_status']
})
# Save to file
with open('extracted_orders.json', 'w') as f:
json.dump(results, f, indent=2)
print(f"Extracted {len(results)} orders to extracted_orders.json")
```
Response Time: 1.2s
Token Usage: 147 input / 213 output
Connection Status: ✅ Active (via Cloudflare Workers)
```Pioneering accessible, high-performance AI models
AI assistant built for thoughtful, nuanced conversation
Information security and compliance solutions
Deploy serverless code instantly across the globe
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan