New API
  • Home
  • Docs
  • Console
  • AgentAgentHotHot
  • Partners
Sign in

OpenRouter alternative

中文

Switch from OpenRouter to OpenLux in one line

OpenLux serves the same OpenAI-compatible API as OpenRouter, plus the Anthropic Messages API. In most projects you change the base URL, swap the API key and rename the model. Your SDK, prompts, streaming and tool calls stay as they are.

Create a free accountSee model prices

Three things to change

  1. 1

    Create an OpenLux API key

    Sign up, open API keys in the console and create a key. Pick a group for the key: the group sets the price and which models the key can call. Each group is listed on the pricing page.

  2. 2

    Change the base URL

    Replace https://openrouter.ai/api/v1 with https://api.openlux.ai/v1. For Anthropic-format clients such as Claude Code, replace https://openrouter.ai/api with https://api.openlux.ai.

  3. 3

    Rename the model

    Drop the vendor/ prefix: openai/gpt-5.5 becomes gpt-5.5. Claude models also use hyphens instead of dots in the version: anthropic/claude-sonnet-5.5 becomes claude-sonnet-5-5.

To check the key and URL, call GET https://api.openlux.ai/v1/models with the key. A model list back means both are right; a 401 means the key is wrong or missing.

Base URL for each API format

API formatOpenRouterOpenLux
OpenAI Chat Completionshttps://openrouter.ai/api/v1https://api.openlux.ai/v1
Anthropic Messages (Claude Code, Anthropic SDK)https://openrouter.ai/apihttps://api.openlux.ai
API key headerAuthorization: BearerAuthorization: Bearer, or x-api-key for the Anthropic format

Do not add /v1 to the Anthropic base URL: Claude Code and the Anthropic SDK append /v1/messages themselves. OpenLux also serves the OpenAI Responses API (/v1/responses) and the Gemini native format.

Before and after, for each SDK and tool

Red lines are your OpenRouter setup, green lines are what replaces them. The copy button copies the OpenLux version.

OpenAI SDK — Python

 from openai import OpenAI   client = OpenAI(-    base_url="https://openrouter.ai/api/v1",-    api_key="<OPENROUTER_API_KEY>",+    base_url="https://api.openlux.ai/v1",+    api_key="<OPENLUX_API_KEY>", )   response = client.chat.completions.create(-    model="anthropic/claude-sonnet-5.5",+    model="claude-sonnet-5-5",     messages=[{"role": "user", "content": "Hello"}], ) print(response.choices[0].message.content)

OpenAI SDK — Node.js / TypeScript

 import OpenAI from "openai";   const client = new OpenAI({-  baseURL: "https://openrouter.ai/api/v1",-  apiKey: process.env.OPENROUTER_API_KEY,+  baseURL: "https://api.openlux.ai/v1",+  apiKey: process.env.OPENLUX_API_KEY, });   const completion = await client.chat.completions.create({-  model: "openai/gpt-5.5",+  model: "gpt-5.5",   messages: [{ role: "user", content: "Hello" }], }); console.log(completion.choices[0].message.content);

cURL

-curl https://openrouter.ai/api/v1/chat/completions \-  -H "Authorization: Bearer $OPENROUTER_API_KEY" \+curl https://api.openlux.ai/v1/chat/completions \+  -H "Authorization: Bearer $OPENLUX_API_KEY" \   -H "Content-Type: application/json" \   -d '{-    "model": "google/gemini-3.8-flash",+    "model": "gemini-3.8-flash",     "messages": [{"role": "user", "content": "Hello"}]   }'

Anthropic SDK — Python

 import anthropic   client = anthropic.Anthropic(-    base_url="https://openrouter.ai/api",-    auth_token="<OPENROUTER_API_KEY>",+    base_url="https://api.openlux.ai",+    api_key="<OPENLUX_API_KEY>", )   message = client.messages.create(     model="claude-sonnet-5-5",     max_tokens=1024,     messages=[{"role": "user", "content": "Hello"}], ) print(message.content[0].text)

