/ REST API

API 文档.

程序化查询 Pricemon 的价格数据:全部接口为 GET, 返回 UTF-8 JSON,无需鉴权。数据每 5–60 分钟可缓存(响应头 Cache-Control 标注)。

base-url

生产 (同源,与主站共用)

https://pricemon.net/api/…

生产 (API 子域,仅 /api/*)

https://api.pricemon.net/api/…

端点总览

方法 路径 说明
GET /api/meta 站点统计:总条数、厂商数、类别分布、最近核对日期
GET /api/prices 全部价格,支持 vendor / category / q / currency / reasoning / free 过滤
GET /api/prices/:slug 单模型详情,slug 即 modelId 的小写化(如 gpt-6-astra)
GET /api/compare 对比矩阵数据(CompareModel[] 裸数组;?lang= 本地化;M1-0 取代构建期数据岛)
GET /api/vendors 厂商列表(含条目数与 logo 路径)
GET /api/categories 类别列表(含条目数)
GET /api/changes 价格变动日志(按日期倒序)

端点详情

GET /api/meta

站点统计:总条数、厂商数、类别分布、最近核对日期

示例响应

{
  "ok": true,
  "data": {
    "total": 146,
    "vendors": 17,
    "categories": 7,
    "byCategory": {
      "对话": 79,
      "图像生成": 23,
      "视频生成": 27
    },
    "updatedAt": "2026-09-04"
  }
}
GET /api/prices

全部价格,支持 vendor / category / q / currency / reasoning / free 过滤

Query 参数

参数 类型 说明
vendor string 按厂商精确过滤,如 OpenAI、DeepSeek
category string 按类别过滤:对话 / 图像生成 / 视频生成 / 语音合成 / 语音识别 / 音乐生成 / 3D 生成
q string 关键词搜索,匹配厂商 / 模型名 / modelId
currency string 币种过滤:CNY 或 USD
reasoning boolean true / false,仅返回支持深度思考(或不支持)的模型
free boolean true / false,仅返回免费(或不免费)的模型
retired boolean true / false,仅返回官方已下线 / 已下架(或仍在售)的模型

示例响应

{
  "ok": true,
  "count": 1,
  "data": [
    {
      "vendor": "DeepSeek",
      "vendorLogo": "https://pricemon.net/logos/deepseek.png",
      "model": "DeepSeek-V4-Flash",
      "modelId": "deepseek-v4-flash",
      "slug": "deepseek-v4-flash",
      "category": "对话",
      "currency": "CNY",
      "unit": "百万 tokens",
      "input": 3,
      "output": 9,
      "cacheRead": 0.1,
      "context": 1000000,
      "maxOutput": 384000,
      "modalities": [
        "文本"
      ],
      "reasoning": true,
      "free": false,
      "retired": false,
      "batchOff": null,
      "tiers": null,
      "inputLabel": "¥3",
      "outputLabel": "¥9",
      "sourceUrl": "https://api-docs.deepseek.com/zh-cn/quick_start/pricing",
      "updatedAt": "2026-09-04",
      "note": "默认思考模式;空闲时段输入输出半价"
    }
  ]
}
GET /api/prices/:slug

单模型详情,slug 即 modelId 的小写化(如 gpt-6-astra)

示例响应

{
  "ok": true,
  "data": {
    "vendor": "火山方舟",
    "vendorLogo": "https://pricemon.net/logos/volcengine.png",
    "model": "Seedance 2.0",
    "modelId": "doubao-seedance-2.0",
    "slug": "doubao-seedance-2.0",
    "category": "视频生成",
    "currency": "CNY",
    "unit": "百万 tokens",
    "input": null,
    "output": null,
    "cacheRead": null,
    "context": null,
    "maxOutput": null,
    "modalities": [
      "文本",
      "图像",
      "视频"
    ],
    "reasoning": false,
    "free": false,
    "retired": false,
    "batchOff": null,
    "inputLabel": "—",
    "outputLabel": "—",
    "tiers": [
      {
        "label": "480p/720p 输入含视频(在线)",
        "price": 28,
        "input": null,
        "output": null,
        "note": null,
        "resolution": [
          "480p",
          "720p"
        ],
        "hasVideoInput": true,
        "generateAudio": null,
        "offline": false,
        "durationSeconds": null,
        "promotionNote": null,
        "expiresAt": null
      },
      {
        "label": "1080p 输入不含视频(在线,原价限时72折)",
        "price": 46,
        "input": null,
        "output": null,
        "note": null,
        "resolution": [
          "1080p"
        ],
        "hasVideoInput": false,
        "generateAudio": null,
        "offline": false,
        "durationSeconds": null,
        "promotionNote": "限时 72 折(原价刊例价)",
        "expiresAt": "2026-09-17T14:00:00+08:00"
      }
    ],
    "sourceUrl": "https://www.volcengine.com/docs/82379/1544106",
    "updatedAt": "2026-09-04",
    "note": "离线暂不支持;…"
  }
}
GET /api/compare

对比矩阵数据(CompareModel[] 裸数组;?lang= 本地化;M1-0 取代构建期数据岛)

示例响应

[
  {
    "slug": "deepseek-v4-1-flash",
    "vendor": "DeepSeek",
    "logo": "/logos/deepseek.png",
    "model": "DeepSeek-V4.1-Flash",
    "modelId": "deepseek-v4-1-flash",
    "category": "对话",
    "currency": "CNY",
    "unit": "百万 tokens",
    "input": 1,
    "output": 2,
    "cacheRead": 0.1,
    "cacheWrite": 0.2,
    "context": 64000,
    "maxOutput": 8192,
    "modalities": [
      "文本",
      "图像"
    ],
    "reasoning": false,
    "free": false,
    "batchOff": null,
    "tierCount": 0,
    "tierFrom": null,
    "tierOutput": null,
    "timedCount": 2,
    "sourceUrl": "https://api-docs.deepseek.com",
    "updatedAt": "2026-10-07"
  }
]
GET /api/vendors

厂商列表(含条目数与 logo 路径)

示例响应

{
  "ok": true,
  "count": 17,
  "data": [
    {
      "name": "DeepSeek",
      "count": 2,
      "logo": "/logos/deepseek.png"
    },
    {
      "name": "OpenAI",
      "count": 29,
      "logo": "/logos/openai.png"
    }
  ]
}
GET /api/categories

类别列表(含条目数)

示例响应

{
  "ok": true,
  "count": 7,
  "data": [
    {
      "name": "对话",
      "count": 79
    },
    {
      "name": "视频生成",
      "count": 27
    }
  ]
}
GET /api/changes

价格变动日志(按日期倒序)

示例响应

{
  "ok": true,
  "count": 1,
  "data": [
    {
      "date": "2026-09-04",
      "title": "建站首轮全量核对(28 个模型 / 10 家厂商)",
      "tag": "基线",
      "items": [
        "DeepSeek 官方文档直采:V4-Flash 输入 3 / 输出 9(高峰,空闲半价)"
      ]
    }
  ]
}
rate-limit

频率限制

每个客户端默认限制为 一分钟内最多 50 次请求 (60 秒滑动窗口),按两类维度各自独立计数, 任一超限即拒绝:

  • IP 桶 — 客户端 IP(Cloudflare 回源时取 CF-Connecting-IP,否则取连接地址 / XFF)
  • 请求指纹桶 — IP + User-Agent + Accept-Language + Accept + Sec-CH-UA 的哈希,同一客户端换 UA / 头信息也无法绕开 IP 限额

超限时返回 429 Too Many Requests, 响应带 Retry-After(秒)与 X-RateLimit-* 头;正常响应同样携带 X-RateLimit-Limit / Remaining / Reset,请据此做客户端退避。

429 响应示例

HTTP/1.1 429 Too Many Requests
Retry-After: 37
X-RateLimit-Limit: 50
X-RateLimit-Remaining: 0

{
  "ok": false,
  "error": "rate limit exceeded: max 50 requests / 60s (per IP and request fingerprint), retry later"
}
errors

错误约定

失败响应统一为 { ok: false, error: "message" }, 并配合恰当的 HTTP 状态码:

404 — model not found: xxx(slug 不存在)

429 — rate limit exceeded: …(限流)

500 — 服务器内部错误

mcp

MCP Server(Agent 接入)

需要喂给 Claude / Cursor 等 Agent 时,可直接连 MCP: https://mcp.pricemon.net/mcp (Streamable HTTP)。工具包括 search_models、 get_model_price、 compare_prices、 list_changes 等。

← 返回行情总表 · 价格变动日志 →