文档Docs
百炼:Token Plan 与按量付费Bailian Token Plan and pay as you go
百炼提供 Token Plan(订阅,推荐)和按量付费两种配置入口。按套餐拿对应 Key,在手机密钥卡里填写。Configure Token Plan (subscription, recommended) or a pay-as-you-go API Key in the matching phone row.
适合谁
已经在用百炼,或想用千问模型,可以继续用百炼。还没确定模型时,先看选择模型;安装和配对见安装说明。
开通与套餐
- Token Plan(订阅,推荐):使用对应订阅的套餐专属 API Key。打开订阅页。
- 按量付费:使用按量付费 API Key,费用和额度以百炼后台为准。获取按量付费 Key。
价格以订阅页为准。购买前请阅读服务商当前条款。
拿 Key
Token Plan 的获取位置是:百炼控制台 → TokenPlan → 我的订阅 → 套餐专属 API Key。按量付费使用上面的按量付费 Key 页面。两种 Key 用途不同,不要混填。
把 Key 交给 Agent J
在设置里打开模型和 API Key,找到阿里云百炼,按你选的套餐填写对应行。每行说明 Key 的来源,变量名放在「详情」。Key 只填到加密密钥卡,不要发到聊天里。保存成功后,对应行立即刷新;有验证结果时,同时显示通过或失败。
Token Plan 的变量名是 BAILIAN_TOKEN_PLAN_API_KEY,按量付费是 DASHSCOPE_API_KEY。
能用的 AI 编程工具
也可以直接对 Agent J 说:帮我配置百炼 Token Plan。它用 agentj provider bailian 准备 OpenCode,再通过加密密钥卡收 Key,不让你把 Key 写进对话。
模型与看图
| 用途 | 模型 | 能看截图 |
|---|---|---|
| 默认 | qwen3.8-max | 能(实测) |
| 省额度 | qwen3.8-flash | 能(实测) |
| 也能看图 | qwen3.7-plus、qwen3.6-flash | 能 |
| 不要当默认 | qwen3.7-max | 不能(实测) |
| 纯文本 | glm-5.3、deepseek-v4-pro | 不能 |
OpenCode 里模型写成 bailian-token-plan-personal/<模型>。“实测”指 2026-10-16 我们在Agent J 主机上发一张软件截图,让模型读出弹窗标题、错误码、按钮上的字和表格里的金额,OpenCode 和 Qwen Code 都全部读对。用 Qwen Code 时,手机上发 /model 会列出套餐里的模型,能看图的名字后面带着标记。
用纯文本模型时,你从手机发截图、或者浏览器自动化要看页面,模型都看不到。换回 qwen3.8-max 就行。
常见坑
套餐额度与账户余额是两回事。遇到限额,到对应服务商后台核对套餐窗口与恢复时间;重开会话不会增加额度。报错来源未确认时,不要把另一条辅助模型的错误归给主模型。
Token Plan 的输入输出会被服务商用于服务改进与模型优化;套餐限订阅人本人,不能共享。你自己的定时任务和后台 Agent 可用,长时间连续运行可能被限流。客服 bot 服务其他人,要另用按量付费 Key。
切回原来的工具
Who it suits
Already use Bailian, or want Qwen models? You can keep using Bailian. See Choose a model and Install to get started.
Sign up and pick a plan
- Token Plan (subscription, recommended): use the subscription's plan-specific API Key. Open subscriptions.
- Pay as you go: use the pay-as-you-go API Key; billing and quota follow your Bailian account. Get a pay-as-you-go key.
The official subscription page is authoritative for prices. Read the provider's current terms before subscribing.
Get the key
For Token Plan, open Bailian console → TokenPlan → My subscriptions → plan-specific API Key. For pay as you go, use the API Key page above. These credentials have different purposes; do not mix them up.
Hand the key to Agent J
Open Settings → Models & API keys → Alibaba Bailian and fill the row for your plan. Each row explains where to get its key; variable names are under Details. Enter keys only on the encrypted key card, never in chat. Successful saves refresh the row immediately, with a verification result when one is available.
Token Plan uses BAILIAN_TOKEN_PLAN_API_KEY; pay as you go uses DASHSCOPE_API_KEY.
AI coding tools
You can ask Agent J to configure Bailian Token Plan. It prepares OpenCode with agentj provider bailian and collects the key through the encrypted key card, never chat.
Models and screenshots
| Use | Model | Reads screenshots |
|---|---|---|
| Default | qwen3.8-max | Yes (tested) |
| Saves Credits | qwen3.8-flash | Yes (tested) |
| Also read images | qwen3.7-plus, qwen3.6-flash | Yes |
| Not as the default | qwen3.7-max | No (tested) |
| Text only | glm-5.3, deepseek-v4-pro | No |
In OpenCode, models are written bailian-token-plan-personal/<model>. Tested means: on 2026-10-16 we sent a software screenshot and asked for the dialog title, the error code, the button text and an amount in a table; in OpenCode and in Qwen Code it got all of them right. With Qwen Code, /model on your phone lists the plan's models and marks the ones that read images.
With a text-only model, a screenshot from your phone or a page the browser automation needs to look at never reaches the model. Switch back to qwen3.8-max.
Common pitfalls
Plan quota and account balance are different. Check the corresponding provider's account for the window and reset time; reopening a session does not add quota. When the error source is unknown, do not attribute an auxiliary-model failure to the main model.
Token Plan inputs and outputs are used by the provider for service improvement and model optimization. The subscription is for its owner, not sharing. Your own scheduled tasks and background Agents may use it; long continuous runs may be rate-limited. Support bots serve other people and need a separate pay-as-you-go key.
Switch back
Note your previous tool and model before switching. You can switch back using Switch AI coding tool. See the phone manual for more controls.