Home
A modern, high-performance proxy server that translates Ollama API calls to OpenRouter, enabling seamless access to a wide variety of AI models through the familiar Ollama interface.
Overview¶
Ollama Proxy acts as a bridge between any Ollama-compatible client and the OpenRouter API. This allows you to use your favorite tools and applications that support Ollama with the extensive range of models offered by OpenRouter, without needing to modify your client-side code.
Features¶
- 🔄 Seamless Translation: Converts Ollama API calls to the OpenRouter format.
- 🚀 High Performance: Built with modern Python and
asynciofor speed. - ⚙️ Flexible Configuration: Configure via environment variables,
.envfiles, or CLI arguments. - 🔍 Model Filtering: Control which OpenRouter models are exposed.
- 📊 Structured Logging: JSON logs for better observability.
- 🐳 Docker Support: Easy to deploy with Docker and Docker Compose.
Quick Start¶
Prerequisites¶
- Python 3.12+
- An OpenRouter API key
Installation¶
-
Clone the repository:
-
Install dependencies:
-
Configure your API key: Create a
.envfile and add your key: -
Run the server:
Once the server is running, you can configure your Ollama client to point to http://localhost:11434 (or your custom host and port).
Documentation¶
Explore our comprehensive documentation to learn more about configuring and using the Ollama Proxy:
Core Documentation¶
- Configuration Guide: Learn how to customize the proxy's behavior.
- API Reference: See the full list of supported Ollama API endpoints.
- Usage Examples: Practical examples of how to use the proxy with various tools.
- Deployment Guide: Find out how to deploy the proxy in a production environment.
- Architecture Overview: Get a deeper understanding of the project's design.
- Troubleshooting Guide: Find solutions to common problems.
Advanced Features¶
- Multi-Provider Support: Configure and use multiple AI providers with intelligent routing.
- CLI Tools & Administration: Comprehensive guide to command-line tools and administrative interfaces.
Contributing¶
Contributions are welcome! Please see the Contributing Guide for details on how to contribute to the project.
License¶
This project is licensed under the MIT License. See the LICENSE file for details.