Skip to Content

API Key 格式

API Key 以 wk- 开头,例如 wk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

传递方式(二选一)

方式一:Authorization 头(推荐)

Authorization: Bearer wk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

方式二:x-api-key 头

x-api-key: wk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

鉴权失败

Key 无效或缺失时返回 401,错误体:

{ "error": { "message": "...", "type": "authentication_error" } }

LLM 接口(/v1/...)使用 API Key 鉴权;管理面接口(/api/web/*)使用 JWT,两者不通用。