Skip to content

lmrouter

Self-hostable API router that puts many AI providers behind one OpenAI-style endpoint

Permissive (OSI) · MIT AI-native

Listed by , founder & editor

18

Health

Dormant

Overview

Stars

319

Last commit

14 months ago

Sep 2025

Repository age

1 year

since Jul 2025

Latest version

–

Contributors

–

Releases

0

last 12 months

Language

TypeScript

LMRouter is a TypeScript API router for AI models. You configure providers and models in a YAML file, and your applications call one endpoint with one API key. It exposes OpenAI-compatible routes for chat completions, responses, image generation and editing, embeddings and audio speech and transcription. It also exposes Anthropic-compatible messages routes.

Providers include OpenAI-compatible services such as Google, Perplexity, Fireworks, Groq and Cerebras, Anthropic-compatible services such as Amazon Bedrock, and Fireworks and Google image models. The server is built on Hono. It runs on Node.js or on Cloudflare Workers. You can start it from a cloned repository with pnpm or run the CLI with pnpx and a config path.

It is MIT licensed and positioned as a self-hosted alternative to OpenRouter. Video, web search and code execution are listed as coming soon. The repository has seen no commits since September 2025.

Who it's for

Developers who want one endpoint for several AI providers

Drop-in OpenAI and Anthropic routes mean existing apps can switch with a base URL change.

Skip if: You need fallback routing or budget limits, which are not documented.

Teams deploying to Cloudflare Workers

The Hono base lets it run at the edge as well as on Node.js.

Skip if: You need a project with active maintenance and regular releases.

Builders mixing text, image and audio models

One router covers chat, images, embeddings and audio under a single key.

Skip if: You need MCP gateway support.

The problem it solves

Using several AI providers means separate accounts, keys and SDK differences. LMRouter gives you one self-run endpoint that speaks the OpenAI and Anthropic APIs and forwards requests to the providers you configure.

Strengths

  • OpenAI and Anthropic compatible routes for existing clients
  • Covers chat, images, embeddings and audio, not only text
  • Runs on Node.js or Cloudflare Workers
  • Providers and models set in a single YAML file
  • MIT license

Trade-offs

  • No commits since September 2025 and no recent releases
  • No documented fallback or budget controls
  • No MCP gateway support
  • Video, search and code execution are not yet available

lmrouter replaces

Self-host lmrouter

Self-hostable
Yes

Quick start

pnpx @lmrouter/cli /path/to/config.yaml

From the project's own install instructions. Check the docs for production settings.

Frequently asked questions

Is LMRouter free?

The code is MIT licensed and you can run it yourself. A hosted service also exists at lmrouter.com.

Can I self-host it?

Yes. Clone the repository, copy the example config, then run it with pnpm or with the pnpx CLI.

Which APIs does it expose?

OpenAI-style routes for chat, responses, images, embeddings and audio, plus Anthropic messages.

Where can it run?

On Node.js or on Cloudflare Workers.

Other OpenRouter alternatives

Compare all 5 OpenRouter alternatives →

Similar tools in LLM gateways and routers

9routerx

LLM gateways and routers

Single-binary local LLM gateway with provider fallback for coding CLI users

268 160 today Thriving MIT

Replaces OpenRouter

jev-style

LLM gateways and routers

Small local decision models that classify text and route requests with calibrated

140 4 19 days ago Active Apache-2.0

Replaces Jev

MindsDB

LLM gateways and routers

Agent workspace for knowledge work and coding, with a choice of models and open agents

40k 6.2k 31 days ago Active MIT

claude-code-router

LLM gateways and routers

Local gateway that routes Claude Code, Codex and other agents to the providers you choose

38k 3.2k 3 days ago Thriving MIT

archgw

LLM gateways and routers

AI-native proxy and data plane for routing, guarding and tracing agent traffic

7.1k 499 30 days ago Active Apache-2.0

gpt-load

LLM gateways and routers

Self-hosted gateway that pools LLM API keys and subscriptions behind one endpoint

7.2k 799 today Thriving MIT