Skip to content

China-region providers

GLM, MiniMax, Qwen/DashScope, Moonshot/Kimi, Qianfan, Doubao, Z.AI, and Bailian with region routing.

Revka has first-party support for the major China-based model vendors — Zhipu GLM, Z.AI, MiniMax, Alibaba Qwen/DashScope, Moonshot/Kimi, Baidu Qianfan, ByteDance Doubao, and Alibaba Bailian. Almost all of them ship two regional deployments: a CN endpoint (mainland data centers, typically lower latency from inside China) and a Global/International endpoint. Revka picks the right base URL automatically from the provider alias you choose, so switching regions is a one-word config change rather than a URL edit.

Use this page when you want to run any of these models, when you need to route a deployment to the CN versus the Global endpoint, or when you want to reuse a Qwen Code or MiniMax subscription token instead of an API key. For the full provider table see the provider catalog; for fallbacks and hint-based routing see routing, reliability & tuning.

Every China provider follows the same three-step pattern: set the provider alias, set its API key (config or env var), pick a model.

  1. Pick a provider alias. For example qwen (CN) or qwen-intl (Global).

  2. Set the key. Either run onboarding non-interactively or set the provider’s env var:

    Terminal window
    revka onboard --provider qwen --api-key "YOUR_DASHSCOPE_KEY"
    # or
    export DASHSCOPE_API_KEY="YOUR_DASHSCOPE_KEY"
  3. Choose a model and chat.

    ~/.revka/config.toml
    default_provider = "qwen"
    default_model = "qwen-max"
    Terminal window
    echo "Hello" | revka agent

The glm provider integrates Zhipu AI’s GLM models through an OpenAI-compatible surface. GLM API keys use Zhipu’s distinctive id.secret format (for example abc123.xyz789). The provider runs with the responses-API fallback disabled, so it always speaks /chat/completions and never probes /responses.

CNGlobal
Base URLhttps://open.bigmodel.cn/api/paas/v4https://api.z.ai/api/paas/v4
Aliasesglm-cn, zhipu-cn, bigmodelglm, zhipu, glm-global, zhipu-global
AuthBearer (id.secret)Bearer (id.secret)
Env varGLM_API_KEYGLM_API_KEY
# ~/.revka/config.toml — GLM Global
default_provider = "glm"
default_model = "glm-4.7"
api_key = "<id>.<secret>"
# GLM China (open.bigmodel.cn)
default_provider = "glm-cn"
default_model = "glm-4.7"
api_key = "<id>.<secret>"

Z.AI exposes Zhipu’s coding-plan deployment on a separate path (/api/coding/paas/v4) from the standard GLM endpoint. Pick zai when you have a Z.AI coding plan subscription; pick glm for the standard GLM API.

CNGlobal
Base URLhttps://open.bigmodel.cn/api/coding/paas/v4https://api.z.ai/api/coding/paas/v4
Aliaseszai-cn, z.ai-cnzai, z.ai, zai-global, z.ai-global
AuthBearer (id.secret)Bearer (id.secret)
Env varZAI_API_KEYZAI_API_KEY
# ~/.revka/config.toml — Z.AI Global
default_provider = "zai"
default_model = "glm-4.7"
api_key = "<id>.<secret>"

Z.AI and GLM share the same id.secret key format but use different endpoints and env vars. Use this checklist to wire either one:

  1. Get a key. Sign up at the Z.AI or Zhipu (bigmodel.cn) console and generate a key. The format is always id.secret.

  2. Choose the right alias. Use zai/zai-cn for a Z.AI coding plan, or glm/glm-cn for the standard GLM API. Append -cn for the mainland endpoint.

  3. Set the matching env var. ZAI_API_KEY for Z.AI, GLM_API_KEY for GLM. Each alias family only reads its own env var.

  4. Verify with curl before pointing Revka at it:

    Terminal window
    curl -X POST "https://api.z.ai/api/coding/paas/v4/chat/completions" \
    -H "Authorization: Bearer YOUR_ZAI_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"model":"glm-4.7","messages":[{"role":"user","content":"Hello"}]}'
  5. Confirm Revka sees it:

    Terminal window
    revka status
    echo "Hello" | revka agent

MiniMax offers both a Global and a CN deployment. Because some MiniMax models reject a role: system message, Revka merges the system prompt into the first user turn for every MiniMax alias. Keep this in mind for channel conversations whose system prompt carries delivery instructions — that guidance is folded into the user message rather than sent separately.

