📖 API 对接文档
1. 授权校验(生成前)
POST /api/v1/verify-face
Content-Type: application/json
Authorization: Bearer <API Key>
{
"face_id": "AF-XXXXXXXX",
"ai_platform": "klingai",
"producer_id": "<ProducerID>"
}
2. 使用记录上报(生成后)
POST /api/v1/usage-log
Content-Type: application/x-www-form-urlencoded
actor_id=<ID>&contract_id=<ID>&face_id=AF-XX&
producer_id=<ID>&ai_platform=klingai&
generation_task_id=<taskID>&cost=<amount>
API 端点总览
POST/api/v1/verify-face授权校验
POST/api/v1/usage-log使用上报+分账
GET/api/health健康检查
GET/api/stats平台统计
对接流程
① 用户输入演员 FaceID
② 调用 /api/v1/verify-face 校验 → 返回是否授权
③ 授权通过 → 调用可灵/即梦 API 生成
④ 生成完成后 → 调用 /api/v1/usage-log 上报 → 自动分账