LEANROUTE

Production-grade LLM Gateway, built for APAC

One Gateway, all major LLMs.

Already shipping with GPT, Claude, or Gemini? Point your SDK at Leanroute and get production-grade reliability, cheaper models, and the full APAC AI catalog — with the same code you have today.

OpenAI, Anthropic, Google, DeepSeek, and xAI, plus Qwen, GLM, Doubao, Kimi, Sarvam, and Krutrim through one endpoint. Bring your own keys on a flat monthly plan, or top up prepaid credits. Zero per-request markup on inference. Singapore-hosted.

OpenAI-compatible. Point your SDK at api.leanroute.dev/v1 and you're running. See every endpoint.

Your appOpenAI SDKLEANROUTEsmart routingauto-failovercachingguardrailsspend capsBYOKapi.leanroute.dev/v1Singapore-hostedFRONTIEROpenAIAnthropicGooglexAIAPACDeepSeekQwenSarvamKrutrim+ GLM, Doubao, Kimi

The chat bubble in the corner is built on Leanroute + RAG. Read the writeup →

For engineering leaders

Ship AI features without betting the company on one provider.

Leanroute is the LLM middleware layer between your product and the model providers. One integration replaces N direct-provider wiring jobs, and the routing decisions, cost controls, and reliability guarantees you'd otherwise build in-house come standard.

One integration, every model

OpenAI, Anthropic, Google, DeepSeek, xAI, Qwen, GLM, Doubao, Kimi, Sarvam, and Krutrim through a single OpenAI-compatible endpoint. Your team ships an integration once; adding a new provider becomes a config change, not a sprint. No point-to-point wiring, no per-vendor SDK maintenance.

Production-grade reliability, built-in

When your primary AI model returns 5xx errors, we transparently retry against a same-tier alternative (Sonnet ↔ DeepSeek-V4, GPT-4o ↔ Gemini 3.5 Flash). A provider outage becomes a hidden retry, not a customer-visible incident. Continuous canary tests catch upstream deprecations before they hit your traffic; cached responses continue to serve throughout.

Cost savings, quantified

Cheaper-model routing swaps to same-tier alternatives at a fraction of the cost. Prompt + semantic cache serve repeated queries at $0. On typical workloads teams see 20-40% LLM-spend reduction without changing product behavior. Every saving line-itemized in the dashboard.

You stay in control

Cheaper-model routing and provider arbitrage are opt-in per org. Any single request can override with X-Gateway-Routing: explicit. Model-tier mappings are public at /tiers and swappable per org. Never a black box.

Guardrails + spend controls

Per-org block + redact regex patterns and an OpenAI moderation pre-check catch obvious content risk. Daily / monthly spend caps and per-key rate limits are hard-enforced at the gateway edge — a runaway prompt loop cannot burn through your budget while ops sleeps.

Compliance-ready

Singapore-incorporated (Leanroute Pte. Ltd.), Singapore-hosted infrastructure, PDPA-aware data handling. BYOK provider keys encrypted with AES-256-GCM before they touch our database. Per-org no-persistence mode available for prompt-sensitive workloads. Full posture at /compliance.

Not a Big-4 sales pitch. Prepaid credits or flat BYOK subscription, no seat licenses, no MSA required to start. Run the numbers for your workload at /calculator, read the side-by-side vs. OpenRouter / Portkey / LiteLLM at /compare, or reach the founder directly at [email protected].

Every provider integration you don't have to write.

Same set of upstream providers. Wildly different amount of code your team owns.

BEFOREWITH LEANROUTEYour app5 SDKs, 5 auth flowsopenai-sdkanthropic-sdkgoogle-genaideepseek-apidashscopeOpenAIAnthropicGoogleDeepSeekQwen5 wire formats · 5 auth flows · 5 dashboardsEvery provider swap ships behind a code change.Your appopenai-sdk onlyapi.leanroute.dev/v1LEANROUTEOpenAIAnthropicGoogleDeepSeekQwen1 wire format · 1 auth flow · 1 dashboardSwap providers with a config change, not a code change.

Before — per-provider code

import openai
import anthropic
from google import genai
# ... 3 more imports

r = openai.chat.completions.create(...)
r = anthropic.messages.create(...)
r = genai.generate_content(...)
# each provider: different shape,
# different auth, different retry logic

