Discover and explore top open-source AI tools and projects—updated daily.
Proxy Anthropic API to OpenAI format for OpenRouter
Top 82.0% on SourcePulse
This project provides a proxy server that translates Anthropic API requests into the OpenAI format, routing them through OpenRouter. It allows users to leverage Anthropic's models, specifically Claude Code, with an OpenAI-compatible interface via OpenRouter, simplifying integration and potentially offering cost or access benefits.
How It Works
The proxy intercepts incoming requests formatted for Anthropic's API. It then transforms these requests into the equivalent OpenAI API format and forwards them to a specified base URL, defaulting to openrouter.ai
. This approach abstracts the underlying API differences, enabling seamless use of Anthropic models through an OpenAI-compatible gateway.
Quick Start & Requirements
OPENROUTER_API_KEY=your-api-key npx anthropic-proxy
OPENROUTER_API_KEY
environment variable (unless ANTHROPIC_PROXY_BASE_URL
is custom).Highlighted Details
Maintenance & Community
Contributions are welcome via issues and pull requests.
Licensing & Compatibility
Licensed under the MIT license. This license is permissive and generally compatible with commercial and closed-source applications.
Limitations & Caveats
The proxy is designed for specific use cases involving Anthropic models and OpenRouter. Customization of models is supported, but compatibility with all Anthropic API features or future changes is not guaranteed.
4 months ago
Inactive