syntax = "proto3"; package key; // 动态配置的 API KEY message KeyConfig { // 认证令牌信息 message TokenInfo { string sub = 1; // 用户标识符 int64 exp = 2; // 过期时间(Unix 时间戳) string randomness = 3; // 随机字符串 string signature = 4; // 签名 bytes machine_id = 5; // 机器ID的SHA256哈希值 bytes mac_id = 6; // MAC地址的SHA256哈希值 } // 认证令牌(必需) TokenInfo auth_token = 1; // 是否禁用图片处理能力 optional bool disable_vision = 4; // 是否启用慢速池 optional bool enable_slow_pool = 5; // 使用量检查模型规则 message UsageCheckModel { // 检查类型 enum Type { TYPE_DEFAULT = 0; // 未指定 TYPE_DISABLED = 1; // 禁用 TYPE_ALL = 2; // 全部 TYPE_CUSTOM = 3; // 自定义列表 } Type type = 1; // 检查类型 repeated string model_ids = 2; // 模型 ID 列表,当 type 为 TYPE_CUSTOM 时生效 } // 使用量检查模型规则 optional UsageCheckModel usage_check_models = 6; // 包含网络引用 optional bool include_web_references = 7; // 密码SHA256哈希值 // bytes secret = 2; }