Manage Edith smart glasses API keys with Unkey. Create, revoke, and list API keys via voice commands.
使用 Unkey 管理 Edith 智能眼镜应用的 API 密钥。
用户必须将 UNKEYROOTKEY 和 UNKEYAPIID 设置为环境变量。
本技能使用 curl 调用 Unkey REST API。所有请求均发送至 https://api.unkey.dev。
为插件开发者或设备创建密钥。可选择设置名称、过期时间或速率限制。
bash
curl -s -X POST https://api.unkey.dev/v1/keys.createKey \
-H Authorization: Bearer $UNKEYROOTKEY \
-H Content-Type: application/json \
-d {
apiId: $UNKEYAPIID,
name: {{name}},
prefix: edith,
meta: { purpose: {{purpose}} },
expires: {{expiresunixmsornull}},
ratelimit: {
async: true,
limit: {{ratelimitpersecondor_10}},
duration: 1000
}
}
响应包含 key(提供给用户)和 keyId(用于管理)。
bash
curl -s https://api.unkey.dev/v1/apis.listKeys?apiId=$UNKEYAPIID \
-H Authorization: Bearer $UNKEYROOTKEY
通过 keyId 永久删除密钥。
bash
curl -s -X POST https://api.unkey.dev/v1/keys.deleteKey \
-H Authorization: Bearer $UNKEYROOTKEY \
-H Content-Type: application/json \
-d {keyId: {{keyId}}}
bash
curl -s -X POST https://api.unkey.dev/v1/keys.verifyKey \
-H Content-Type: application/json \
-d {apiId: $UNKEYAPIID, key: {{key}}}
bash
curl -s -X POST https://api.unkey.dev/v1/keys.updateKey \
-H Authorization: Bearer $UNKEYROOTKEY \
-H Content-Type: application/json \
-d {
keyId: {{keyId}},
name: {{new_name}},
ratelimit: {
async: true,
limit: {{new_limit}},
duration: 1000
}
}
当用户要求管理 Edith API 密钥时:
用户:为我的演示插件创建一个 API 密钥
bash
curl -s -X POST https://api.unkey.dev/v1/keys.createKey \
-H Authorization: Bearer $UNKEYROOTKEY \
-H Content-Type: application/json \
-d {
apiId: $UNKEYAPIID,
name: demo-plugin,
prefix: edith,
meta: { purpose: demo plugin },
ratelimit: { async: true, limit: 10, duration: 1000 }
}
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 edith-api-keys-1775955181 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 edith-api-keys-1775955181 技能
skillhub install edith-api-keys-1775955181
文件大小: 2.1 KB | 发布时间: 2026-4-13 10:08