OpenRouter alternatives: LiteLLM, Vercel, Cloudflare and more
Alternatives to OpenRouter in November 2026: the self-hosted LiteLLM proxy, the Vercel and Cloudflare AI Gateways, Requesty, direct APIs and local models.
If you want to run the gateway yourself, use the LiteLLM proxy: it is open source (MIT outside its enterprise/ folder), gives you one OpenAI-compatible endpoint on port 4000 in front of your own provider keys, and adds virtual keys with budgets, so there is no gateway fee and each provider bills you directly. If you want another hosted gateway, Vercel AI Gateway states no markup and no platform fee on tokens, Cloudflare AI Gateway’s core features are free with a 5% fee on credits bought through its Unified Billing, and Requesty adds 5% to per-token prices. If you only use one maker’s models, its own API removes the middle layer, at the cost of fallbacks and one bill. For nothing to leave the machine, run a local model with Ollama or LM Studio.
What you are replacing
OpenRouter gives you one key and one endpoint for many providers, one prepaid balance, and routing: with a list of models it will, in its fallback docs’ words, “automatically try the next model in the list” when the first errors. Its prices and fee are in OpenRouter pricing and fees, and what it and the providers behind it keep of your prompts is in OpenRouter privacy. Read those first if the reason you are leaving is a number or a data policy: OpenRouter’s own settings may already cover it.
Every alternative below keeps part of that and gives up another. A self-hosted gateway keeps the one endpoint but not the one bill. Another hosted gateway keeps both but moves your trust to a different company. Going direct keeps nothing but the model.
The options side by side
As each maker’s pages stated them on November 25, 2026:
| Option | What it is | Runs where | How it charges | API shape |
|---|---|---|---|---|
OpenRouter | Multi-provider gateway and reseller | Hosted | List price per token; a fee on credit purchases (details) | OpenAI-compatible, including Responses; Claude Code through its Anthropic base URL |
LiteLLM proxy | Open-source gateway in front of your own keys | Self-hosted | Free software; each provider bills you. Paid Enterprise licence for SSO past 5 users, audit logs | OpenAI-compatible, plus /v1/messages and /responses |
Portkey gateway | Open-source gateway (MIT) | Self-hosted | Free software; each provider bills you | OpenAI-compatible |
Vercel AI Gateway | Hosted multi-provider gateway | Hosted | Provider list price, no markup or platform fee on tokens; payment processing fees and opt-in surcharges extra | OpenAI Chat Completions and Responses, Anthropic Messages |
Cloudflare AI Gateway | Caching, rate limits, logs and routing in front of providers | Hosted | Core features free; 5% fee on Unified Billing credits, inference at provider rates | OpenAI-compatible chat completions; each provider’s own API passed through (Anthropic Messages, OpenAI Responses) |
Requesty | Hosted multi-provider gateway | Hosted | 5% markup on per-token prices, with your own keys too | OpenAI-compatible, plus Anthropic Messages |
A provider’s own API | Anthropic, OpenAI, Google directly | Hosted by the maker | The maker’s price, no middle layer | Native; Anthropic and Google also offer OpenAI-compatible layers |
Ollama, LM Studio | Local model servers | Your hardware | Nothing per token | OpenAI-compatible |
Self-hosted: the LiteLLM proxy (OpenRouter vs LiteLLM)
The difference is who holds the provider accounts. OpenRouter is a company you pay, which pays the providers. LiteLLM is software: in its own words, “a self-hosted server” that “gives your applications one OpenAI-compatible endpoint for 100+ LLM providers”. You put your Anthropic, OpenAI or Google keys in its config, and each provider bills you for what you use. The licence is MIT for everything outside litellm/enterprise/; the Enterprise page lists virtual keys, budgets and rate limits in the open-source tier, and keeps SSO past five users and audit logs for the paid licence.
Install it and write a config with your models:
uv tool install 'litellm[proxy]'Copied# config.yaml
model_list:
- model_name: claude-sonnet-5-5
litellm_params:
model: anthropic/claude-sonnet-5-5
api_key: os.environ/ANTHROPIC_API_KEY
- model_name: via-openrouter
litellm_params:
model: openrouter/<openrouter-model-id>
api_key: os.environ/OPENROUTER_API_KEY
general_settings:
master_key: os.environ/LITELLM_MASTER_KEY # the admin key; must start with sk-Copiedlitellm --config config.yaml --host 127.0.0.1 # port 4000; admin UI at /uiCopiedThe os.environ/ form reads each key from the environment, the master key included, so no secret is written in the file; export LITELLM_MASTER_KEY and the provider keys in the shell that starts the proxy. LiteLLM listens on 0.0.0.0 by default, every interface of the machine; --host 127.0.0.1 keeps it to the machine itself. The second entry shows that the two are not either-or: LiteLLM can route to OpenRouter with the openrouter/ prefix, so you can move models off it one at a time. Fallbacks between entries go under litellm_settings as a fallbacks list. If other machines need it, give --host the machine’s address on a private network, never one the internet can reach.
Virtual keys are what replace OpenRouter’s per-key credit limits, and they need a Postgres database (DATABASE_URL). With one connected, the master key mints a key with its own budget that resets on a schedule:
curl http://localhost:4000/key/generate \
-H "Authorization: Bearer $LITELLM_MASTER_KEY" \
-H "Content-Type: application/json" \
-d '{"max_budget": 10, "budget_duration": "30d"}'CopiedOnce a key passes its budget, requests fail with an error that includes:
ExceededTokenBudget: Current spend for token: ...; Max Budget for Token: ...CopiedFor a coding agent, the proxy serves more than chat completions. It has an Anthropic-style /v1/messages endpoint, and LiteLLM’s Claude Code tutorial points Claude Code at it with ANTHROPIC_BASE_URL set to the proxy and ANTHROPIC_AUTH_TOKEN set to a virtual key, which reaches only the models that key was granted. It also serves OpenAI’s /responses API for all its providers, bridging to chat completions where a provider has no Responses endpoint, which matters for Codex, since current Codex accepts only wire_api = "responses" (the OpenRouter setup guide for Codex, OpenCode and Claude Code shows the provider block Codex reads).
The other open-source gateway with the same shape is Portkey’s, MIT-licensed, started with npx @portkey-ai/gateway and listening on http://localhost:8787/v1. If you only need Claude Code on other models, a lighter local router is covered in Claude Code Router.
Other hosted gateways
Vercel AI Gateway is a hosted API at https://ai-gateway.vercel.sh, and its docs say “your application does not need to run on Vercel”; you need a Vercel account for the key and billing. It speaks OpenAI Chat Completions, OpenAI Responses and Anthropic Messages, with provider and model fallbacks and budgets per team, project, key or member. Its pricing page says it “charges no markup and no platform fee on tokens”: you pay list price from prepaid credits, are “responsible for any payment processing fees”, and pay surcharges only for options you turn on (team-wide zero data retention at $0.10 per 1,000 requests, a regional endpoint at 5% of inference cost). The free tier covers a subset of models.
Cloudflare AI Gateway sits in front of providers for caching, rate limiting, logs and fallbacks. Its pricing page says the core features “are offered for free”. You can send your own provider key with each request, or buy credits through Unified Billing, where “a 5% fee is applied to all credits purchased” and provider inference is passed through with no markup. Its OpenAI-compatible endpoint takes models as {provider}/{model}:
https://gateway.ai.cloudflare.com/v1/{account_id}/default/compat/chat/completionsCopiedCloudflare’s chat completion page now calls that endpoint deprecated for standard single-model chat completions and points new integrations at its REST API under api.cloudflare.com; existing ones keep working. The gateway also passes each provider’s own API through, so Anthropic’s Messages API is at:
https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/anthropic/v1/messagesCopiedand OpenAI’s Responses API at the same address with /openai/responses in place of /anthropic/v1/messages.
Requesty is an OpenAI-compatible router at https://router.requesty.ai/v1 (an EU address, router.eu.requesty.ai, is listed too), where provider/model pins one provider, and its quickstart points the Anthropic SDK at https://router.requesty.ai/anthropic/v1/messages. Its pricing page states a 5% markup “on top of the model provider’s per-token pricing”, “including when you bring your own provider keys”, with no platform or seat fees; the free plan is free models at 200 requests a day.
Going direct to the provider
If your agent only ever uses one maker’s models, its own API removes the middle layer and its fee. What you lose is everything OpenRouter added: one key across makers, falling back to another model or provider when one is down or rate-limited, and one bill. With two makers you hold two keys, two balances and two sets of spend limits.
Some clients only speak the OpenAI format, and two makers offer it. Google’s Gemini API takes OpenAI-format requests with a Gemini key at:
https://generativelanguage.googleapis.com/v1beta/openai/CopiedAnthropic’s is https://api.anthropic.com/v1/, but its docs call it “primarily intended to test and compare model capabilities” and not production-ready for most uses, and it does not support prompt caching, which an agent’s long, repeated prompts lean on. Claude Code speaks Anthropic’s native API anyway, so for Claude models the plain Anthropic key is the direct route. Which model is worth paying for in an agent is a separate question, taken up in the best model for OpenClaw.
Local models
Ollama serves an OpenAI-compatible API at http://localhost:11434/v1/ (it needs an API key value but ignores it), and LM Studio at http://localhost:1234/v1; both list a /v1/responses endpoint, Ollama’s in its stateless form only. The model has to handle tool calls and a long context to drive an agent; setups are in Claude Code with Ollama and OpenClaw with Ollama.
Which to pick
- Privacy, or a gateway you control: the LiteLLM proxy (or Portkey’s) on your own machine, with each provider’s key. No third party sits between you and the provider, though the provider still receives every prompt under its own terms. If prompts must not leave the machine at all, only a local model does that.
- Cost: going direct, or LiteLLM in front of your own keys, has no gateway charge. Among hosted gateways, Vercel states no fee on tokens beyond payment processing and options you enable; Cloudflare’s fee applies only to credits bought through it; Requesty’s 5% applies to every token.
- An agent that needs tool calling across models: you need the API your agent speaks. Claude Code needs Anthropic Messages, which OpenRouter, Vercel AI Gateway, Requesty and the LiteLLM proxy serve across models, and Cloudflare passes through to Anthropic’s own models; Codex needs the Responses API, which OpenRouter, Vercel AI Gateway and the LiteLLM proxy serve across models, and Cloudflare passes through to OpenAI’s. A gateway that offers only chat completions suits the clients that speak that format. Whichever you choose, test a task that uses tools, not a one-line chat, because a model can answer text and still fail tool calls.