// PUBLIC API
API 文档
本站提供公开 API,允许第三方程序读取情报列表并提交投稿线索。基础地址:http://localhost:8787
接口一览
| 方法 | 路径 | 说明 | 参数 |
|---|---|---|---|
| GET | /api/posts | 获取资讯列表 | page, pageSize, category, vendor |
| GET | /api/posts/:slug | 获取单条资讯详情 | slug(路径参数) |
| POST | /api/submit | 提交投稿(立即发布,事后核实) | JSON Body |
查询资讯列表
curl "http://localhost:8787/api/posts?page=1&pageSize=50&category=model_release&vendor=openai" 响应示例:
{
"list": [
{
"id": 1,
"slug": "gpt-x-release",
"title": "GPT-X 发布",
"summary": "...",
"category": "model_release",
"vendor": "openai",
"verify_status": "verified",
"created_at": "2026-10-28T08:00:00Z"
}
],
"total": 1,
"page": 1,
"pageSize": 50
} 投稿接口
投稿字段:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| title | string | 是 | 标题 |
| content | string | 是 | 正文,支持 Markdown |
| source_url | string | 否 | 来源链接 |
| category | string | 是 | model_release / model_deprecation / price_change / feature_update / industry_news |
| vendor | string | 否 | 相关厂商 |
| author | string | 否 | 署名 |
curl 示例:
curl -X POST "http://localhost:8787/api/submit" \
-H "Content-Type: application/json" \
-d '{
"title": "某模型宣布降价 50%",
"content": "根据官方公告...",
"source_url": "https://example.com/blog/pricing",
"category": "price_change",
"vendor": "anthropic",
"author": "匿名线人"
}' 核实状态说明
| 状态值 | 含义 | 徽标 |
|---|---|---|
| verified | AI 已核实为真 | 🟢 已核实 |
| pending | 等待核实 | ⚪ 待核实 |
| disputed | 信息存在争议 | 🟡 存疑 |
| false | 已核实为不实信息 | 🔴 不实 |