CNGlobal
Base URLhttps://api.minimaxi.com/v1https://api.minimax.io/v1
Aliasesminimax-cn, minimaxi, minimax-oauth-cn, minimax-portal-cnminimax, minimax-intl, minimax-io, minimax-global, minimax-portal
AuthBearerBearer
Env varMINIMAX_OAUTH_TOKEN, then MINIMAX_API_KEYMINIMAX_OAUTH_TOKEN, then MINIMAX_API_KEY
# ~/.revka/config.toml — MiniMax Global
default_provider = "minimax"
default_model = "MiniMax-Text-01"
api_key = "YOUR_MINIMAX_API_KEY"

MiniMax aliases self-select their endpoint: any alias matched as international routes to api.minimax.io, and any alias matched as CN routes to api.minimaxi.com. Use minimax or minimax-intl for Global, and minimax-cn or minimaxi for China — no api_url needed.

Setting api_key = "minimax-oauth" is a placeholder that triggers automatic OAuth token resolution instead of treating the literal string as a key. Revka then checks, in order: MINIMAX_OAUTH_TOKEN, MINIMAX_API_KEY, and finally the token-refresh endpoint using MINIMAX_OAUTH_REFRESH_TOKEN. Region for the refresh call is taken from the alias or from MINIMAX_OAUTH_REGION.

~/.revka/config.toml
default_provider = "minimax-oauth"
api_key = "minimax-oauth" # placeholder, not a literal key
Terminal window
export MINIMAX_OAUTH_TOKEN="..." # preferred direct token
# or, to auto-refresh:
export MINIMAX_OAUTH_REFRESH_TOKEN="..."
export MINIMAX_OAUTH_REGION="global" # or "cn"
VariableMeaning
MINIMAX_OAUTH_TOKENDirect OAuth access token (checked first)
MINIMAX_API_KEYStandard API key fallback
MINIMAX_OAUTH_REFRESH_TOKENEnables automatic token refresh
MINIMAX_OAUTH_REGIONglobal or cn — selects the refresh endpoint
MINIMAX_OAUTH_CLIENT_IDOverride the default OAuth client ID

The refresh endpoints are https://api.minimax.io/oauth/token (Global) and https://api.minimaxi.com/oauth/token (CN). See OAuth & subscription providers for the broader OAuth model.

Alibaba’s Qwen models are served through DashScope’s OpenAI-compatible endpoint. There are three separate regional deployments — CN, International, and US — plus an OAuth variant for Qwen Code CLI subscribers. Vision (base64 images) is enabled for Qwen.

RegionBase URLAliases
CNhttps://dashscope.aliyuncs.com/compatible-mode/v1qwen, dashscope, qwen-cn, dashscope-cn
Internationalhttps://dashscope-intl.aliyuncs.com/compatible-mode/v1qwen-intl, dashscope-intl, qwen-international, dashscope-international
UShttps://dashscope-us.aliyuncs.com/compatible-mode/v1qwen-us, dashscope-us

All three direct-key variants authenticate with DASHSCOPE_API_KEY (Bearer).

# ~/.revka/config.toml — Qwen International
default_provider = "qwen-intl"
default_model = "qwen-max"
Terminal window
export DASHSCOPE_API_KEY="YOUR_DASHSCOPE_KEY"

The qwen-code (alias qwen-oauth) variant reuses a Qwen Code CLI subscription instead of a direct key, analogous to other subscription providers. Set the placeholder key and let Revka resolve the token:

~/.revka/config.toml
default_provider = "qwen-code"
api_key = "qwen-oauth" # placeholder
VariableMeaning
QWEN_OAUTH_TOKENExplicit OAuth access token
QWEN_OAUTH_REFRESH_TOKENEnables automatic refresh when the cached token expires
QWEN_OAUTH_RESOURCE_URLEndpoint override returned by the OAuth session
QWEN_OAUTH_CLIENT_IDOverride the default OAuth client ID

Revka also auto-discovers credentials written by the Qwen Code CLI at ~/.qwen/oauth_creds.json. When no resource URL is supplied, the OAuth variant falls back to the CN base URL. See OAuth & subscription providers for the full flow.

Moonshot’s Kimi models ship CN and International deployments. Note the alias mapping is asymmetric: the bare moonshot and kimi aliases point at the CN endpoint; use the -intl/-global aliases for the international endpoint.

