1. 健康检查
GET /health2. 预设人物
GET /api/presets3. profile 详情
GET /api/profiles/{profileId}4. arena 运行
POST /api/arena/run5. arena 流式
POST /api/arena/stream这是根据当前 App 前端代码整理出来的后端接口清单。你可以先把这些接口挂到自己的服务器上,后面再逐步补充业务逻辑。
/api/llm/chat。输入问题,检查服务器环境变量里的 key 是否可用。
GET /healthGET /api/presetsGET /api/profiles/{profileId}POST /api/arena/runPOST /api/arena/stream{
"ok": true,
"error": null,
"runtime": {
"mode": "local"
},
"import": {
"running": false,
"lastImportedProfileIds": []
},
"timestamp": "2026-05-09T00:00:00Z"
}
stateoverview通常返回 ImportStatusResponse
presets: PresetProfile[]profilenodesagentssourceDocument?{
"displayName": "李雷",
"biography": "......",
"profileId": "optional"
}
{
"personId": "p001",
"displayName": "李雷",
"nodes": []
}
{
"personId": "p001",
"displayName": "李雷",
"biography": "......",
"nodes": []
}
{
"agents": []
}
{
"primary": {},
"secondary": {},
"displayName": "合并后名字",
"mergePrompt": "optional"
}
{
"agent": {},
"execution": {
"requestedModel": "xxx",
"requestedEffort": "medium",
"effectiveModel": "xxx",
"effectiveEffort": "high",
"fallbackUsed": false,
"sessionId": "optional",
"durationMs": 1234
}
}
{
"topic": "要讨论的问题",
"mode": "chat",
"selectedAgentIds": ["a1", "a2"],
"agents": [],
"roundCount": 3,
"maxMessageChars": 180,
"guidance": "optional",
"continueFromRunId": "optional",
"sessionId": "optional"
}
{
"result": {
"runId": "r001",
"mode": "chat",
"topic": "......",
"participants": [],
"messages": [],
"summary": {}
},
"links": {
"runId": "r001"
}
}
/api/arena/run 一致text/event-stream{
"runs": []
}
{
"result": {},
"links": {}
}
{
"ok": true,
"sessionId": "s001"
}
{
"runId": "r001",
"stylePreset": "poster",
"aspectRatio": "3:4",
"language": "zh"
}
{
"runId": "r001",
"links": {},
"poster": {}
}
multipart/form-dataimportType 必填file 必填displayNameHint / title / profileId 可选{
"bundle": {},
"import": {}
}
http://127.0.0.1:3030http://localhost:3030http://10.0.2.2:3030http://192.168.0.145:3030你本地后端建议先起在 3030 端口。前端会自动尝试这些地址,连不上再回退到线上服务。