With Leanroute — one SDK

from openai import OpenAI

client = OpenAI(
  base_url="https://api.leanroute.dev/v1",
  api_key=LEANROUTE_KEY,
)

r = client.chat.completions.create(
  model="anthropic/claude-sonnet-5",
  # or deepseek/deepseek-v4-flash, etc.
  messages=[...],
)

Questions people ask before signing up.

Short answers here. Longer versions in the FAQ, and full side-by-sides at /compare.

Why not just use OpenRouter?

OpenRouter fits if you want 400+ models served from the US with a metered fee on every request. We built for the APAC developer: Singapore-hosted, first-class support for Qwen, GLM, Doubao, Kimi, Sarvam, and Krutrim (not long-tail), and a flat $15/$25 BYOK subscription OpenRouter doesn't offer — you bring your keys, we don't touch your token spend. Managed credits sit at parity (5% on top-up). Full comparison at /compare/openrouter.

Why not go direct to DeepSeek (or OpenAI)?

Go direct if you're sure you'll stay on one provider forever and don't need observability or per-environment key management. Most teams don't want to bet a product on one provider's uptime. They want cost analytics across a mix, automatic retries when the primary provider returns 5xx errors, and the ability to A/B test without a redeploy. That's what a $15/mo Starter or $25/mo Pro subscription buys you — flat monthly fee, zero per-request drag, all the observability and failover included.

What if I disagree with your "same-tier" classifications?

The mapping is public at /tiers, with the MMLU / GPQA / HumanEval / MATH-500 score bands behind each assignment. If you disagree with a pairing, disable swaps org-wide, or override per-request with X-Gateway-Routing: explicit. We never cross tiers, and we never swap when tools are set on the request.

Is this a fit for you?

You benefit most if:

  • You already call GPT, Claude, or Gemini from code.
  • You want cheaper models without rewriting your integration.
  • You need Chinese (Qwen, GLM, Doubao, Kimi) or Indian (Sarvam, Krutrim) models from the same client.
  • You want cost analytics and hard spend controls out of the box.

Skip us if:

  • You're looking for a ChatGPT replacement. We're an API, not a chat UI.
  • You need on-premises deployment. We're managed-only for now.
  • You use Claude Code. That's Anthropic's product on their own billing, so it can't be routed through us.
  • You want 400 models to pick from. We curate around 30 across 10 providers and keep them working.

Why APAC teams choose Leanroute.

Singapore-hosted, sub-30ms from the region

Compute, database, and cache all in Singapore. Sub-30ms gateway round-trip from Jakarta, Bangalore, Manila, Ho Chi Minh, and Shanghai, versus 150-250ms landing on a US-hosted gateway. Latency compounds in streaming and multi-step agent flows.

Chinese + Indian providers as first-class peers

