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. Budgets at the deployment, organization, department, user and API-key level, 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. Organization and department scoping, RBAC with 6 default roles, API key management, PII detection, prompt injection guards, and immutable audit logs.
- Your keys, your rules. Provider credentials are configured once as the deployment catalogue, and any organization or department can point a provider at its own key so its traffic bills to its own account. See Scope Overrides.
Supported Providers
Gatewyse ships 49 provider adapters — 42 cloud and 7 self-hosted:
| Group | Providers |
|---|---|
| Frontier / cloud | OpenAI, Anthropic, Google Gemini, Azure OpenAI, xAI (Grok), Mistral AI, Cohere, DeepSeek, Moonshot AI (Kimi), Zhipu / Z.AI (GLM), Alibaba DashScope (Qwen), MiniMax |
| Inference platforms | Groq, Together AI, Perplexity, Fireworks AI, Replicate, AI21 Labs, HuggingFace, Cerebras, SambaNova, DeepInfra, Cloudflare Workers AI, Lambda Labs |
| Serverless open-model clouds | Novita AI, SiliconFlow, Nebius AI Studio, Baseten, Hyperbolic, NVIDIA NIM |
| Hyperscaler | AWS Bedrock (open-weight models, OpenAI-compatible), AWS Bedrock (Claude), Google Vertex AI (open-weight models, OpenAI-compatible), Google Vertex AI (Claude) |
| Meta-provider | OpenRouter |
| Embeddings, rerank, speech | Voyage AI, Jina AI, Deepgram, Cartesia |
| Media | Stability AI, ElevenLabs, AssemblyAI |
| Self-hosted | Ollama, vLLM, LM Studio, LocalAI, llama.cpp, Whisper (Local), ComfyUI |
Claude on Bedrock and Vertex has its own adapter. bedrock and vertex
serve the open-weight models over an OpenAI-compatible surface;
bedrock-anthropic and vertex-anthropic speak the Anthropic Messages API,
which is what Claude actually requires on those platforms. Pick the Anthropic
variant when the model is a Claude model.
Routing Strategies
The gateway provides 11 routing strategies, configurable per scope and per capability:
| Strategy | Description |
|---|---|
| Priority | Try providers in a fixed order; fail over to the next on error |
| Round-robin | Distribute requests evenly across providers |
| Weighted | Route based on configured weight percentages |
| Least-cost | Prefer the cheapest available provider |
| Least-latency | Prefer the provider with the lowest recent latency |
| Free-tier-first | Exhaust free-tier providers before using paid ones |
| Task-optimized | Select the best provider based on task type and model capabilities |
| Cost-optimized | Route to the cheapest provider based on model pricing |
| Failover | Priority ordering with automatic demotion of degraded providers |
| Random | Randomly select a provider for simple load distribution |
| Review-panel | Ask the whole top priority level at once, then make a further call to reconcile their answers into one |
cost-optimized is an alias of least-cost — both rank on the same combined
per-million-token rate.
Ten of the eleven return an ordered chain the gateway walks until one provider succeeds. Review-panel does not. It runs every member of the top priority level concurrently and then makes an additional synthesis call, so it costs several completions per request and cannot be streamed — there is nothing to stream until every panel member has finished.
Architecture Overview
Your Application (OpenAI / Anthropic SDK) │ ▼AI Gateway (Express middleware pipeline) ├── Auth ─► Scope Resolver ─► RBAC ─► Validation ├── Format Detection ─► Normalizer ─► Prompt Guards ├── Budget Check ─► Semantic Cache ─► Usage Tracking │ ▼Routing Service (11 strategies, LRU-cached) │ ▼Provider Adapter ──► OpenAI / Anthropic / Gemini / ... │ ▼Response ─► Cache ─► Usage Tracking ─► Audit Log ─► ClientWho 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: organization and department scoping, 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
| Component | Technology |
|---|---|
| Runtime | Node.js 24+, TypeScript (strict) |
| Server | Express 5 |
| Database | MongoDB 7+ (single node; a replica set only for encryption-key rotation) |
| Cache / Queue | Redis 7+, BullMQ |
| Admin UI | Nuxt 4, Vue 3, PrimeVue 4 |
| Real-time | Socket.io |
| Validation | Zod |
| Deployment | Docker, Kubernetes |
Next Steps
- Installation — set up Gatewyse locally
- Quick Start — make your first API call in 5 minutes
- Configuration — understand environment variables and feature flags