Alternatives

Top LiteLLM Alternatives

LiteLLM is a strong open-source gateway if you want to run one. If you would rather not operate PostgreSQL, Redis and proxy pods, or you mainly want Chinese models without opening vendor accounts, these are the options to compare.

Facts checked on

On this page

What is LiteLLM?

LiteLLM is an open-source project with two parts. The Python SDK gives your code one completion() call for many providers. The proxy server is a self-hosted gateway: it exposes an OpenAI-compatible API and adds virtual keys, per-key and team budgets, rate limits, load balancing, fallbacks, caching and an admin UI.

The project is MIT-licensed and free. An Enterprise license, priced by deployment size, adds SSO beyond 5 users, audit logs, role-based access, IP allowlists, secret-manager integrations and more. Enterprise runs in your infrastructure too; the pricing page lists no hosted plan.

LiteLLM does not sell model access. Every model in its config points at a provider with your own API key, and each provider bills you directly.

Why teams look for LiteLLM alternatives

You run the infrastructure
LiteLLM鈥檚 production guide requires PostgreSQL, and Redis 7 or newer as soon as you run more than one proxy instance. It recommends at least 1 vCPU and 4 GiB of memory per pod, and the salt key cannot be rotated after deployment.
Governance sits behind a sales-quoted license
Audit logs, RBAC, IP allowlists, SSO beyond 5 users, key-rotation automation and team-based logging are Enterprise features with custom pricing.
You still need every provider account
A gateway does not remove vendor accounts. To reach GLM, Kimi, DeepSeek, Qwen and MiniMax you register with each vendor, fund each account and keep each key in the config.
Supply-chain exposure
On March 24, 2026, LiteLLM releases 1.82.7 and 1.82.8 on PyPI were compromised with a credential stealer. LiteLLM says users of its official proxy Docker image were not affected. Anyone installing the SDK or proxy from PyPI has to pin and audit versions.

How to choose

First decide whether you want a gateway at all. A gateway adds keys, budgets, logs and routing in front of providers you already pay. If you already hold provider keys and need that control layer, compare Cloudflare AI Gateway, Portkey, Vercel and Kong as managed or enterprise replacements for LiteLLM.

If what you really need is the models, a gateway is extra work. A2Agent and OpenRouter sell model access directly: one account, one balance, one key. A2Agent covers GLM, Kimi, DeepSeek, Qwen and MiniMax. OpenRouter also covers Western models and charges a fee on credit purchases.

Check who holds the provider accounts. With LiteLLM, Portkey and Kong you bring every vendor key yourself. Vercel and Cloudflare can bill some providers for you, but neither bills GLM, Kimi, Qwen or MiniMax that way.

You do not have to choose only one. You can keep a gateway for policy and logging and point it at a hosted endpoint for the models. The last section shows how to add A2Agent to LiteLLM.

Top LiteLLM Alternatives at a glance

PlatformFocusKey featuresIdeal for
A2AgentA hosted API endpoint that sells access to Chinese models: GLM, Kimi, DeepSeek, Qwen and MiniMax. You call it with one A2Agent key and pay per token. There is no gateway to deploy and no provider account to open.OpenAI Chat Completions and Responses, Anthropic Messages and Gemini protocols; per-key spend limits, expiry and IP allowlists; usage records in the dashboardTeams that want GLM, Kimi, DeepSeek, Qwen and MiniMax behind one key without running a gateway or opening accounts with each vendor
Cloudflare AI GatewayA managed gateway on Cloudflare鈥檚 network that adds analytics, caching, rate limiting and routing in front of AI providers.Analytics and logs, caching, rate limiting, retries and fallback, dynamic routing, stored keys, Unified BillingTeams already on Cloudflare who want observability and control over providers they already pay
OpenRouterA hosted API that sells access to models from many vendors through one key and one bill, with an OpenAI-compatible endpoint.One key for many vendors, prepaid credits, usage analytics, optional BYOKTeams that want one hosted key across models from many vendors, including OpenAI, Anthropic and Google
PortkeyAn AI gateway and control platform: routing, observability, guardrails and prompt management in front of providers you already pay. Palo Alto Networks completed its acquisition of Portkey on May 29, 2026.Routing and fallback, load balancing, simple and semantic caching, guardrails, budgets, MCP gatewayTeams that bring their own provider keys and want guardrails, prompt management and observability in one managed product
Vercel AI GatewayA managed gateway that also sells model access through AI Gateway Credits. Your app does not need to run on Vercel.OpenAI Chat Completions and Responses, Anthropic Messages, AI SDK; fallbacks, provider ordering, request logs, budgetsTeams on Vercel or the AI SDK that want credits, logs and budgets in one place
Kong AI GatewayAI plugins for the Kong API gateway, self-hosted or run through Kong Konnect with data planes in your environment.Semantic caching, cost-based rate limiting, prompt guardrails, PII redaction, MCP support, OpenTelemetryOrganizations that already run Kong for API management

