ResQ 暴露两个 HTTPS API:
| API | 基础 URL | 技术栈 |
|---|
| Infrastructure API | https://api.resq.software | Rust + Axum |
| Coordination API | https://coordination.resq.software | TypeScript + Elysia |
如果你运行的是自托管部署,请用你自己的基础 URL 替换上面的。请求形态是
相同的。
确认服务可用
访问 Infrastructure API 的 /health。无需认证。curl https://api.resq.software/health
健康响应类似:{
"status": "ok",
"pinata": true,
"gemini": true,
"spoon_os": "0.1.0"
}
获取 JWT
Infrastructure API 使用 bearer JWT。在 POST /login 用凭据交换 token。curl -X POST https://api.resq.software/login \
-H "Content-Type: application/json" \
-d '{"username":"你的用户名","password":"你的密码"}'
响应包含 token 和 Unix 过期时间戳:{
"token": "eyJhbGciOi...",
"expires_at": 1746345600
}
安全保存 token。刷新与轮换指南见认证。 调用受保护的端点
将 token 作为 Bearer 请求头发送。curl https://api.resq.software/evidence \
-H "Authorization: Bearer $RESQ_TOKEN"
从 Coordination API 接收遥测
Coordination API 暴露 Prometheus 指标和 Server-Sent Events,用于实时
机队状态。curl -N https://coordination.resq.software/events
每行是一个 JSON 事件:遥测帧、任务状态变化和 HITL 审批。 选择 SDK
不用自己写客户端 —— 直接安装一个官方 SDK。TypeScript
@resq-sw/http、@resq-sw/security、UI 组件。
Python
resq-mcp(FastMCP 服务器)和 resq-dsa。
Rust
统一的 resq CLI 加七个 TUI 工具。
.NET
类型化客户端、Protobuf 契约、仿真框架。
下一步