OpenRouter migration

A focused OpenRouter alternative for Chinese frontier AI models

SmarToken is for teams whose OpenRouter usage is mostly Chinese model traffic. Keep the OpenAI SDK shape, move credentials to SmarToken and compare DeepSeek, Qwen, Kimi, GLM, Doubao, Hunyuan and MiniMax through one gateway built around those routes.

China-first catalog

Pages, examples and pricing focus on Chinese model families instead of a generic global list.

Low-friction migration

Common OpenRouter-style aliases are normalized while you move to documented SmarToken IDs.

Production controls

Budget-limited keys, usage logs and prepaid balance make route experiments easier to contain.

Code change

Change the base URL, key and model ID

The request shape remains familiar. For production code, use the SmarToken model ID from the catalog so logs, pricing and support tickets all refer to the same identifier.

const client = new OpenAI({
  apiKey: process.env.OPENROUTER_API_KEY,
  baseURL: "https://openrouter.ai/api/v1",
});

await client.chat.completions.create({
  model: "deepseek/deepseek-chat",
  messages,
});
const client = new OpenAI({
  apiKey: process.env.SMTOKEN_API_KEY,
  baseURL: "https://thesmartoken.com/v1",
});

await client.chat.completions.create({
  model: "deepseek-chat",
  messages,
});

Migration checklist

Move traffic in small, measurable steps

Treat migration as an evaluation run. If a route is cheaper but needs twice as many retries or edits, the real cost may not be lower.

  1. 01Create one SmarToken API key for staging and keep it server-side.
  2. 02Change the SDK baseURL to the SmarToken /v1 base URL.
  3. 03Map OpenRouter-style model names to SmarToken model IDs.
  4. 04Run a small prompt set that represents real workloads, not only a hello-world request.
  5. 05Compare quality, latency, token cost and retry behavior before moving production traffic.
  6. 06Create separate keys or budgets for batch jobs, user-facing features and internal tools.

Alias map

Common OpenRouter-style IDs and SmarToken routes

View human-readable model catalog
SmarToken modelProviderCompatible aliasesBest for
deepseek-chatDeepSeekdeepseek/deepseek-chatcoding copilots, support agents
kimi-k2Moonshot AImoonshot/kimi-k2research assistants, codebase analysis
qwen-plusAlibaba Cloudqwen/qwen-plus, alibaba/qwen-plusmultilingual chat, structured extraction
glm-4-flashZ.aiz-ai/glm-4-flash, thudm/glm-4-flashinternal tools, knowledge assistants
doubao-seedByteDancebytedance/doubao-seedconsumer chat, content workflows
ernie-4-turboBaidubaidu/ernie-4-turboChinese knowledge QA, enterprise search
hunyuan-turbosTencent Cloudtencent/hunyuan-turbosenterprise assistants, code generation
minimax-m2MiniMaxminimax/minimax-m2coding agents, tool-use workflows
step-3StepFunstepfun/step-3coding tools, agent platforms
baichuan4-turboBaichuan AIbaichuan/baichuan4-turbodomain assistants, Chinese knowledge QA
spark-x1iFLYTEKiflytek/spark-x1education assistants, reasoning QA
sensenova-v6SenseTimesensetime/sensenova-v6multimodal assistants, visual QA

Positioning

When SmarToken is a better fit

SmarToken is not the right answer for every routing strategy. It is strongest when China-model access, documentation and cost tracking are the central requirement.

DimensionOpenRouter-style routerSmarToken
Catalog scopeBroad global model routerFocused Chinese frontier model gateway
Best fitTeams exploring many global providersTeams building with DeepSeek, Qwen, Kimi, GLM, Doubao and similar routes
Migration effortExisting OpenRouter aliasesOpenAI SDK shape plus model alias normalization for common China-model IDs
Spend controlsProvider and account-level controls varyConsole API keys, wallet balance and usage history in one place
Human-readable docsBroad provider documentationModel pages, pricing and tutorials focused on China-model workloads

OpenRouter migration FAQ

Is SmarToken a full OpenRouter replacement?

No. SmarToken is narrower by design. It focuses on OpenAI-compatible access to Chinese model families such as DeepSeek, Qwen, Kimi, GLM, Doubao, Hunyuan and MiniMax instead of trying to mirror every global model.

Can I keep using the OpenAI SDK?

Yes. Keep the OpenAI SDK, set baseURL to https://thesmartoken.com/v1, use a SmarToken API key and choose a supported SmarToken model ID or compatible alias.

Should production apps use OpenRouter-style aliases forever?

Aliases are useful for migration testing. For long-term production code, prefer the documented SmarToken model ID shown on the model catalog and model detail pages.

What should I test before moving traffic?

Compare answer quality, latency, cost per accepted output, streaming behavior, error handling and how each route behaves on your own prompts.

Get API Key