In-depth look at each alternative

01A2Agent

A hosted API endpoint that sells access to Chinese models: GLM, Kimi, DeepSeek, Qwen and MiniMax. You call it with one A2Agent key and pay per token. There is no gateway to deploy and no provider account to open.

Strengths

  • One key reaches five Chinese model families. You do not open an account, pass verification or hold a key with each vendor.
  • The same key works over OpenAI Chat Completions, OpenAI Responses, Anthropic Messages and Gemini, so existing SDKs and coding tools connect by changing the base URL.
  • Each key can carry a USD spend quota, 5-hour, daily and weekly spend limits, an expiry date and an IP allowlist.
  • Pay as you go from a $1 top-up with no top-up fee. Credits do not expire while your account is active.

Limitations

  • A2Agent is a model provider, not a gateway product. It has no guardrails, prompt management or semantic caching, and its catalog covers the five Chinese model families only.
  • You cannot bring your own vendor keys. Every request is billed from your A2Agent balance.
  • There is no free tier.

Pricing

Per-token billing from a prepaid balance. The minimum top-up is $1 with no top-up fee, and top-ups can earn bonus credit. Purchased credit is refundable within 7 days; bonus credit is not. Per-model rates are listed on the pricing page.

Ideal for

Teams that want GLM, Kimi, DeepSeek, Qwen and MiniMax behind one key without running a gateway or opening accounts with each vendor

02Cloudflare AI Gateway

A managed gateway on Cloudflare鈥檚 network that adds analytics, caching, rate limiting and routing in front of AI providers.

Strengths

  • Analytics, caching and rate limiting are free on all plans.
  • Dynamic routing covers fallbacks, budget limits, conditions and percentage splits.
  • Unified Billing lets you prepay one Cloudflare balance for Workers AI, OpenAI, Anthropic, Google, xAI and Groq.

Limitations

  • Unified Billing covers six third-party providers. Every other provider needs your own key.
  • DeepSeek is the only Chinese vendor among the built-in providers of its OpenAI-compatible endpoint. GLM, Kimi, Qwen and MiniMax need custom providers and your own upstream keys.
  • Unified Billing adds a 5% fee on credit purchases.

Pricing

Core features are free. Logs follow Workers Logs pricing for accounts created on or after September 24, 2026. Unified Billing passes provider prices through and charges 5% on credit purchases.

Ideal for

Teams already on Cloudflare who want observability and control over providers they already pay

03OpenRouter

A hosted API that sells access to models from many vendors through one key and one bill, with an OpenAI-compatible endpoint.

Strengths

  • Nothing to deploy. Point an OpenAI SDK at https://openrouter.ai/api/v1.
  • Covers models from many vendors, not only Chinese ones.
  • Bring-your-own-key usage is free up to $25,000 a month on pay-as-you-go.

Limitations

  • The fee sits on credit purchases: 5.5% by card with a $0.80 minimum, or 5% in crypto.
  • BYOK usage above the monthly free allowance carries a 5% fee.

Pricing

Prepaid credits. OpenRouter states no markup on inference prices and charges the fee when you buy credits. Free models are limited to 50 requests a day without purchased credits.

Ideal for

Teams that want one hosted key across models from many vendors, including OpenAI, Anthropic and Google

04Portkey

An AI gateway and control platform: routing, observability, guardrails and prompt management in front of providers you already pay. Palo Alto Networks completed its acquisition of Portkey on May 29, 2026.

Strengths

  • Managed cloud, an MIT-licensed open-source gateway, and private deployment for Enterprise.
  • Simple and semantic caching, guardrails and prompt management are built in.
  • A free Developer plan to start.

Limitations

  • You bring your own provider keys. Portkey does not sell model access, so each vendor account and bill stays with you.
  • The free plan records 10,000 logs a month and keeps them for 3 days. Private deployment is Enterprise-only.
  • Portkey is now the core gateway of Palo Alto Networks Prisma AIRS. Check current plan terms before you commit.

Pricing

Developer is free. Production is $49 a month with 100,000 logs and $9 per extra 100,000. Enterprise is custom. The open-source gateway is free to self-host.

Ideal for

Teams that bring their own provider keys and want guardrails, prompt management and observability in one managed product

05Vercel AI Gateway

A managed gateway that also sells model access through AI Gateway Credits. Your app does not need to run on Vercel.

Strengths

  • Works without provider keys: requests use Vercel credentials and draw on your credits by default.
  • Vercel states no markup and no platform fee on tokens, including with BYOK.
  • Budgets per team, project, key or member.

Limitations

  • BYOK needs the paid tier and purchased credits. A failed BYOK request is retried on Vercel credentials and charged to your credits.
  • Budgets are soft caps and do not count BYOK spend.
  • Some features cost extra, such as custom reporting, team-wide provider allowlists and trace drains.

Pricing

Prepaid AI Gateway Credits with no token markup; you pay payment-processing fees. A monthly free credit covers a subset of models until you buy credits.

