Authorization: Bearer <你的token>。POST /api/auth/login 获取 token,注册即送体验金。
{
"username": "demo_user",
"password": "pass123456"
}
→
{
"token": "eyJhbGci...",
"user": {"id": 1, "username": "demo_user", ...}
}
{"username": "demo", "password": "demo123"}
→ {"token": "eyJ...", "user": {...}}
→ {"conversations": [{"id":"...", "title":"...", "message_count":3}, ...]}
{"title": "🔬 超级计算", "scenario": "science"}
→ {"id": "abc123", "title": "🔬 超级计算", ...}
{
"conv_id": "abc123",
"content": "帮我设计一个分子模拟方案",
"model": "auto"
}
→ {"assistant_message": {"role":"assistant", "content":"...", "timestamp":"..."}}
→ {"results": [...], "total": 3}
→ {"points": 1000, "credit_balance": 10.00}{"amount": 10} → {"success": true, "points": 1000}{"subject": "BUG反馈", "content": "...", "type": "bug"}{"conv_id": "abc123"} → {"share_url": "/share/xxxx"}Authorization: Bearer <用户Token>,按 token 量扣费,余额不足返回 402。
auto 智能路由选项→ {"object":"list","data":[{"id":"auto"},{"id":"deepseek-chat","pricing":{"input":0.30,"output":1.20}}]}
{
"model": "auto",
"messages": [{"role":"user","content":"用Python写快速排序"}],
"stream": false
}
→ {"choices":[{"message":{"content":"..."}}], "usage":{...}, "_cost":0.0003}
model: "auto" 自动分析任务类型,匹配最优供应商_cost 为本次费用{"credit_balance": 100, "currency": "CNY"}