/ 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 等,詳見儲存庫

← 返回行情總表 · 價格變動日誌 →