feat(gateway): 新增接口11和61的鉴权与测试页
This commit is contained in:
@@ -249,6 +249,7 @@ async def index():
|
||||
"integration_guide": "/static/integration.html",
|
||||
"test_pages": {
|
||||
"if1_measure": "/static/test_interface1.html",
|
||||
"if11_measure": "/static/test_interface11_auth.html",
|
||||
"if2_hair_grow": "/static/test_interface2.html",
|
||||
"if22_hair_grow": "/static/test_interface22.html",
|
||||
"if3_hair_grow_b": "/static/test_interface3.html",
|
||||
@@ -258,6 +259,7 @@ async def index():
|
||||
"if5_hairline": "/static/test_interface5.html",
|
||||
"if52_hairline": "/static/test_interface52.html",
|
||||
"if6_measure_v2": "/static/test_interface6.html",
|
||||
"if61_measure_v2": "/static/test_interface61.html",
|
||||
"if7_hair_grow_v2": "/static/test_interface7.html",
|
||||
"if9_head_mask": "/static/test_interface9.html",
|
||||
"if10_head_band": "/static/test_interface10.html",
|
||||
@@ -570,12 +572,28 @@ async def face_measure(request: Request):
|
||||
return await _proxy(request, "/api/v1/face/measure")
|
||||
|
||||
|
||||
@app.post("/api/v1/face/measure-11", summary="接口11:四庭七眼测量标注(鉴权)", tags=["人脸分析"])
|
||||
async def face_measure_11(request: Request, auth_error=Depends(client_auth_error)):
|
||||
"""通过 Bearer 鉴权后,使用接口 1 的图片参数和响应格式。"""
|
||||
if auth_error is not None:
|
||||
return auth_error
|
||||
return await face_measure(request)
|
||||
|
||||
|
||||
@app.post("/api/v1/face/measure-v2", tags=["人脸分析"])
|
||||
async def face_measure_v2(request: Request):
|
||||
"""接口6:四庭七眼测量标注 v2(去顶庭 + 去头部端线)"""
|
||||
return await _proxy(request, "/api/v1/face/measure-v2")
|
||||
|
||||
|
||||
@app.post("/api/v1/face/measure-61", summary="接口61:四庭七眼测量标注 v2(鉴权)", tags=["人脸分析"])
|
||||
async def face_measure_61(request: Request, auth_error=Depends(client_auth_error)):
|
||||
"""通过 Bearer 鉴权后,使用接口 6 的图片参数和响应格式。"""
|
||||
if auth_error is not None:
|
||||
return auth_error
|
||||
return await face_measure_v2(request)
|
||||
|
||||
|
||||
@app.post("/api/v1/hair/grow", tags=["生发"])
|
||||
async def hair_grow(request: Request):
|
||||
"""接口2:C端生发"""
|
||||
|
||||
@@ -436,6 +436,8 @@ PATH_INTERFACE_MAP: Dict[str, Dict[str, Any]] = {
|
||||
"/api/v1/hair/grow-v2": {"num": 7, "name": "C端生发 v2"},
|
||||
"/api/v1/head/mask": {"num": 9, "name": "头发遮罩生成"},
|
||||
"/api/v1/head/band": {"num": 10, "name": "头部外缘膨胀带遮罩"},
|
||||
"/api/v1/face/measure-11": {"num": 11, "name": "四庭七眼测量标注(鉴权)"},
|
||||
"/api/v1/face/measure-61": {"num": 61, "name": "四庭七眼测量标注 v2(鉴权)"},
|
||||
}
|
||||
|
||||
# 会按「勾选发型数量」串行多次调用 ComfyUI 的接口(耗时 ≈ 固定开销 + 单次换发型耗时 × 发型数)
|
||||
|
||||
Reference in New Issue
Block a user