Skip to content

Introduction

Gatewyse is a unified API gateway that sits between your applications and AI providers. Point your apps at a single endpoint and the gateway picks the best provider for the job — prioritizing free-tier usage, respecting budgets, and falling back automatically on failure.

Why Gatewyse?

  • No vendor lock-in. Switch providers without changing application code. The gateway exposes an OpenAI-compatible API regardless of which provider handles the request.
  • Cost control. Free-tier-first routing burns through Groq, DeepSeek, and other free inference before touching paid keys. Per-tenant, per-org, and per-user budgets with automatic enforcement.
  • One API for everything. Text, images, audio, embeddings, reranking — configure which capabilities are enabled and the gateway handles provider selection.
  • Enterprise controls. Multi-tenant isolation, RBAC with 6 default roles, API key management, PII detection, prompt injection guards, and immutable audit logs.
  • Your keys, your rules. Each tenant configures their own provider API keys, enables or disables capabilities, and sets routing preferences through the admin dashboard.

Supported Providers

Gatewyse supports 28 providers across cloud and self-hosted deployments:

Cloud ProvidersSelf-Hosted
OpenAI, Anthropic, Google Gemini, Azure OpenAI, Groq, Mistral, Cohere, DeepSeek, Together AI, Perplexity, Fireworks AI, Replicate, AI21 Labs, HuggingFace, xAI, Cerebras, SambaNova, AssemblyAI, ElevenLabsOllama, vLLM, LM Studio, LocalAI, llama.cpp, Whisper Local, ComfyUI, Stability AI

Routing Strategies

The gateway provides 10 routing strategies that can be configured per tenant and per capability:

StrategyDescription
PriorityTry providers in a fixed order; fail over to the next on error
Round-robinDistribute requests evenly across providers
WeightedRoute based on configured weight percentages
Least-costPrefer the cheapest available provider
Least-latencyPrefer the provider with the lowest recent latency
Free-tier-firstExhaust free-tier providers before using paid ones
Task-optimizedSelect the best provider based on task type and model capabilities
Cost-optimizedRoute to the cheapest provider based on model pricing
FailoverPriority ordering with automatic demotion of degraded providers
RandomRandomly select a provider for simple load distribution

Architecture Overview

Your Application (OpenAI / Anthropic SDK)
AI Gateway (Express middleware pipeline)
├── Auth ─► Tenant Resolver ─► RBAC ─► Validation
├── Format Detection ─► Normalizer ─► Prompt Guards
├── Budget Check ─► Semantic Cache ─► Usage Tracking
Routing Service (10 strategies, LRU-cached)
Provider Adapter ──► OpenAI / Anthropic / Gemini / ...
Response ─► Cache ─► Usage Tracking ─► Audit Log ─► Client

Who Is This For?

Gatewyse is built for engineering teams that:

  • Use multiple AI providers and need a unified API
  • Want to control costs with budgets and free-tier optimization
  • Require enterprise security: multi-tenancy, RBAC, audit logs, PII guards
  • Need an admin dashboard for non-technical team members to manage providers and routing
  • Want to avoid vendor lock-in while keeping their integration code simple

Tech Stack

ComponentTechnology
RuntimeNode.js 24+, TypeScript (strict)
ServerExpress 5
DatabaseMongoDB 7+ (replica set)
Cache / QueueRedis 7+, BullMQ
Admin UINuxt 4, Vue 3, PrimeVue 4
Real-timeSocket.io
ValidationZod
DeploymentDocker, Kubernetes

Next Steps