Claude Code

-export ANTHROPIC_BASE_URL="https://openrouter.ai/api"-export ANTHROPIC_AUTH_TOKEN="$OPENROUTER_API_KEY"+export ANTHROPIC_BASE_URL="https://api.openlux.ai"+export ANTHROPIC_AUTH_TOKEN="<OPENLUX_API_KEY>" export ANTHROPIC_API_KEY="" claude

LangChain — Python

-from langchain_openrouter import ChatOpenRouter+from langchain_openai import ChatOpenAI  -llm = ChatOpenRouter(model="anthropic/claude-sonnet-5.5")+llm = ChatOpenAI(+    model="claude-sonnet-5-5",+    base_url="https://api.openlux.ai/v1",+    api_key="<OPENLUX_API_KEY>",+) print(llm.invoke("Hello").content)

Vercel AI SDK

-import { createOpenRouter } from "@openrouter/ai-sdk-provider";+import { createOpenAICompatible } from "@ai-sdk/openai-compatible"; import { generateText } from "ai";  -const openrouter = createOpenRouter({ apiKey: process.env.OPENROUTER_API_KEY });+const openlux = createOpenAICompatible({+  name: "openlux",+  baseURL: "https://api.openlux.ai/v1",+  apiKey: process.env.OPENLUX_API_KEY,+});   const { text } = await generateText({-  model: openrouter("anthropic/claude-sonnet-5.5"),+  model: openlux("claude-sonnet-5-5"),   prompt: "Hello", });

Cline / Kilo Code settings

-API Provider:  OpenRouter+API Provider:  OpenAI Compatible+Base URL:      https://api.openlux.ai/v1+API Key:       <OPENLUX_API_KEY>+Model ID:      claude-sonnet-5-5

Model IDs: OpenRouter to OpenLux

OpenLux model names have no vendor prefix. Popular models side by side; the full list with prices is on the pricing page.

OpenRouter model IDOpenLux model name
anthropic/claude-opus-5.5claude-opus-5-5
anthropic/claude-sonnet-5.5claude-sonnet-5-5
anthropic/claude-haiku-5.5claude-haiku-5-5
anthropic/claude-fable-5.2claude-fable-5-2
anthropic/claude-opus-4.8claude-opus-4-8
anthropic/claude-sonnet-4.6claude-sonnet-4-6
openai/gpt-6.2-astragpt-6.2-astra
openai/gpt-6.2-solgpt-6.2-sol
openai/gpt-6.1-solgpt-6.1-sol
openai/gpt-5.5gpt-5.5
openai/gpt-5.4-minigpt-5.4-mini
openai/gpt-4o-minigpt-4o-mini
google/gemini-3.8-flashgemini-3.8-flash
google/gemini-3.1-pro-previewgemini-3.1-pro-preview
google/gemini-3.5-flash-litegemini-3.5-flash-lite
deepseek/deepseek-v4.1-flashdeepseek-v4.1-flash
deepseek/deepseek-v4-prodeepseek-v4-pro
x-ai/grok-4.7grok-4.7
moonshotai/kimi-k3kimi-k3
z-ai/glm-5.3glm-5.3
qwen/qwen3.8-flashqwen3.8-flash

OpenRouter IDs are from its public model list (checked November 26, 2026). OpenLux names are models on sale when this page was built.

OpenRouter routing options on OpenLux

  • provider.sort works: for example, "provider": {"sort": "price"} sends the request over the cheapest route. OpenRouter's throughput and latency values are not recognised; add the :nitro suffix for the fastest route instead.
  • The :floor (cheapest route), :nitro (fastest route) and :stable (route with the best success rate) model suffixes work, for example claude-opus-5-5:floor.
  • OpenLux does not act on the models fallback list, route, transforms, or other provider fields such as order, only, ignore and allow_fallbacks. When a route fails, OpenLux retries the request on another route for the same model by itself.

