> Source: https://meetrix.io/store/9router/
> Markdown copy of that page. Cite the URL above, not this file.

[Store](https://meetrix.io/store/)  9Router

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.

 [Launch on AWS](https://aws.amazon.com/marketplace/pp/prodview-2gbwfgt76llgq)[ Launch on Google Cloud](https://console.cloud.google.com/marketplace/product/meetrix-public/ninerouter-llm-gateway)

-   Ready in 3-5 minutes
-   Automatic fallback
-   No per-request markup

![9Router AI gateway deployed on AWS by Meetrix](https://meetrix.io/assets/store/9router/9router.webp)

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

-   ### One endpoint

    Every OpenAI-compatible tool uses the same base URL and API key.

-   ### 40+ providers

    Free tiers, paid subscriptions or your own Anthropic, OpenAI and Google keys.

-   ### Automatic fallback

    Subscription, then low-cost, then free, without stopping your tool.

-   ### Format translation

    Converts between OpenAI, Claude and Gemini request formats.

-   ### RTK token saver

    Compresses tool output to cut input tokens.

-   ### Quota tracking

    Keeps an eye on usage and refreshes provider tokens for you.

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

-   9Router in Docker on Ubuntu, with the image pre-pulled
-   nginx tuned for Server-Sent Events streaming
-   Automatic Let's Encrypt SSL for your domain
-   SQLite data on a persistent disk, plus a backup script
-   ufw firewall and unattended security upgrades
-   Email support from Meetrix at support@meetrix.io

## 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 on AWS

An AMI on AWS Marketplace, launched into your own AWS account with a CloudFormation stack.

Deploys with

CloudFormation

Recommended size

t3a.small

Ready in

3-5 minutes

#### Setup guides

-   [**Developer guide** Launch, SSL, providers, CLI tools](https://meetrix.io/blogs/9router-developer-guide/)
-   [**9Router on AWS Marketplace** Fallback, pricing and alternatives](https://meetrix.io/blogs/9router-aws-marketplace/)

 [Launch on AWS](https://aws.amazon.com/marketplace/pp/prodview-2gbwfgt76llgq)

### 9Router on Google Cloud

The same gateway as a Google Cloud Marketplace image, deployed into your own GCP project.

Deploys with

Marketplace deployment form

Recommended size

e2-small

Free trial

5 days, up to USD 50 licence credit

#### Setup guides

-   [**Developer guide** Configure, SSL, providers, backups](https://meetrix.io/blogs/ninerouter-gcp-developer-guide/)
-   [**9Router on GCP Marketplace** Fallback, pricing and alternatives](https://meetrix.io/blogs/ninerouter-llm-gateway-gcp/)

 [Launch on Google Cloud](https://console.cloud.google.com/marketplace/product/meetrix-public/ninerouter-llm-gateway)

## 9Router by Meetrix vs OpenRouter vs LiteLLM

|  | 9Router by Meetrix | OpenRouter | LiteLLM (self-managed) |
| --- | --- | --- | --- |
| Hosting | Your AWS account or GCP project | OpenRouter's cloud, no self-host option | Your own server, set up by you |
| Pricing model | Flat instance rate, no per-request fee | A fee on every credit purchase | Free core, but you carry compute and ops |
| Automatic fallback | Subscription to low-cost to free, out of the box | No multi-tier fallback between your own accounts | Possible, with rules you maintain |
| Setup | Minutes from the marketplace | Instant signup | Hours: 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 →](https://meetrix.io/blogs/9router-aws-marketplace/)

## 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

### [9Router on AWS Marketplace: a Self-Hosted AI Router with Fallback](https://meetrix.io/blogs/9router-aws-marketplace/)

One endpoint for every AI coding tool you use.

### [9Router on AWS: Developer Guide](https://meetrix.io/blogs/9router-developer-guide/)

Launch the stack, connect a provider and wire up your CLI tools.

### [9Router on GCP: Developer Guide](https://meetrix.io/blogs/ninerouter-gcp-developer-guide/)

Deploy 9Router on Google Cloud and route every coding tool through it.

## 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](https://meetrix.io/contact-us/)
