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. 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:

GroupProviders
Frontier / cloudOpenAI, Anthropic, Google Gemini, Azure OpenAI, xAI (Grok), Mistral AI, Cohere, DeepSeek, Moonshot AI (Kimi), Zhipu / Z.AI (GLM), Alibaba DashScope (Qwen), MiniMax
Inference platformsGroq, Together AI, Perplexity, Fireworks AI, Replicate, AI21 Labs, HuggingFace, Cerebras, SambaNova, DeepInfra, Cloudflare Workers AI, Lambda Labs
Serverless open-model cloudsNovita AI, SiliconFlow, Nebius AI Studio, Baseten, Hyperbolic, NVIDIA NIM
HyperscalerAWS Bedrock (open-weight models, OpenAI-compatible), AWS Bedrock (Claude), Google Vertex AI (open-weight models, OpenAI-compatible), Google Vertex AI (Claude)
Meta-providerOpenRouter
Embeddings, rerank, speechVoyage AI, Jina AI, Deepgram, Cartesia
MediaStability AI, ElevenLabs, AssemblyAI
Self-hostedOllama, 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:

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
Review-panelAsk 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 ─► 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: 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

ComponentTechnology
RuntimeNode.js 24+, TypeScript (strict)
ServerExpress 5
DatabaseMongoDB 7+ (single node; a replica set only for encryption-key rotation)
Cache / QueueRedis 7+, BullMQ
Admin UINuxt 4, Vue 3, PrimeVue 4
Real-timeSocket.io
ValidationZod
DeploymentDocker, Kubernetes

Next Steps