What OpenLux does not do

  • No Batch API

    OpenRouter's :batch model variants and Batch API have no OpenLux counterpart. Every request is a normal real-time request.

  • No bring-your-own-key

    You cannot attach your own provider keys. Every request is billed from your OpenLux balance.

  • No router or free models

    There is no openrouter/auto, openrouter/free or :free variant. Pick a model by name, and use :floor or :nitro if you want OpenLux to choose the route by price or speed.

  • Only one OpenRouter routing field

    provider.sort and the routing suffixes are read; the other OpenRouter-only request fields listed above are not.

Billing differences

OpenRouter (from its own documentation, checked November 26, 2026)

  • Inference is passed through at the provider's price, with no markup (FAQ).
  • Buying credits costs a 5.5% fee ($0.80 minimum) by card, or 5% with crypto (FAQ); the fee is 8% on the Business plan (pricing).
  • Bring-your-own-key usage is free up to $25,000 of list-price inference a month, then 5% (FAQ).

OpenLux

  • Prepaid balance, charged per request by the tokens used.
  • Price = the model's price × the ratio of the group on your API key. Groups differ in price and stability, and each group's description is on the pricing page.
  • Top up by card, Apple Pay, Google Pay or stablecoins.
  • Every request appears in the usage log with its model, tokens and charge.

For a worked cost example with Claude Code, read OpenRouter alternative for Claude Code and GPT: fees and prices compared.

Frequently asked questions

Is OpenLux a drop-in replacement for OpenRouter?

For code that calls the OpenAI-compatible Chat Completions API, mostly yes: change the base URL and key, and rename the model. Messages, streaming and tool calls use the same request format. OpenLux has no Batch API, no bring-your-own-key and no router models.

Can I use my OpenRouter API key on OpenLux?

No. Create an OpenLux key in the console under API keys. OpenRouter keys only work on OpenRouter.

Do I have to change my model names?

Yes. Drop the vendor/ prefix, and for Claude models use hyphens in the version: anthropic/claude-opus-5.5 becomes claude-opus-5-5. See the table above or the pricing page for exact names.

What replaces openrouter/auto?

OpenLux has no router model. Name the model you want. To let OpenLux pick the cheapest or fastest route for that model, add :floor or :nitro, or send provider.sort.

Does provider routing still work?

provider.sort works, for example {"sort": "price"}. Other provider fields, the models fallback list and transforms are not used. Failed requests are retried on another route for the same model automatically.

How do I point Claude Code at OpenLux?

Set ANTHROPIC_BASE_URL=https://api.openlux.ai and ANTHROPIC_AUTH_TOKEN to your OpenLux key. Do not add /v1: Claude Code appends /v1/messages itself.

Does OpenLux have a Batch API or bring-your-own-key?

No. All requests are real-time and billed from your OpenLux balance.

How do I see what a request cost?

Open the usage log in the console. Each request is listed with its model, tokens and charge.

Related

  • OpenRouter alternative: fees and prices compared
  • Model prices
  • Create an account

Move your first request in five minutes

Create an account, make a key, change one line.

Create a free account
New API

Models

  • Text
  • Image
  • Media
  • Retrieval

Company

  • About
  • Partners
  • PersonalHot

Legal

  • Terms
  • Privacy
  • Usage
  • Disclaimer
  • Refunds
  • DPA
  • Compliance
  • Imprint

Docs

  • API
  • AI News
  • From OpenRouter
  • Announcements

More

  • Agent

One API for mainstream AI models

OpenLux©2026COGNIS AI PTE. LTD. All rights reserved

New API

One API for mainstream AI models

Models

  • Text
  • Image
  • Media
  • Retrieval

Company

  • About
  • Partners
  • PersonalHot

Docs

  • API
  • AI News
  • From OpenRouter
  • Announcements

More

  • Agent

OpenLux©2026COGNIS AI PTE. LTD. All rights reserved

Privacy | Terms | Usage | Disclaimer | Refunds | DPA | Compliance | Imprint |