About this project

OpenProxy is a self-hosted service that acts as an API proxy for multiple AI providers such as OpenAI and Anthropic. It exposes a unified API interface compatible with both OpenAI’s `/v1/chat/completions` and Anthropic’s `/v1/messages` endpoints. The system supports multi-provider failover with weighted load balancing and automatic fallback on failure. It enables multi-key rotation per provider to avoid rate limits by deprioritizing recently used key combinations. Administrators can manage API keys with quotas, expiry, and model access controls. Usage is tracked per request including cost, response time, and provider attribution. A web-based admin panel allows management of models, providers, users, and orders, while tenants get dashboards showing usage charts, balances, and request history. Provider API keys are stored encrypted using RSA. Authentication options include email/password, phone OTP, GitHub, and Google via better-auth. Example usage involves sending standard OpenAI-style requests to the proxy endpoint with a bearer token. MIT licensed.