Y Router banner
luohy15 luohy15

Y Router

Development community intermediate

Description

**This project is archived.** OpenRouter now provides an official integration for Claude Code. You may consider using the official solution:

Installation

Terminal
claude install-skill https://github.com/luohy15/y-router

README

y-router

⚠️ ARCHIVED

**This project is archived.** OpenRouter now provides an official integration for Claude Code. You may consider using the official solution:

👉 **[OpenRouter's Official Claude Code Integration Guide](https://openrouter.ai/docs/guides/guides/claude-code-integration)**


A Cloudflare Worker that translates between Anthropic's Claude API and OpenAI-compatible APIs, enabling you to use Claude Code with OpenRouter and other OpenAI-compatible providers.

**Note:** This worker is suitable for testing models other than Anthropic. For Anthropic models (especially for intensive usage exceeding $200), consider using [claude-relay-service](https://github.com/Wei-Shaw/claude-relay-service) for better value.

Quick Usage

One-line Install (Recommended)

bash -c "$(curl -fsSL https://cc.yovy.app/install.sh)"

This script will automatically:

    undefined

Manual Setup

**Step 1:** Install Claude Code

npm install -g @anthropic-ai/claude-code

**Step 2:** Get OpenRouter API key from [openrouter.ai](https://openrouter.ai)

**Step 3:** Configure environment variables in your shell config (`~/.bashrc` or `~/.zshrc`):

# For quick testing, you can use our shared instance. For daily use, deploy your own instance for better reliability.
export ANTHROPIC_BASE_URL="https://cc.yovy.app"
export ANTHROPIC_API_KEY="your-openrouter-api-key"
export ANTHROPIC_CUSTOM_HEADERS="x-api-key: $ANTHROPIC_API_KEY"

**Optional:** Configure specific models (browse models at [openrouter.ai/models](https://openrouter.ai/models)):

export ANTHROPIC_MODEL="moonshotai/kimi-k2"
export ANTHROPIC_SMALL_FAST_MODEL="google/gemini-2.5-flash"

**Step 4:** Reload your shell and run Claude Code:

source ~/.bashrc
claude

...