接口一览

方法 路径 说明 参数
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
}

投稿接口

投稿字段:

字段 类型 必填 说明
titlestring是标题
contentstring是正文,支持 Markdown
source_urlstring否来源链接
categorystring是model_release / model_deprecation / price_change / feature_update / industry_news
vendorstring否相关厂商
authorstring否署名

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": "匿名线人"
  }'

核实状态说明

状态值 含义 徽标
verifiedAI 已核实为真🟢 已核实
pending等待核实⚪ 待核实
disputed信息存在争议🟡 存疑
false已核实为不实信息🔴 不实