9Router on AWS: One Endpoint for Every AI Coding Tool You Use
Every AI coding setup hits the same wall eventually. Claude Code is pointed at one provider, Cursor at another, Codex is on a separate API key entirely, and the moment one of them hits its rate limit mid-task, whatever you were doing just stops. You either wait it out, or you go rewire a config file while the deadline stays exactly where it was.
Meetrix packaged 9Router into an AWS Marketplace CloudFormation stack that deploys to a single EC2 instance in your own AWS account. One OpenAI-compatible endpoint, 40+ providers behind it, automatic fallback when one runs dry, and nginx already tuned for the long-lived streaming connections coding agents depend on. Ready to try it? Launch the Meetrix 9Router stack on AWS Marketplace.
What Is 9Router?
9Router is a self-hosted AI routing proxy, not another model provider. It sits between your coding tools and whatever LLM accounts you have, and exposes a single OpenAI-compatible endpoint for all of them. Point Claude Code, Cursor, Codex, Cline, or Copilot at it once, and it handles the translation between OpenAI, Claude, and Gemini request formats underneath, so the tool never needs to know which provider answered. The container ships as decolua/9router on Docker Hub.
Day to day, the fallback chain is what matters. Connect a subscription, a cheaper pay-as-you-go option, and a free tier like Kiro AI or OpenCode Free, and 9Router works through them in that order automatically when one hits quota. There's also a built-in RTK token saver that compresses tool output before it reaches the model, cutting input tokens by roughly 20-40% depending on how verbose your workflow's tool calls are.
What Routing Through a Hosted Middleman Actually Costs
How to Deploy 9Router on AWS
Setting this up by hand means picking a base image, installing Docker, wiring nginx to not buffer server-sent events (coding agents stream, and a default nginx config will silently break that), and scripting your own SSL renewal (a DNS-01 challenge if the server isn't publicly reachable on port 80) before a single request gets routed. Through the Marketplace, it's four steps:
- Subscribe and Launch from AWS Marketplace Open the Meetrix 9Router listing, subscribe, and launch the CloudFormation stack. t3a.small is the recommended instance size for a single user or small team.
- SSL and the Streaming Proxy Are Already Configured nginx ships tuned for Server-Sent Events, no buffering, long timeouts, so streaming responses don't cut off mid-answer. SSL issues automatically through Let's Encrypt if your domain sits on a Route53 hosted zone.
- Wait for Boot, Then Log In Give the instance a few minutes, then open the dashboard URL from the stack's Outputs tab and log in with the InitialPassword you set as a stack parameter. There's no separate username.
- Connect a Provider and Point Your Tools at the Endpoint Add a provider from the dashboard, free tier or your own key, then copy your API key from the Endpoint page and set your coding tool's base URL to your domain's /v1 path.
What Meetrix Brings to This Deployment
- 9Router v0.5.59 comes pre-pulled on Ubuntu 26.04, and nginx is already set up for streaming. That's the config you'd otherwise be debugging after your first cut-off response.
- Let's Encrypt certificates renew on their own through Route53. No certbot dance every 90 days.
- SQLite state sits on a persistent gp3 EBS volume, with a one-command script to push a backup to S3.
- ufw, unattended-upgrades and the SSM agent are on from the first boot.
- Flat pricing. The software fee is the same at ten requests a day or ten thousand; only the instance size changes the bill.
- Support from the engineers who build this AMI, at aws@meetrix.io, with a reply inside 12 hours.
Who Is 9Router on AWS Right For?
This fits anyone whose AI coding setup has outgrown a single provider and a single API key. More specifically, it's a strong match if you're:
- A developer running Claude Code, Cursor, or Codex who's tired of a rate limit stopping work mid-task (or running an agent platform like OpenHands that burns through tokens overnight)
- A team stacking a subscription, a cheap provider, and a free tier, and wants the fallback between them handled automatically instead of by hand
- Someone who priced out OpenRouter's 5.5% fee against a real month of usage and wants to know what self-hosting the same routing looks like instead
- A developer who wants tool output compressed before it hits the model, since input tokens add up fast on long agent sessions
- A compliance-conscious team that needs provider API keys and request history to stay inside its own AWS account, not routed through a third party's servers. If the models themselves also have to stay in-house, vLLM on AWS serves open-weight models on your own GPU instance.
- Anyone standardizing several coding tools on one endpoint instead of maintaining separate provider configs per tool
9Router on AWS by Meetrix vs Alternatives
| Feature | 9Router on AWS by Meetrix | OpenRouter | LiteLLM (Self-Hosted Manual) | No Gateway (Direct API Keys) |
|---|---|---|---|---|
| Hosting | Your own AWS account, fully self-hosted | OpenRouter's cloud, no self-host option | Your own server, set up by you | No gateway, each tool talks to its provider directly |
| License | Open source, self-hosted | Proprietary | Open source core, enterprise tier from roughly $250/month | Not applicable |
| Pricing Model | Flat AWS instance rate from $0.001/hr, no per-request fee | 5.5% fee on every credit purchase (5% on crypto), on top of provider cost | Free core proxy, but you carry compute, database, and ops cost | No extra fee, but no fallback or format translation either |
| Automatic Fallback | Yes, subscription to cheap to free, configured out of the box | No automatic multi-tier fallback between your own accounts | Possible, but you configure and maintain the routing rules yourself | None, a dead provider means a dead tool |
| Format Translation | OpenAI, Claude, and Gemini formats, one endpoint | OpenAI-compatible endpoint, hosted | Yes, once you've configured it | None, each tool needs its provider's native format |
| Deployment Time | Minutes via CloudFormation | Instant signup | Hours, Docker, database, nginx, SSL by hand | None, but no benefits either |
| Data Location | Your own AWS account | OpenRouter's infrastructure | Your server | Each provider's infrastructure separately |
| Support | Meetrix engineers, response inside 12 hours | Support tiers, gated by plan | Community forums, or a paid enterprise contract | Whatever each provider offers |
Resources
Under the Hood
What's running once the stack finishes deploying:
9Router v0.5.59 in Docker
Runs as the decolua/9router:0.5.59 container on Ubuntu 26.04 LTS, pre-pulled so the first boot doesn't spend its first few minutes downloading images.
nginx Tuned for Streaming
Configured specifically for Server-Sent Events, no response buffering and long timeouts, since coding agents depend on a stream that doesn't get cut off mid-response.
SSL via Route53 DNS-01
Let's Encrypt certificates issue automatically through the Route53 DNS-01 challenge when your domain's hosted zone lives there.
SQLite on Persistent EBS
State lives in the 9router-data Docker volume at /app/data/db/data.sqlite, on a persistent gp3 volume that survives a stop and restart on its own.
A Script, Not a Schedule
/opt/scripts/dbbackup.sh pushes a gzipped copy of the database to your S3 bucket, but nothing runs it automatically. Add a cron entry if you want regular backups.
ufw, Unattended Upgrades, and SSM
The base image ships with a firewall active, automatic security patching enabled, and the SSM agent running for console access without opening SSH wider than you need to.
One Thing 9Router Won't Do For You
It won't back itself up on a schedule. The database survives a stop and restart because it lives on a persistent EBS volume, but the S3 backup script only runs when you or a cron job tells it to. Skip that step and a bad instance replacement could cost you routing history and provider configuration you'd rather not rebuild from memory. It's a five-minute cron entry. Set it up on day one.
Choosing which open models to route to? Our roundup of the best self-hosted LLMs is a good place to start.
Frequently Asked Questions
What does 9Router do?
It sits between your AI coding tools and your model providers and exposes one OpenAI-compatible endpoint. Claude Code, Cursor, Codex, Cline or Copilot all point at it, and it translates between OpenAI, Claude and Gemini request formats.
Do I need my own provider accounts?
You need at least one connected provider, but it can be free. 9Router supports 40+ providers, including free tiers like Kiro AI and OpenCode Free, alongside subscriptions or your own Anthropic, OpenAI or Google keys.
What happens when a provider hits its rate limit mid-task?
9Router falls back automatically: subscription first, then a low-cost provider, then a free one. A quota wall on one provider no longer stops your coding tool.
What is the 9Router price on AWS?
The software fee is flat. The EC2 instance runs from $0.001/hour on a t2.micro to $0.024/hour on a t2.medium, t3.large or c5.large; t3a.small at $0.019/hour suits one user or a small team. Provider charges are separate.
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 figure depends on how verbose your workflow's tool output is.
What is the 9Router base URL for Claude Code or Cursor?
Use https://your-domain/v1 with the API key from the dashboard's Endpoint page, and pick models as provider/model, for example kr/claude-sonnet-4.5. Any tool that speaks the OpenAI API format works the same way.
Is my data backed up automatically?
No. State lives in SQLite on a persistent EBS volume, so it survives a stop and restart. /opt/scripts/dbbackup.sh pushes a gzipped copy to S3, but nothing schedules it; add a cron entry.
Where does everything run?
On the EC2 instance in your own AWS account. Provider keys, routing rules and request history stay there behind nginx with SSL, not on Meetrix's infrastructure or a third party's billing layer.
Run Your Own AI Router on AWS
Stop paying a per-request fee to route your own API calls. Deploy 9Router on AWS in minutes, set up by a team that runs this stack every day.
Deploy on AWS Marketplace