Open-source LLM gateway

Self-hosted 9Router AI gateway on AWS and Google Cloud

Point Claude Code, Codex, Cursor, Cline and Copilot at one OpenAI-compatible endpoint and let 9Router route across 40+ LLM providers. It falls back automatically when a provider hits its limit, and it runs in your own cloud account with no per-request fee.

  • Ready in 3-5 minutes
  • Automatic fallback
  • No per-request markup
9Router AI gateway deployed on AWS by Meetrix

What is 9Router?

9Router is an open-source smart router that sits between your AI coding tools and your model providers. It exposes one OpenAI-compatible endpoint, translates requests between OpenAI, Claude and Gemini formats, tracks quota and refreshes tokens. When a provider runs out, it falls back from subscription to low-cost to free providers so your tools keep working.

What's in the Meetrix 9Router image

Running 9Router properly needs a streaming-friendly reverse proxy, SSL, persistent storage and a hardened server. The marketplace image ships that stack wired together.

How to set up a self-hosted 9Router gateway

  1. Launch the server

    Subscribe on AWS Marketplace or Google Cloud Marketplace, set your domain, admin email and initial dashboard password, and deploy.

  2. Sign in

    Point your domain at the server, open the dashboard and log in with the initial password (there is no username). Change it straight away.

  3. Connect a provider

    Add at least one provider: a free tier such as Kiro AI, a paid subscription, or your own API key.

  4. Point your tools at it

    Copy the API key from the Endpoint page, set your tool's base URL to https://your-domain/v1 and choose a model as provider/model.

Choose your cloud

9Router by Meetrix vs OpenRouter vs LiteLLM

9Router by MeetrixOpenRouterLiteLLM (self-managed)
HostingYour AWS account or GCP projectOpenRouter's cloud, no self-host optionYour own server, set up by you
Pricing modelFlat instance rate, no per-request feeA fee on every credit purchaseFree core, but you carry compute and ops
Automatic fallbackSubscription to low-cost to free, out of the boxNo multi-tier fallback between your own accountsPossible, with rules you maintain
SetupMinutes from the marketplaceInstant signupHours: Docker, database, nginx, SSL

Your connected providers still bill you for tokens, as they would without a router. Read the full 9Router on AWS comparison →

9Router FAQ

What is 9Router?

An open-source smart router between your AI coding tools and your model providers. It exposes one OpenAI-compatible endpoint, translates between OpenAI, Claude and Gemini formats, tracks quota and falls back automatically when a provider runs out.

Which providers can I connect?

More than 40. Start with a free tier such as Kiro AI, connect a paid subscription, or add your own API key for Anthropic, OpenAI or Google. 9Router routes across everything you connect.

How do I point Claude Code or Cursor at it?

Copy your API key from the Endpoint page in the dashboard, set the tool's base URL to https://your-domain/v1 and pick a model in the form provider/model. Any OpenAI-compatible tool works the same way.

How do I log in the first time?

Use the initial password you set at deployment; the username field is not used. Change the password from the dashboard after your first login.

How much does the RTK token saver save?

Roughly 20-40% of input tokens, by compressing tool output before it reaches the model. The exact saving depends on how verbose your tools' output is.

Is my data backed up?

State lives in SQLite on a persistent disk and survives restarts. The helper script /opt/scripts/dbbackup.sh takes a gzipped backup (to your S3 bucket on AWS), but it is not scheduled, so run it yourself or add a cron entry.

Which machine size should I choose?

t3a.small on AWS or e2-small on Google Cloud is enough for one user or a small team. Choose a larger machine for heavy concurrent traffic.

Where does everything run?

On the server in your own AWS account or GCP project. Provider keys, routing rules and request history stay there, not on Meetrix's infrastructure or a third-party billing layer.

9Router guides and articles

Need a hand with your AI gateway?

We build and run self-hosted AI infrastructure for teams every day, from provider routing to self-hosted models. Tell us what you need.

Contact us