Chinese model APIs on one OpenAI-compatible key. Browse models

OpenAI-compatible API

Developer docs

Call Chinese model families through one SmarToken key and Base URL. This native endpoint documents the text Chat Completions contract below. Use GET /v1/models for current IDs.

Submitted conversations and model replies are stored encrypted for support and operational review until manually removed. See the privacy policy for details.

Quickstart

  1. Step 1

    Continue with Google

  2. Step 2

    Top up your account

  3. Step 3

    Create a console sk key

  4. Step 4

    Call /v1/chat/completions

curl --fail-with-body -sS "https://thesmartoken.com/v1/chat/completions" \
  -H "Authorization: Bearer $SMTOKEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-chat",
    "messages": [{"role":"user","content":"Reply with exactly OK."}],
    "max_tokens": 8,
    "thinking": {"type":"disabled"}
  }'

OpenAI SDK migration

Keep your existing OpenAI SDK. Change baseURL to https://thesmartoken.com/v1, then set model to a SmarToken model ID.

Python: pip install openai. Node.js (JavaScript): npm install openai, save the example as first-call.mjs, then run node first-call.mjs. Set SMTOKEN_API_KEY in your environment before running.

import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["SMTOKEN_API_KEY"],
                base_url="https://thesmartoken.com/v1", max_retries=0)
response = client.chat.completions.create(
    model="deepseek-chat",
    messages=[{"role": "user", "content": "Reply with exactly OK."}],
    max_tokens=8,
    extra_body={"thinking": {"type": "disabled"}},
)
print(response.choices[0].message.content)
print(response.usage)
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.SMTOKEN_API_KEY,
  baseURL: "https://thesmartoken.com/v1", maxRetries: 0,
});
const response = await client.chat.completions.create({
  model: "deepseek-chat",
  messages: [{ role: "user", content: "Reply with exactly OK." }],
  max_tokens: 8,
  thinking: { type: "disabled" },
});
console.log(response.choices[0].message.content);
console.log(response.usage);

OpenRouter migration

For supported text workloads, use https://thesmartoken.com/v1 with a SmarToken key. The aliases below map common OpenRouter-style IDs to SmarToken model IDs. Prefer the catalog ID in production code.

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.SMTOKEN_API_KEY,
  baseURL: "https://thesmartoken.com/v1",
});

const completion = await client.chat.completions.create({
  model: "deepseek/deepseek-chat",
  messages: [{ role: "user", content: "Review this TypeScript function." }],
});
OpenRouter-style IDSmarToken model IDProvider
-deepseek-v4.1-flashDeepSeek
-deepseek-tokenhub-flashDeepSeek
-deepseek-tokenhub-proDeepSeek
-kimi-k3.1-proMoonshot AI
-kimi-k2.7-codeMoonshot AI
deepseek-flashdeepseek-chatDeepSeek
deepseek/deepseek-v4-prodeepseek-v4-proDeepSeek
moonshot/kimi-k3kimi-k3Moonshot AI
Read the OpenRouter alternative guide

Streaming

Set stream:true to receive OpenAI-compatible SSE chunks. Usage is written and balance is deducted after the stream finishes. Set stream_options.include_usage=true for a final usage chunk with empty choices before [DONE].

curl -N "https://thesmartoken.com/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SMTOKEN_API_KEY" \
  -d '{
    "model": "deepseek-chat",
    "stream": true,
    "messages": [
      { "role": "user", "content": "Write a short onboarding email." }
    ]
  }'

Model IDs

You can also fetch the live list from GET https://thesmartoken.com/v1/models. The API includes catalog and billable pricing without an additional platform surcharge.

Model IDVendorBest forPrice / 1M tokens
deepseek-v4.1-flashDeepSeekchat, coding$0.3 input / $1.2 output
deepseek-tokenhub-flashDeepSeekchat, coding$0.3 input / $1.2 output
deepseek-tokenhub-proDeepSeekchat, coding$1.74 input / $3.48 output
kimi-k3.1-proMoonshot AIchat, coding$2 input / $10 output
kimi-k2.7-codeMoonshot AIchat, coding$0.95 input / $4 output
deepseek-chatDeepSeekcoding copilots, support agents$0.3 input / $1.2 output
deepseek-v4-proDeepSeekresearch, coding$1.32 input / $3.96 output
kimi-k3Moonshot AIdeep research, agent planning$3 input / $15 output
glm-5.2Z.aienterprise assistants, coding support$1.4 input / $4.4 output
glm-5.3Z.aienterprise assistants, coding support$1.4 input / $4.4 output
minimax-m2MiniMaxcoding agents, text analysis$0.3 input / $1.2 output
kimi-k2Moonshot AIresearch assistants, codebase analysis$0.6 input / $2.5 output
kimi-k2.6Moonshot AIresearch assistants, codebase analysis$0.95 input / $4 output
qwen-plusAlibaba Cloudmultilingual chat, structured extraction$1.2 input / $4.8 output
qwen3.7-plusAlibaba Cloudmultilingual chat, vision QA$0.276 input / $1.101 output
glm-4-flashZ.aiinternal tools, knowledge assistants$0.8 input / $3.2 output
glm-5v-turboZ.aivisual QA, document screenshots$1.2 input / $4 output
doubao-seedByteDanceconsumer chat, content workflows$0.7 input / $2.8 output
ernie-4-turboBaiduChinese knowledge QA, enterprise search$0.9 input / $3.6 output
hunyuan-turbosTencent Cloudenterprise assistants, code generation$0.8 input / $3.2 output
minimax-m3MiniMaxcoding agents, tool-use workflows$0.6 input / $2.4 output
step-3StepFuncoding tools, agent platforms$0.5 input / $2 output
baichuan4-turboBaichuan AIdomain assistants, Chinese knowledge QA$1.5 input / $1.5 output
spark-x1iFLYTEKeducation assistants, reasoning QA$0.7 input / $2.8 output
sensenova-v6SenseTimemultimodal assistants, visual QA$0.8 input / $3.2 output
pangu-nlpHuawei Cloudindustry assistants, private cloud workflows$1 input / $4 output
360zhinao2-o1Qihoo 360security assistants, Chinese chat$0.4 input / $1 output
yi-large01.AIbilingual writing, structured output$0.9 input / $0.9 output
internlm3Shanghai AI Laboratoryself-hosted chat, research evals$0.2 input / $0.8 output
longcat-flashMeituanagentic reasoning, multimodal prototypes$0.4 input / $1.6 output
wan-t2vAlibaba Cloudpromo clips, product demos$2.5 input / $2.5 output
minimax-video-01MiniMaxmarketing video drafts, avatar-style clips$3 input / $3 output
happyhorse-t2vAlibaba Cloudcreative video drafts, campaign concepts$2.8 input / $2.8 output