Qwen (Alibaba), GLM (Zhipu), Doubao (ByteDance), Kimi (Moonshot), Sarvam (Indic-tuned), and Krutrim (Ola's India-hosted stack) route as peers of OpenAI and Anthropic, not long-tail additions. India data residency via Krutrim for teams working under the DPDP Act.

Vision that reads CJK and Hindi, cheap

Qwen2.5-VL, GLM-4V, Doubao-Vision-Pro, Kimi vision routinely beat GPT-4o on Asian-script OCR (receipts, ID cards, product photos). Often 5-10× cheaper on the same workload. Route a GPT-4o vision request to Qwen-VL with zero code changes.

What sets us apart

Vision, not just text. Including the APAC vision models other gateways miss.

Send an image with your prompt and we'll translate it to each provider's wire format: OpenAI's image_url content parts, Anthropic's base64 image blocks, Gemini's inline_data. Same code on your side, regardless of which model answers.

Qwen-VL, GLM-4V, Doubao Vision, and Kimi vision often beat GPT-4o on Chinese, Japanese, and Hindi text inside images, at a fraction of the cost. If you're doing OCR, receipt parsing, ID checks, or product-photo workflows for APAC users, cheaper-model swaps apply to your vision traffic too, not just text.

One request → three provider-specific payloads

Same code on your side. We translate.

YOUR APP SENDS{"role": "user","content": [{ "type": "text", "text": "..." },{ "type": "image_url","image_url": { "url": "https://..." }}]}LEANROUTEtranslate wire formatOpenAIcontent parts{ "type": "image_url", "image_url": { "url": "https://…", "detail": "auto"}} Anthropicbase64 image block{ "type": "image", "source": { "type": "base64", "media_type": "image/png", "data": "iVBORw0KGgo…"}}Google GeminiinlineData part{ "inlineData": { "mimeType": "image/png", "data": "iVBORw0KGgo…"}}// Gemini rejects URLs; we// fetch + base64 server-side.

Your code sends one OpenAI-shaped request. The gateway rewrites the image payload to each provider's wire format before dispatch, and translates the response back on the return path. Add a new provider on our side, your integration doesn't change.

Vision models we route to

OpenAI

GPT-4o vision

Anthropic

Claude Sonnet vision

Google

Gemini 2.5 vision

Alibaba (Qwen)

Qwen2.5-VL 72B

Zhipu

GLM-4V

DeepSeek

DeepSeek-VL2

Token math, per-provider rate cards, and vision benchmarks at /docs/models.

What we don't do (yet).

Image generation (DALL-E, Stable Diffusion, GPT-Image-1), audio (Whisper, TTS, Realtime API), and video models are all on the roadmap but not in the gateway today. We'd rather ship vision input properly across every provider than ship four modalities half-finished. Tell us what you need and we'll prioritize.

What we actually do with your request.

Five steps, all auditable on every call via response headers. Most readers can skip this. Expand if you want the mechanics.

See the 5-step request flow
1

Your app sends a normal OpenAI-shape request

POST /v1/chat/completions with model=anthropic/claude-sonnet-4-6. We accept the OpenAI wire format from every SDK we've tested.

2

We check whether you've opted into cheaper-model swaps

Default: NO. We send to the exact model you asked for. If you've turned cheaper-model swaps on, we pick the cheapest model in the same quality tier, where 'same tier' means published benchmark equivalence (MMLU / GPQA / HumanEval within a few points). Today that's Sonnet ↔ DeepSeek-V3 in the flagship bucket and Opus ↔ DeepSeek-R1 in premium-reasoning. Never crossing tiers, never when tools are set. Full mapping at /tiers, re-evaluated on every major model release. Opt out per request with the X-Gateway-Routing: explicit header, or turn swaps off entirely per org.

3

We check the prompt cache

A hash of (model, messages, params, tools) keys a cache lookup. Identical previous request? Return the cached response and skip the upstream call. Per-org opt-out coming. Default TTL: 24h.

4

We call the upstream provider

Using your BYOK key if you've configured one, or our managed key if you're on the metered tier. Streaming requests pass through verbatim; non-streaming responses are translated to OpenAI shape before they leave.

5

We log the cost, not the prompt

request_log row: timestamp, model, provider, token counts, cost in USD, cache flag. We do not log the prompt text or the response content. Period.

What we store, and for how long.

This is what you'd normally answer on a procurement questionnaire. Here it is up front.

Prompt text

Persisted?
Optional cache only
Retention
24h (cache TTL)
Notes
Stored only if caching is enabled for your org. Per-org disable available. Cache hits never re-call the provider.

Response content

Persisted?
Optional cache only
Retention
24h (cache TTL)
Notes
Same as prompt. Disable the cache and nothing about the content is persisted by us.

Tool-call arguments

Persisted?
No
Retention
n/a
Notes
Currently dropped at the gateway. Streaming tool-call translation is a roadmap item.

Token counts, cost

Persisted?
Yes (request_log)
Retention
Plan-dependent: 7 days free, 90 days paid
Notes
Used for your dashboard cost analytics. No prompt content involved.

Provider API keys (BYOK)

Persisted?
Yes, encrypted
Retention
Until you delete them
Notes
AES-256-GCM under a master key. A leaked database dump alone is useless.

Login session

Persisted?
Yes (auth cookie)
Retention
30 days
Notes
Standard Better Auth sessions. Sign out invalidates.

Live controls: Singapore hosting, TLS 1.2+ end-to-end, AES-256-GCM at rest for BYOK provider keys, per-org configurable prompt persistence, and PDPA-aligned data handling. Formal compliance documentation covering PDPA, PIPL, APPI, DPDP Act, and GDPR at /compliance. SOC 2 Type II observation window scheduled Q1 2027.

Four ways your bill goes down. They stack.

Each is independent. Together they compound. The calculator runs all four against your stated workload so you can see what each adds. We're transparent about the conservative and aggressive ends of each range.

Cheap-model routing

saves 15–35%

On classification, short Q&A, structured extraction.

Send simple requests (classification, short Q&A, structured extraction) to a smaller model in the same family. Opt-in per route.

Cheaper-model swaps across providers

saves 30–70%

On flagship-tier traffic, with DeepSeek in the pool.

Within a quality tier, send to the cheapest provider on the day. Today that's DeepSeek-V3 for flagship (matches Sonnet on MMLU/GPQA/HumanEval within a few points), DeepSeek-R1 for premium reasoning (matches Opus on GPQA/MATH-500). Full mapping at /tiers, re-evaluated on every major release. Opt-in.

Prompt cache

saves 30–60%

On RAG and agentic workloads with repeating prompts.

Cache repeating prefixes (system prompts, tool definitions, RAG context) so you only pay full price once. Per-org disable available.

Semantic cache

saves 5–20%

On chat workloads with repeat questions.

Match semantically-similar requests to cached responses. Configurable similarity threshold and TTL. Paid tiers.

You're always in control.

Cost-saving features only run when you opt in. The limits you set are hard, not advisory. Your data stays your data.

Hard spend caps

Set a daily or monthly USD ceiling per organization, and tighter caps per API key on top. Hit the cap and the gateway returns 402 immediately. No overnight runaway bill from a loop you didn't notice.

Rate limits: requests and tokens per minute

RPM and TPM windows enforced at the gateway edge. Same scoping: org-wide ceiling, per-key tightening. Useful for sandbox keys, per-developer budgets, and shielding upstream providers from your own bursts.

Default is the model you asked for

No swaps unless you turn them on. Even with cheaper-model swaps enabled org-wide, any single request can override with X-Gateway-Routing: explicit. Tool calls are never swapped.

Your provider keys, your bill (BYOK)

Drop your OpenAI / Anthropic / Google / DeepSeek / xAI keys into the dashboard. Those requests go straight to the upstream from your wallet — we route, cache, and log, and take zero per-request markup. Stored AES-256-GCM encrypted, decrypted only on the request path. On a BYOK subscription (Starter $15/mo or Pro $25/mo) the platform is a flat monthly fee; on the pay-as-you-go credits plan the 5% platform fee already happened at top-up. One thing worth knowing: if you turn on cheaper-model swaps and the picker lands on a provider you haven't BYOK'd, that request dispatches via our managed key and debits from your credit balance (BYOK subscribers who want to allow this must keep a credit balance too). Swaps are off by default; leave them off and every BYOK request stays on your own keys.

Prompts stay in cache briefly. Never in Postgres.

Request logs store metadata only — token counts, model, latency, cost. Not prompt content. Prompt content DOES live in cache (Redis, keyed by hash of your request) for a 24h TTL by default so identical repeat requests return at $0 without a provider round-trip. Semantic cache stores prompt embeddings (numeric vectors, not plaintext) alongside cached responses. Caches are scoped per organization — your responses can never satisfy another org. Flip on no-persistence mode in /dashboard/settings to disable prompt + semantic caching entirely; the gateway emits x-gateway-prompts-persisted: false so your monitoring can verify. Wipe-cache-now button included. Singapore-hosted, PDPA-aware.

See what you'd save in 30 seconds.

Four questions about your workload. We'll run all four strategies against a synthetic version of your usage and show the savings range. No upload, no signup, math runs in your browser.

Run the calculator →

Got actual usage data? The detailed calculator accepts your CSV export.

Pricing

Two ways to pay. Zero per-request markup on inference.

Bring your own provider keys on a flat monthly plan, or top up prepaid credits and let us front the provider. Either way, we don't add anything to the per-request bill — you pay the platform once, and the model runs at cost.

BYOK subscription — bring your own keys, we route + observe

Starter

$15 / mo

1M requests / month · 30 RPM · 14-day trial

For solo builders and small teams. You pay the providers directly on your own key; we handle routing, caching, guardrails, and observability. Hard 429 at the cap — upgrade or add credits for overage headroom.

Pro

$25 / mo

5M requests / month + $3 per extra 1M · 150 RPM · 14-day trial

For production apps. Same setup as Starter with 5× the included headroom and metered overage funded from your credit balance — no sudden 429s while shipping.

Enterprise

Contact sales

Custom limits, SLA, invoicing

Volume commitment, dedicated region, custom guardrails, MSA. Reach out at [email protected].

Or pay-as-you-go — no subscription, no commitment

Credits (managed keys)

5% at top-up · 0% per request

We front the provider. Top up $50+ USD by credit card.

We charge a one-time 5% platform fee at deposit; the balance runs at cost with zero per-request markup. Deposit $50, $47.50 lands as credit, every inference call debits the exact upstream number. Better for teams that don't want to manage a provider account per model.

How it compares — $1,000 / month of upstream LLM spend

The math on real workloads. No teaser pricing, no first-month discount that expires.

At $1k/mo the BYOK subscription is where the story is — you break even against per-request platforms almost immediately, and every dollar above that is pure margin back to you:

Leanroute (BYOK Pro) $1,025 $25/mo flat · $0 per request
Leanroute (BYOK Starter) $1,015 $15/mo flat · $0 per request
Leanroute (credits) $1,053 5% at top-up
OpenRouter $1,050 5% per-request markup
Portkey (Production) $1,049+ $49/mo + per-request fees
Helicone (Pro) $1,025+ $25/mo flat, observability only (still pay OpenRouter/direct for tokens)

BYOK plans include a 14-day trial with card upfront (Stripe-hosted; we never see your card). Cache hits billed at $0 across every plan. Cheaper-model swaps billed at the actual cheaper model's cost, not the sticker price of the model you asked for. Numbers assume 1M requests / month at Starter or ≤5M at Pro; overage on Pro is $3 per 1M extra requests.

What you don't pay extra for.

Cache hits: $0. Cheaper-model swaps: billed at the actual cheaper model's cost, not the sticker price of the model you asked for. Multi-account failover when your primary provider returns 5xx errors: included. Vision input across every supported provider: included. Spend caps and rate limits: included. Observability + per-org guardrails: included on every plan, including trials.

Self-hosted or private single-tenant deploy?

Not shipped yet — we're gauging demand for a self-hostable or private-deploy version of Leanroute for teams that need on-prem, air-gap, or a dedicated instance. If that's you, email [email protected] with your use case and we'll add you to the early-access list.

Questions we get asked.

How is Leanroute different from OpenRouter, LiteLLM, Portkey, Helicone, Bifrost, or Kong AI Gateway?

Short version: OpenRouter is 400+ models, US-hosted, 5% per-request markup on every call including BYOK, no first-class APAC depth. LiteLLM is open-source self-host. Portkey is the closest functional peer: hosted gateway with guardrails and SOC 2, US-focused, $49/mo + per-request fees. Helicone is observability-first and pairs cleanly with us. Bifrost is a newer Go-based self-host. Kong AI Gateway is AI plugins on Kong's general-purpose gateway, best fit for orgs already on Kong. We focus on the APAC + India developer who wants DeepSeek, xAI (Grok), Qwen, GLM, Doubao, Kimi alongside Sarvam, Krutrim, and the Western models, hosted in Singapore, with a $15/$25 flat BYOK subscription that no per-request platform can match — or pay-as-you-go credits at parity with OpenRouter's fee (5%, but applied once at top-up, not on every call). Detailed side-by-side at /compare and the six per-competitor pages underneath.

Can I send images, not just text?

Yes. Vision input is live across OpenAI, Anthropic, Google, DeepSeek-VL2, and the full APAC vision pool: Qwen2.5-VL / Qwen-VL-Max (Alibaba Bailian), GLM-4V (Zhipu), Doubao Vision Pro (ByteDance), and Kimi vision preview (Moonshot). Send standard OpenAI `image_url` content parts (URL or base64 data URI) inside your message and we translate per upstream: Anthropic's base64 `image` blocks (or url source for HTTPS), Gemini's `inlineData` (we fetch + base64 HTTPS URLs server-side because Gemini doesn't accept image URLs), and passthrough for every OpenAI-compatible provider. Routing is vision-safe: we never swap a vision-bearing request to a text-only model, even with cheaper-model swaps on org-wide, so an image never gets silently dropped. With BYOK keys on Qwen or GLM, you can route a GPT-4o vision request to Qwen-VL or GLM-4V at a fraction of the cost, same content-parts wire on your side. (Grok is text-only at the moment so vision requests skip it automatically.) What we don't do yet: image generation (DALL-E, GPT-Image-1, Stable Diffusion), audio (Whisper / TTS / Realtime), video. Those stay roadmapped.

If I pick Claude Sonnet, will you swap it out?

Only if you opt in. Default behavior is to send to the exact model you asked for. With X-Gateway-Routing: explicit on the request, we'll respect it even when org-level cheaper-model swaps are on. The swaps we do are same-tier-only: Sonnet → DeepSeek-V3 because they're within a few points on MMLU / GPQA / HumanEval, never Sonnet → gpt-4o-mini. The mapping is public, we re-evaluate on every major model release, and you can disable swaps entirely at the org level or per-request. We never reroute when tools are set on the request.

How does pricing work?

Two options. BYOK subscription: $15/mo Starter (1M requests/mo, 30 RPM) or $25/mo Pro (5M requests/mo + $3 per extra 1M, 150 RPM). You bring your own provider keys; we route, cache, guardrail, observe, and log. No per-request fee to the gateway — the flat monthly covers everything. 14-day trial, card required upfront, cancel anytime. Enterprise ($) is contact-sales for volume commits, dedicated regions, MSA. Alternatively pay-as-you-go credits: top up $50+ USD by credit card, we apply a 5% platform fee at deposit ($50 → $47.50 credit), and every inference call debits the exact upstream cost — zero per-request markup on inference. This matches OpenRouter's 5% but applied once at deposit rather than compounded on every call, so a $1000 pass-through with them costs the same $1050 either way. Cache hits are $0 across every plan. Cost is surfaced on every invoice.

Do you store my prompts?

Not in Postgres — our request log stores metadata only (model, tokens, cost, latency), never prompt content. Prompts DO live briefly in the Redis prompt cache: the cache key is a hash of your request, the value is the response body, TTL is 24 hours. This is on by default so identical repeat requests return at $0 without a provider round-trip. If semantic caching is enabled, the embedding vector of your prompt (numeric, not plaintext) is also stored to serve semantically-similar queries. Caches are scoped per organization — your data can never satisfy another org. Flip on no-persistence mode in the dashboard to disable both caches; nothing about your prompts then touches our infrastructure beyond the duration of the HTTP request. Wipe-cache-now button included.

Do you have guardrails?

Yes, a minimal layer: per-org block + redact regex patterns and an optional OpenAI moderation pre-check, configured in /dashboard/settings. Block patterns reject the request with 400 prompt_blocked; redact patterns replace matches with [REDACTED] before dispatch; moderation flags trip the same error code with a categories list. For real PII detection (Microsoft Presidio), prompt-injection defense (Lakera Guard), or jailbreak detection (Rebuff) we document the specialist tools in /docs/integrations rather than shipping our own. They're meaningfully better at those problems and we don't compete on them. Full details + integration guides at /guardrails.

Where is data hosted?

Singapore by default. Other regions available on request. Database + cache encrypted at rest. BYOK provider keys encrypted client-side with AES-256-GCM before they reach our database; we couldn't read them in plaintext even from a database dump.

Why would I use this instead of going direct to DeepSeek?

If you're 100% sure you'll stay on DeepSeek forever and you don't need observability or per-environment key management, you wouldn't. But most people want failover to a Western provider when DeepSeek is rate-limited, a unified API across providers as their model mix evolves, cost analytics that show 'what did this customer cost me this week,' and the ability to swap providers without code changes. On BYOK Starter/Pro that's a flat $15-$25/mo — cheaper than one hour of your time debugging a provider outage.

How does this work with Continue, Cursor, OpenWebUI, etc.?

They all accept a custom OpenAI-compatible base URL. Set it to api.leanroute.dev/v1, paste your gateway key, done. Integration guides for each are at /docs/integrations.

When can I actually use it?

Now. Sign up and you'll get a gateway key immediately. We're early and shipping fast. For production workloads we recommend a gradual rollout (start with a low-stakes route, expand as you build confidence) and keeping multi-account failover on (it retries on same-tier alternatives when the primary provider returns 5xx errors). The founder's direct line is in the dashboard footer if anything looks off.