Nya-Foundation/NyaProxy

NyaProxy acts like a smart, central manager for accessing various online services (APIs) – think AI tools (like OpenAI, Gemini, Anthropic), image generators, or almost any web service that uses access keys. It helps you use these services more reliably, efficiently, and securely.

What it solves

NyaProxy provides a centralized way to manage access to external or internal APIs (such as AI providers, image generation, or SaaS services) without exposing sensitive API keys to client applications. It solves the problem of managing multiple credentials for a single service, handling rate limits, and ensuring high availability through automated retries and failover.

How it works

NyaProxy acts as an API gateway that sits between your applications and upstream services. Applications authenticate with NyaProxy using an internal proxy key. NyaProxy then forwards the request to the target API, injecting the appropriate upstream credentials from a managed pool. It uses configurable load-balancing strategies to rotate keys and enforces rate limits across endpoints, keys, and users. If a request fails due to specific error codes, NyaProxy can automatically rotate to a different key and retry the request.

Who it’s for

It is designed for teams and developers who need to centralize credential management, implement quota-aware routing, and protect their upstream API keys from being exposed to the frontend or client-side code.

Highlights

  • Credential Pooling & Injection: Rotates traffic across multiple upstream keys to maximize quota usage.
  • Advanced Load Balancing: Supports round-robin, random, least-requests, fastest-response, and weighted selection.
  • Resilience: Features automatic retries, failover, and a "quarantine" system to temporarily block failing or revoked keys.
  • Traffic Control: Implements multi-scope rate limiting (endpoint, key, IP, and user) and request queueing.
  • Request Modification: Can set or remove JSON fields in request bodies using JMESPath rules for provider compatibility.
  • Observability: Includes a web dashboard and a Prometheus metrics endpoint.

Related

  • Project
  • Project
  • Project
  • Project
  • Project