Ideal for

Teams on Vercel or the AI SDK that want credits, logs and budgets in one place

06Kong AI Gateway

AI plugins for the Kong API gateway, self-hosted or run through Kong Konnect with data planes in your environment.

Strengths

  • Handles AI traffic inside an existing Kong deployment.
  • The ai-proxy plugin is open source and has built-in providers including DeepSeek and Alibaba Cloud DashScope.
  • Governance features such as PII redaction and cost-based rate limiting.

Limitations

  • You bring your own provider keys and run the data plane.
  • Advanced load balancing and cross-provider failover (ai-proxy-advanced) are Enterprise-only and need Kong Gateway 3.8 or newer.

Pricing

Konnect Plus is billed per gateway, from $25 a month for serverless, with 1 million API requests included. The AI Gateway on Plus includes 5 LLM models, then $100 a month per extra model. Enterprise is custom, and a 30-day trial is available.

Ideal for

Organizations that already run Kong for API management

Why A2Agent is different

The models come with the endpoint
A gateway only forwards traffic. You still sign up with each vendor, pass its checks, fund it and store its key. A2Agent sells the model access itself, so one account replaces five vendor accounts.
Nothing to operate
There is no proxy to deploy, no database to back up and no Redis to size. A2Agent runs failover across its upstream accounts, health checks and rate limiting on its side.
Every major client protocol
OpenAI Chat Completions and Responses, Anthropic Messages and Gemini are all served, so Claude Code, Codex, OpenCode, Cursor and SDKs connect with a base URL change. The integrations page has setup guides for each tool.
Small, fee-free top-ups
Start with $1. There is no top-up fee and no subscription, and credits do not expire while your account is active.
Key-level spend control
Quotas, rolling spend limits, expiry and IP allowlists are set per key in the dashboard, without writing gateway policy.

See every model鈥檚 per-token price next to its official list price on the models page.

Use A2Agent with LiteLLM

If you keep LiteLLM, add A2Agent as one OpenAI-compatible upstream. The openai/ prefix tells LiteLLM to use the OpenAI format, and api_base must end with /v1. Your LiteLLM budgets and logs keep working; A2Agent bills the upstream usage.

yaml
model_list:
  - model_name: YOUR_MODEL_ID
    litellm_params:
      model: openai/YOUR_MODEL_ID
      api_base: https://a2agent.me/v1
      api_key: YOUR_A2AGENT_API_KEY
LiteLLM documentation

Frequently asked questions

Is there a hosted version of LiteLLM?

LiteLLM鈥檚 pricing page lists only the self-hosted open-source release and a self-hosted Enterprise license. If you want a gateway someone else runs, look at Cloudflare AI Gateway, Portkey or Vercel. If you want the models without a gateway, look at A2Agent or OpenRouter.

Can I keep LiteLLM and still use A2Agent?

Yes. Add A2Agent to model_list as an OpenAI-compatible upstream with the openai/ prefix and an api_base ending in /v1, as shown above. LiteLLM keeps its budgets, keys and logs, and A2Agent bills the model usage.

Was the official LiteLLM Docker image affected by the March 2026 PyPI compromise?

LiteLLM says users of its official proxy Docker image were not affected, because its dependencies are pinned. The compromised releases were 1.82.7 and 1.82.8 on PyPI. LiteLLM鈥檚 advisory lists the remediation steps.

Is A2Agent a gateway like LiteLLM?

No. A gateway sits in front of providers and forwards requests with your keys. A2Agent is the provider side: it sells access to GLM, Kimi, DeepSeek, Qwen and MiniMax, and you call it with an A2Agent key. You can also put A2Agent behind a gateway as one upstream.

Do I need accounts with Zhipu, Moonshot, DeepSeek, Alibaba or MiniMax?

Not with A2Agent. One A2Agent account and key reach all five families. With a bring-your-own-key gateway you open and pay each vendor account yourself.

Which APIs does A2Agent support?

OpenAI Chat Completions, OpenAI Responses, Anthropic Messages and Gemini generateContent, plus a model list at /v1/models. Most OpenAI or Anthropic SDKs connect by changing the base URL and key.

How is A2Agent billed?

Per token from a prepaid balance. The minimum top-up is $1, there is no top-up fee, and credits do not expire while your account is active. There is no subscription requirement and no free tier.

Can I limit what each key spends?

Yes. Each key can have a USD quota, 5-hour, daily and weekly spend limits, an expiry date and an IP allowlist. Usage for every request shows in the dashboard.

Where do I compare model prices?

The pricing page lists every model鈥檚 input, output and cache rates next to the official list price, and compares them with OpenRouter model by model.

Get started

Create an account, top up from $1 and create an API key. Point any OpenAI, Anthropic or Gemini client at A2Agent and pick a model.

Sources

Checked on 2026-09-28. Vendors change plans and features often. Check each official page before you decide.