控制台
API 参考

API 身份验证

为每个 API 表面选择正确的凭据。

HALO 使用单独的凭据进行资源支出、公共项目配置、最终用户授权和项目管理。通过 API 表面进行选择,而不是到处传递一个通用令牌。

#凭证矩阵

凭据示例API 界面
客户端 API 密钥sk-…模型网关,记忆
可发布密钥apikey: …公共项目身份验证
项目用户访问apikey + Bearer eyJ…Current user and logout; bearer-only OAuth consent
OAuth 应用访问Bearer eyJ…OAuth 用户信息和服务范围
仪表板所有者 JWTBearer …项目配置和管理

#HALO 客户端密钥

sk- 开头的密钥授权计费网关和记忆调用。它们必须保留在受信任的运行时中。

#项目可发布密钥

发送 apikeyx-halo-project-key。导航到提供商授权端点可能会携带 ?apikey= because a browser redirect cannot add a custom header. The key is public application identity, equivalent to a Supabase publishable key; it is not a client secret.

#项目用户承载令牌

The RS256 access token represents one Authentication user and one session. Current-user and logout calls must include both this bearer token and the matching Project publishable key. Verify it with the project JWKS and required claims. Do not use it as a model-spending key.

#仪表板所有者 JWT

所有者路由位于下方 /api/user。后端在允许身份验证配置、用户管理、会话撤销、API 密钥管理或注册表更改之前验证项目所有权。