服务商
阿里云百炼 · 按量 (北京)
Agent 怎样通过 KeyKeeper 拿到 阿里云百炼 · 按量 (北京) 的 key,在 bailian.console.aliyun.com 该选什么,KeyKeeper 怎么验证。
| 模板 id | alibaba-bailian(别名 dashscope、qwen、百炼) |
|---|---|
| 字段 | dashscope-api-key → DASHSCOPE_API_KEY · 密钥 |
| key 长什么样 | 能否再次查看未确认 |
| 创建页面 | bailian.console.aliyun.com |
| KeyKeeper 的验证 | 不验证 |
| 模板核实日期 | 2026-09-15 |
Agent 做什么
keykeeper providers show alibaba-bailian
keykeeper save --provider alibaba-bailian --from-clipboard --create --purpose "这个任务是做什么的"
keykeeper run -c alibaba-bailian -- <你的命令>--provider alibaba-bailian 会补上凭据 ID 和字段名。这些环境变量就是 阿里云百炼 自家工具读的那个,不需要任何映射。
只有你能做的
Sign in to Alibaba Cloud and complete identity verification where required
Choose the region and workspace
Create an API key with custom model access
此模板固定北京 cn-beijing;其他地区选择对应模板,不允许跨地区复用 key。
复制 key,然后在 KeyKeeper 的窗口里确认保存。
该选什么
Use a non-default workspace and Custom permission limited to the needed models and IP ranges. Keys and endpoints are region-specific.
Agent 被告知的是同一件事。它替你打开页面、说明该选什么;它从不替你登录、过 2FA 或付费。
KeyKeeper 检查什么
- 写入前: 值必须像一把 阿里云百炼 · 按量 (北京) 的 key(没有形状规则)。贴错了会在存入之前被拒绝,并告诉 Agent 原因——不含值。
- 保存后: 阿里云百炼 · 按量 (北京) 没有 KeyKeeper 可用的只读接口,第一次真实调用就是测试。
接入地址
这把 key 是下面这些地址的 bearer token。keykeeper run 只设置上面的环境变量,base URL 要你自己在客户端里指。
- OpenAI——
https://dashscope.aliyuncs.com/compatible-mode/v1(cn-beijing) - Anthropic——
https://dashscope.aliyuncs.com/apps/anthropic(cn-beijing) - DashScope——
https://dashscope.aliyuncs.com/api/v1(cn-beijing) - OpenAI · workspace (replace WorkspaceId)——
https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/compatible-mode/v1(cn-beijing)
轮换与过期
No universal expiry policy was confirmed for this credential type. Record the date shown by the provider, or leave it unknown. 在 bailian.console.aliyun.com 轮换或撤销。