基于 FastAPI。交互式文档见 /docs(Swagger)。鉴权用请求头 X-API-Key + 权限范围;生产写操作需 Idempotency-Key。
X-API-Key: <key>,按权限范围(scope)校验。valuation:create / valuation:read / valuation:review / order:create / payment:confirm / report:read。Idempotency-Key 头,防重复提交。nosniff / X-Frame-Options: DENY / Referrer-Policy: no-referrer / 生产 HSTS。/api/download 用 HMAC 签名令牌鉴权,按次扣减、有效期限制。| 方法 | 路径 | 权限 | 说明 |
|---|---|---|---|
| GET | /api/pricing | 公开 | 分级定价与服务边界 |
| POST | /api/evaluate | valuation:create | 运行多 Agent 全链路评估,返回护照与评估摘要 |
| GET | /api/governance/rules | valuation:read | 按辖区 / 时点的适用规则(含注册表哈希) |
| GET | /api/governance/gaps | valuation:read | 国际差距矩阵(可按 P0/P1/P2 过滤) |
| GET | /api/governance/passports/{id} | valuation:read | 护照(治理视图) |
| POST | /api/pay/order | order:create | 按评估等级 × 规模生成下单 |
| POST | /api/pay/confirm | payment:confirm | 确认支付,发放下载令牌 |
| GET | /api/reports/{id} | report:read | 报告清单(分报告 / 总报告 / 复核报告 + 字数) |
| GET | /api/download | 令牌 | 鉴权下载 .md / .docx(theme 选分报告 / 总报告 / 复核) |
| POST | /api/review | valuation:review | 复核外部机构报告,出具复核意见(同业互复核) |
| GET | /api/health | 公开 | 健康 / 诊断(模块数 / RAG / 大模型 / 数据空间 / 互操作) |
| GET | /.well-known/agent-card.json | 公开 | A2A v1.0.0 Agent Card(供其他 Agent 发现) |
| GET | /api/peer/agent-card | 公开 | 同业评估机构对接卡 |
| GET | /api/chuantong_wenhua/suangua | valuation:read | 传统文化(六爻)知识增信 · 非投资/命理建议 |
| GET | /api/chuantong_wenhua/jieqi | valuation:read | 传统文化(节气)知识增信 |
| GET | /manifest.webmanifest · /sw.js | 公开 | PWA 清单与 Service Worker |
curl -X POST https://daep.shenaai.cc/api/evaluate \
-H "X-API-Key: <YOUR_KEY>" \
-H "Idempotency-Key: 2026-0701-abc123" \
-H "Content-Type: application/json" \
-d '{
"name": "银行反欺诈特征数据集",
"owner_subject": "企业",
"tier": "高价",
"industry": "金融服务",
"sub_industry": "银行信贷",
"size_gb": 8,
"demand": { "authorization": "已授权", "rights_clear": true }
}'
响应(节选):
{
"passport_id": "DA-2026-00XXXX",
"opinion_status": "...",
"opinion_value": 451716.8,
"risk_adjusted_value": ...,
"valuation_grade": "...",
"unit_price": 5398.2,
"evidence_grade": "A|B|C",
"standards_alignment": "...",
"release_classification": "..."
}
demand 显式提交 authorization 与 rights_clear,否则返回 422。评估结果为决策支持,非法定评估意见。