接入文档
控制中心:http://bilzatudun.barbiz.cn。开通后人工下发 API Key 或绑机 License。
1. API Key 激活(个人版 / 标准版)
POST /api/developer/runtime/activate
Content-Type: application/json
{ "api_key": "bk_xxx.sk_xxx", "ttl_hours": 24 }
成功返回 session_id + session_key(仅一次)。心跳:
POST /api/developer/runtime/heartbeat
{ "session_id": "...", "session_key": "..." }
超配额(密钥数 / 月调用)返回 429。
2. 商业绑机 License(标准版首推)
- 在目标机采集
machine_id指纹 - 由 Udun 签发
.lic+ 公钥,导入业务节点 - 设置
LICENSE_ENFORCE=hard
POST /api/commercial/runtime/activate
{ "machine_id": "...", "module_id": "core" }
3. 推荐 scopes
crypto:encrypt, crypto:decrypt, license:activate, kms:manage
4. 升级检查
POST /api/developer/upgrade/check
{ "api_key": "bk_xxx.sk_xxx", "package_name": "bilzat-sdk", "current_version": "0.1.0" }