CNInternational
Base URLhttps://api.moonshot.cn/v1https://api.moonshot.ai/v1
Aliasesmoonshot, kimi, moonshot-cn, kimi-cnmoonshot-intl, moonshot-global, kimi-intl, kimi-global
AuthBearerBearer
Env varMOONSHOT_API_KEYMOONSHOT_API_KEY
# ~/.revka/config.toml — Kimi International
default_provider = "kimi-intl"
default_model = "kimi-k2"
api_key = "YOUR_MOONSHOT_API_KEY"

Baidu’s Qianfan platform (formerly Wenxin/ERNIE) is served from a single endpoint.

FieldValue
Base URLhttps://qianfan.baidubce.com/v2
Aliasesqianfan, baidu
AuthBearer
Env varQIANFAN_API_KEY
~/.revka/config.toml
default_provider = "qianfan"
default_model = "ernie-4.5-turbo"
api_key = "YOUR_QIANFAN_API_KEY"

You can override the base URL with api_url if Baidu routes your account to a different host.

ByteDance’s Doubao models run on the Volcengine Ark platform. The endpoint is mainland-hosted.

FieldValue
Base URLhttps://ark.cn-beijing.volces.com/api/v3
Aliasesdoubao, volcengine, ark, doubao-cn
AuthBearer
Env varsARK_API_KEY, then VOLCENGINE_API_KEY, then DOUBAO_API_KEY
~/.revka/config.toml
default_provider = "doubao"
default_model = "doubao-pro-32k"
api_key = "YOUR_ARK_API_KEY"

Alibaba Cloud Bailian (Model Studio) is served from a dedicated DashScope coding host. Vision is enabled for this provider.

FieldValue
Base URLhttps://coding.dashscope.aliyuncs.com/v1
Aliasesbailian, aliyun-bailian, aliyun
AuthBearer
Env varsBAILIAN_API_KEY, then DASHSCOPE_API_KEY
~/.revka/config.toml
default_provider = "bailian"
default_model = "qwen-max"
api_key = "YOUR_BAILIAN_API_KEY"

Because Bailian falls back to DASHSCOPE_API_KEY, a single DashScope key can serve both the qwen and bailian aliases if your account is enabled for both.

Every China provider’s region is selected purely by the alias you set as default_provider. This table is the authoritative map of which alias resolves to which endpoint.

ProviderCN endpointCN aliasesGlobal / Intl endpointGlobal / Intl aliases
GLMhttps://open.bigmodel.cn/api/paas/v4glm-cn, zhipu-cn, bigmodelhttps://api.z.ai/api/paas/v4glm, zhipu, glm-global, zhipu-global
Z.AIhttps://open.bigmodel.cn/api/coding/paas/v4zai-cn, z.ai-cnhttps://api.z.ai/api/coding/paas/v4zai, z.ai, zai-global, z.ai-global
MiniMaxhttps://api.minimaxi.com/v1minimax-cn, minimaxi, minimax-oauth-cn, minimax-portal-cnhttps://api.minimax.io/v1minimax, minimax-intl, minimax-io, minimax-global, minimax-portal
Qwen / DashScopehttps://dashscope.aliyuncs.com/compatible-mode/v1qwen, dashscope, qwen-cn, dashscope-cnIntl: https://dashscope-intl.aliyuncs.com/compatible-mode/v1 · US: https://dashscope-us.aliyuncs.com/compatible-mode/v1qwen-intl, dashscope-intl, qwen-international · qwen-us, dashscope-us
Moonshot / Kimihttps://api.moonshot.cn/v1moonshot, kimi, moonshot-cn, kimi-cnhttps://api.moonshot.ai/v1moonshot-intl, moonshot-global, kimi-intl, kimi-global
Qianfan / Baiduhttps://qianfan.baidubce.com/v2qianfan, baidu(single endpoint)
Doubao / Volcenginehttps://ark.cn-beijing.volces.com/api/v3doubao, volcengine, ark, doubao-cn(single endpoint)
Bailianhttps://coding.dashscope.aliyuncs.com/v1bailian, aliyun-bailian, aliyun(single endpoint)

The region aliases cover the standard deployments, but you can always pin an explicit base URL with api_url. This is useful for a private gateway, a regional mirror, or a host Alibaba/Baidu routed your account to:

default_provider = "qianfan"
api_url = "https://your-qianfan-mirror.example.com/v2"
api_key = "YOUR_QIANFAN_API_KEY"

If no named alias fits at all, fall back to the generic custom: prefix described in local, self-hosted & custom endpoints.