Local-first · self-hosted · your keys

Stop overpaying for AI coding.

Point Claude Code, Codex or Cursor at one endpoint. merido pools every account and free tier you already pay for, routes each request to the cheapest model that can do the job, fails over when one gets throttled — and shows you the dollars it saved.

macOS & Linux
# install, then run — that's the whole thing
curl -fsSL https://merido.dev/install.sh | sh
merido start # → http://127.0.0.1:8788
coding clis Claude Code Codex Cursor Cline Continue
merido one endpoint
40+ providers OpenAI Anthropic Gemini OpenRouter GLM · Kiro · more
40+ providers 1 static binary BYOK · your keys local-first encrypted at rest no telemetry

Works with your stack

01where the money goes

Three leaks.
One fix.

Your AI coding spend leaks in three predictable places. merido plugs each one behind a single endpoint — here's the before and after.

The leak What merido does

The bill climbs every month

Token spend balloons and you can't see which calls are wasteful or which model is overkill for the task.

Cheapest capable model, every call

Each request routes to the cheapest model that can do the job, and bloated tool_result output is compressed losslessly.

You keep hitting rate limits

One account throttles and you're blocked mid-task, watching a retry timer while the work just waits.

Pooled accounts, instant failover

Every account and free tier sits behind one name, and a four-tier fallback keeps you coding the moment one provider blinks.

You pay for capacity you never use

Subscriptions, API keys and free tiers sit idle because your CLI only ever knows one endpoint at a time.

One endpoint, all your lanes

merido fans out across every provider and account you own, so the capacity you already pay for finally gets used.

02★ the differentiator

Every gateway shows what you spent.
merido shows what you're wasting.

The Token-Optimization Advisor reads your real traffic per CLI and project, finds the waste, and suggests concrete fixes you apply in one click. Every fix lands in a savings ledger, so you can see exactly how many tokens and dollars merido saved you, and whether it paid for itself.

  • Compresses bloated tool_result output, losslessly.
  • Flags requests that would be cheaper on another model.
  • Surfaces prompt-cache opportunities and spend anomalies.
  • Books every saving as real dollars, with an ROI you can share.
advisor · this week live
38.2% fewer tokens vs. baseline · ~$214 saved
  • −21% Compress tool_result · claude-code
  • −$0.42/run Route refactors to a cheaper tier
  • cache Enable prompt cache on system prefix

Illustrative example — merido reports the real numbers from your own traffic.

03how it works

Three steps to lower bills.

  1. 01

    Install & start

    One static binary with embedded SQLite. Run two commands and the API plus the dashboard come up on a single local port — no toolchain, no dependencies.

  2. 02

    Point your CLI at it

    Set your tool's base URL to merido and drop in a key. Claude Code, Codex, Cursor, Cline and Continue all work out of the box — nothing else changes.

  3. 03

    Route, save & prove

    merido pools your accounts, routes each call to the cheapest capable model, fails over automatically, and books every saving into the ledger.

Under the hood: one translation core, every wire format, streaming kept intact. Read the architecture →

04what makes it stronger

Everything else,
built right in.

Smart routing

Spread requests across every account and free tier you have. merido routes by cost and latency, balances load, dedupes identical calls, serves a semantic cache, and runs a four-tier fallback chain that keeps you coding when a provider blinks.

all your accountscost-awareload-balanced4-tier fallback

Reliability

Circuit breakers, active & passive health checks, per-key rate limits, smart retry.

Multimodal

Images, embeddings, audio (TTS + STT), sandboxed MCP and WASM plugins.

Observability

OpenTelemetry, Prometheus, a queryable audit log, and a live request stream.

Security & secrets

Encryption at rest for every credential, argon2 auth, and a BYOK vault. Your keys never leave your machine.

encrypted at restargon2BYOK vault
05virtual models

One model ID.
A whole fallback strategy.

Define a client-callable model that fans out to an ordered list of real provider/model targets. merido rotates and fails over on its own, while your CLI keeps calling one name.

  • failover drops to the next target when one is down.
  • load_balance spreads load across healthy targets.
  • cost_optimized prefers the cheapest capable target.
  • latency_based picks the fastest responder.
virtual-model · "smart-sonnet"
strategy: failover
targets:
  - anthropic/claude-sonnet
  - openrouter/claude-sonnet
  - gemini/gemini-2.5-pro

# your CLI just calls:
model: "smart-sonnet"
06quick start

Running in two commands.

One command installs the merido binary; the next starts it. A single binary serves the API, the dashboard, and this page from one port — no toolchain, no dependencies.

macOS & Linux
# 1 · install merido
curl -fsSL https://merido.dev/install.sh | sh

# 2 · run the gateway (embedded SQLite)
merido start
  → http://127.0.0.1:8788
Windows (PowerShell)
# 1 · install merido
irm https://merido.dev/install.ps1 | iex

# 2 · run the gateway (embedded SQLite)
merido start
  → http://127.0.0.1:8788

Then merido keys create, merido providers add, and merido gain to see what you've saved.

07learn more

Guides & tools.

Cost Calculator

Estimate your real monthly Claude Code spend and see how much merido can save you.

The blog →

Deep dives on AI cost control, routing strategy, and getting more from every token.

08faq

Questions, answered.

What is merido?

A local-first AI gateway written in Rust. It sits between your AI coding tools (Claude Code, Codex, Cursor, Cline, Continue) and 40+ upstream LLM providers. It translates formats, compresses tool output to save tokens, and fails over so one outage never stops you.

Which providers and coding CLIs are supported?

merido speaks an OpenAI-compatible API and routes to 40+ providers including OpenAI, Anthropic, Google Gemini, OpenRouter, GLM and Kiro. Any CLI targeting an OpenAI or Anthropic endpoint works out of the box.

Is merido's source code available?

No. merido is a proprietary product. You download a single static binary and self-host it, bringing your own provider keys and your own billing. Every feature ships in that one binary.

How does the Token-Optimization Advisor work?

It analyzes your real usage, detects token waste per CLI and project, and recommends concrete changes like compressing tool results, switching to a cheaper model, or enabling prompt caching. You apply them behind a guarded probation window with auto-rollback.

Can I run merido locally?

Yes. The default local profile runs as a single binary with embedded SQLite, serving both API and dashboard from one port (8788). A cloud profile adds Postgres, Redis and multi-tenancy when you scale.

How is it different from other AI gateways?

A clean-room reimplementation in Rust with a single translation core, a built-in Token-Optimization Advisor, and one self-hosted binary that serves both the API and a full operator dashboard. It's Helicone-header compatible, so existing clients point at it directly.

one binary · your keys, your billing

Stop watching tokens drain.
Start routing smarter.

Every feature ships in a single binary you self-host. Bring your own keys.