Native text API contract

A SmarToken key and wallet are separate from a DeepSeek official account. SmarToken keys work at this base URL; do not put an official DeepSeek key here or use a SmarToken key at api.deepseek.com.

ParameterSupported contract
model / messagesUse an enabled model ID from GET /v1/models. Text string content; system, user and assistant roles only.
streamBoolean. false returns JSON; true returns SSE final-answer text. Reasoning content is not returned by this gateway.
max_tokensInteger 1–393216, subject to context and available funds. Includes thinking tokens. If omitted, capped at 32768 or the affordable limit. The first-call example uses 8.
thinking{type: enabled|disabled}. Omitted preserves the upstream default. Kimi K3, K3.1 Pro, K2.7 Code and GLM 5.3 cannot disable thinking; omit this option for these models. Explicit modes map to reasoning_effort high/none; reasoning_effort itself is not accepted.
temperature0–2, only with thinking.type=disabled. Other modes are rejected because the upstream ignores it.
top_pFlash: thinking enabled (or omitted), 0.95–1. Pro: explicit thinking disabled, greater than 0 and at most 1. Other combinations are rejected.
stopA non-empty string or 1–16 non-empty strings.
stream_optionsOnly with stream=true. include_usage accepts a boolean; true emits a final usage chunk with choices:[].
Not supportedtools, tool_choice, tool messages, response_format, multimodal inputs, penalties, seed, logprobs and other unlisted fields return 400 with error.param. No silent ignoring.

SSE HTTP 200 means the stream opened. A successful stream ends with a finish reason and [DONE]; an event:error or missing terminal marker is not success. Errors after streaming starts use event:error and do not emit [DONE]. Stop reading on error. Cancelled or unknown results must not be automatically retried. A legitimate length-limited response can contain no final text but still have billable tokens. The gateway does not automatically retry upstream inference.

Mode rules reviewed November 6, 2026 against DeepSeek’s API reference. Gateway support is narrower than the upstream API.

Billing and usage

SmarToken uses prepaid USD wallet balance. Each completed request records prompt tokens, completion tokens, final billable cost and provider latency; streaming requests settle after the stream finishes. Billable token rates follow catalog rates without an additional platform surcharge.

Usage overview

Review recent model calls, token totals, cost and latency from the console.

Wallet ledger

Track top-ups, manual adjustments, trial credit and usage debits.

Payment safety

Use only the official domain before top-up or API-key operations.

Security reminder: before topping up, confirm the address bar shows https://thesmartoken.com. Avoid unfamiliar links, search ads or cloned domains when entering credentials or payment details.

Budget limits

API keys can be scoped by daily budget, monthly budget and allowed model family. Requests are blocked before provider calls when a key is revoked, outside its model scope, or over budget. Funds are reserved before generation and settled against confirmed usage. Interrupted requests with unknown usage keep a visible hold until reconciliation; contact support if a hold remains.

Daily budget

Protect demos, CI jobs and early customer pilots.

Monthly budget

Keep spend predictable across production keys.

Model scope

Scope keys to current DeepSeek models; a model-family scope does not enable a coming-soon route.

Error codes

  • 400 - Invalid JSON, unknown model, invalid text messages, unsupported parameters or blocked prompt. Parameter errors include error.param.
  • 401 - Missing, invalid or revoked API key.
  • 402 - Insufficient balance or API key budget exceeded. Balance errors use type insufficient_quota and include error.topup_url pointing to Billing. Stop automatic retries on 402; open the top-up URL, add credit, then send the next request.
  • 429 - Rate limit reached. Respect Retry-After.
  • 502 - Upstream response did not finish correctly. Keep the request record; do not automatically replay an unknown result.
  • 503 - No OpenAI-compatible upstream route is configured.