feat(gateway): 新增接口11和61的鉴权与测试页

This commit is contained in:
xsl
2026-11-10 22:03:41 +08:00
parent a63a0565d8
commit 49cee683ad
11 changed files with 464 additions and 12 deletions
+5 -1
View File
@@ -15,7 +15,9 @@
| 接口 | 方法 | 路径 |
|------|------|------|
| 1 四庭七眼测量 | POST | `/api/v1/face/measure` |
| 11 四庭七眼测量(鉴权) | POST | `/api/v1/face/measure-11` |
| 6 四庭七眼测量 v2 | POST | `/api/v1/face/measure-v2` |
| 61 四庭七眼测量 v2(鉴权) | POST | `/api/v1/face/measure-61` |
| 2 C 端生发 | POST | `/api/v1/hair/grow` |
| 22 生发密度与发际线高度 | POST | `/api/v1/hair/grow-22` |
| 3 B 端生发 | POST | `/api/v1/hair/grow-b` |
@@ -25,6 +27,8 @@
| 5 发际线 PNG 生成 | POST | `/api/v1/hairline/generate` |
| 52 发际线新规则 | POST | `/api/v1/hairline/generate-52` |
接口 11 和 61 分别沿用接口 1 和 6 的图片参数及响应结构,需在请求头添加 `Authorization: Bearer <access_token>`。网关验证令牌后转发给 GPU worker。参见[登录与刷新令牌](接口42-52-72网关鉴权.md)。
---
## 通用约定
@@ -90,7 +94,7 @@
| 1006 | 文件超出大小限制 | 单文件超过 1 MB |
| 1007 | 图片参数错误 | file / url / base64 未传,或同时传了多个(三者严格互斥) |
| 1008 | 图片格式不支持 | 非 JPG / PNG |
| 1009 | 未授权 | worker内部`X-Internal-Token`错误;网关42/52/72号客户端 Bearer 令牌缺失、无效或过期。HTTP401 |
| 1009 | 未授权 | HTTP 401。网关受保护接口的 Bearer 令牌缺失、无效或过期。旧版 worker 的内部 `X-Internal-Token` 校验失败也使用此错误码。 |
---