{"id":30288575,"url":"https://github.com/julesmellot/claude-code-openrouter-proxy","last_synced_at":"2025-08-16T22:37:56.172Z","repository":{"id":310026910,"uuid":"1038427184","full_name":"JulesMellot/Claude-Code-openrouter-proxy","owner":"JulesMellot","description":"A lil public openrouter proxy for claude code","archived":false,"fork":false,"pushed_at":"2025-08-15T07:51:43.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-15T09:19:03.181Z","etag":null,"topics":["claude-code","open-router","proxy","public"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JulesMellot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-15T07:14:31.000Z","updated_at":"2025-08-15T07:52:36.000Z","dependencies_parsed_at":"2025-08-15T09:19:04.579Z","dependency_job_id":"ccee826c-29bf-4f2e-acf6-9f943fc6679f","html_url":"https://github.com/JulesMellot/Claude-Code-openrouter-proxy","commit_stats":null,"previous_names":["julesmellot/claude-code-openrouter-proxy"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/JulesMellot/Claude-Code-openrouter-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulesMellot%2FClaude-Code-openrouter-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulesMellot%2FClaude-Code-openrouter-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulesMellot%2FClaude-Code-openrouter-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulesMellot%2FClaude-Code-openrouter-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JulesMellot","download_url":"https://codeload.github.com/JulesMellot/Claude-Code-openrouter-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulesMellot%2FClaude-Code-openrouter-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270781214,"owners_count":24643808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-code","open-router","proxy","public"],"created_at":"2025-08-16T22:37:55.540Z","updated_at":"2025-08-16T22:37:56.157Z","avatar_url":"https://github.com/JulesMellot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Claude Code OpenRouter Proxy\n\nA public proxy server that allows Claude Code to work with OpenRouter API endpoints without any installation required.\n\n## Features\n\n- **BYOK (Bring Your Own Key)**: Users can use their own OpenRouter API keys\n- **Model Mapping**: Automatically maps Anthropic model names to OpenRouter equivalents\n- **Tool Support**: Full support for Claude Code's tool/function calling\n- **CORS Enabled**: Cross-origin requests supported\n- **No Installation**: Works directly with Claude Code by setting environment variables\n\n## Setup Instructions\n\n### For Users (Recommended - BYOK Mode)\n\nNo installation required! Just set these environment variables:\n\n```bash\n# 1) Base URL without path or query (no /v1/messages, no ?beta=true)\nexport ANTHROPIC_BASE_URL=\"https://proxycodeclaude.mellot-jules.workers.dev\"\n\n# 2) API Key: Use your OpenRouter API key in ANTHROPIC_API_KEY\nexport ANTHROPIC_API_KEY=\"sk-or-v1_...\"\n\n# 3) For custom model :\nclaude --model \"z-ai/glm-4.5\"\n```\n\nThat's it! Claude Code will now work through the proxy with your OpenRouter key.\n\n### For Hosters\n\nIf you want to host your own instance:\n\n1. Deploy this to Cloudflare Workers\n2. Configure your `wrangler.toml` with:\n   - Set `REQUIRE_PROXY_TOKEN = \"0\"` for public access or `\"1\"` for restricted access\n   - Optionally set `OPENROUTER_API_KEY` for server-key mode\n   - Set `REASONING_EFFORT` if desired (default: \"medium\")\n\n## Supported Models\n\nThe proxy automatically maps these Anthropic models to OpenRouter:\n\n- `claude-3-5-haiku-20241022` → `anthropic/claude-3.5-haiku`\n- `claude-3-7-sonnet-latest` → `anthropic/claude-3.7-sonnet`\n- `claude-3-7-sonnet-20250219` → `anthropic/claude-3.7-sonnet`\n- `claude-3-opus-20240229` → `anthropic/claude-3-opus`\n\n## Authentication Modes\n\n### BYOK Mode (Recommended)\n- Users provide their own OpenRouter API key via `ANTHROPIC_API_KEY`\n- No server configuration required\n- Key is sent via `x-api-key` or `anthropic-api-key` header\n\n### Server Key Mode\n- Proxy uses a configured OpenRouter API key\n- Requires `REQUIRE_PROXY_TOKEN = \"1\"` and `PROXY_TOKEN` for security\n- Useful for controlled environments\n\n## API Endpoints\n\n- `POST /v1/messages` - Main Claude API endpoint\n- `GET /health` - Health check endpoint\n- `OPTIONS /v1/messages` - CORS preflight\n\n## Security Features\n\n- CORS headers properly configured\n- Timeout protection (3 minutes default)\n- Request validation\n- Error handling with appropriate HTTP status codes\n\n## Development\n\nThe proxy is built for Cloudflare Workers and includes:\n- Node.js compatibility flags\n- Observability enabled\n- Configurable timeout and reasoning effort settings\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulesmellot%2Fclaude-code-openrouter-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulesmellot%2Fclaude-code-openrouter-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulesmellot%2Fclaude-code-openrouter-proxy/lists"}