Did Codex Reset
AI快訊
GitHub

QQ·微信群

開放 API

OpenAPI JSON

將重置信號接入你的工具,可用 HTTP、MCP 或可安裝的 Agent Skill

無需密鑰20 次 / 小時UTC · 毫秒精度

快速接入

GET /records/latest
基礎地址https://didcodexreset.com/openapi/v1

發送 GET 請求即可讀取 JSON,無需註冊,也無需添加鑒權請求頭

cURL
curl 'https://didcodexreset.com/openapi/v1/records/latest'
JavaScript
const res = await fetch('https://didcodexreset.com/openapi/v1/records/latest?kind=reset_completed');
const body = await res.json();
if (res.status === 429) {
  const retry = Number(res.headers.get('Retry-After') || body.retryAfter);
  console.log('retry after', retry);
}
if (!res.ok) throw new Error(body.error);
console.log(body.data);
Python
from urllib.request import urlopen, Request
req = Request('https://didcodexreset.com/openapi/v1/records?page=1&pageSize=10')
with urlopen(req) as response:
    print(response.read().decode())

介面

只讀 · 匿名訪問

GET/records/latest

符合篩選的最新一條;沒有則為 null。

curl 'https://didcodexreset.com/openapi/v1/records/latest?kind=reset_completed'

GET/records

分頁列表,每頁最多 10 條。

curl 'https://didcodexreset.com/openapi/v1/records?kind=reset_scheduled&page=2&pageSize=10'

查詢參數

kind 適用於兩個數據介面(all、reset_scheduled、reset_completed)。page 與 pageSize 僅用於列表。未知、重復或越界參數返回 422,不會靜默修正。

參數預設值說明
kindallall(預設)、reset_scheduled 或 reset_completed。all 是即時公開信號,不含已兌現排期。排期篩選包含已兌現和已過期的歷史排期;已撤銷或已取消的記錄不返回。
page1從 1 開始的頁碼。超過最後一頁時返回空數組並保留請求頁碼。
pageSize101–10,預設 10。

all 與 reset_completed:仍開放的 pending 排期置頂(窗口升序),其餘按 announcedAt、completedAt、effectiveAt、id 倒序。已兌現排期不出現在 all 中,只在 reset_scheduled 中,該篩選仍按 effectiveAt 倒序。latest 等於相同篩選下列表第一項。total 是記錄數,不是實際重置次數。

介面包含當前保存的公開記錄,包括已兌現與已過期排期,不承諾永久歸檔;只需已完成重置時,請使用 kind=reset_completed

記錄字段

JSON / camelCase

所有字段均會返回,null 表示未知或不適用,不等同於零

字段類型說明
idstring記錄 id。X 來源為數字字符串,運營補記為 op_…,人工完成記錄為 manual:…
kindstringreset_scheduled 或 reset_completed,與 resetType 不是同一維度。
resetTypestringglobal、banked 或 global_and_banked。
announcedAtstring | null來源公佈時間。沒有獨立公告的人工完成記錄為 null。
effectiveAtstring | null計劃或實際重置時間。未知為 null,不會用 announcedAt 填補。
textstring | null已公開的帖子正文或運營說明;未知為 null。
confidencenumber | null已知時為 0–1。僅存在於熱力圖的歷史記錄和聚合人工完成記錄為 null。
scopeobject | null已知時包含 plans 與 windows,否則為 null。
sourceobjectorigin、postId、handle、url。人工完成記錄 origin=operator,其餘為 null。
schedulePrecisionstring | null排期為 date 或 datetime;完成記錄為 null。
scheduleBasisstring | null排期為 explicit 或 contextual_inference;完成記錄為 null。
scheduleWindowobject | null已知排期窗口的 UTC startAt / endAt。
scheduleStatestring | null排期為 pending、elapsed、fulfilled 或 unknown。elapsed 只表示窗口已過且尚未確認完成。
completedAtstring | null排期被確認兌現的時間;未確認則為 null。
completionRecordIdstring | null排期關聯的完成記錄 id。
fulfillmentOriginstring | nullauto、link 或 manual。
relatedRecordIdsstring[]完成記錄關聯的排期 id;沒有則為空數組。
source展開對象字段
字段類型說明
originstringx 表示來源帖,operator 表示運營補記或人工完成
postIdstring | null原始來源 ID 字符串,獨立人工完成記錄為 null
handlestring | nullX 來源為 thsottiaux,其餘為 null
urlstring | null規範的 X 來源帖連結,沒有來源帖時為 null
scope展開對象字段
字段類型說明
plansstring[]適用套餐標識,all 表示全部套餐,unknown 表示未明確
windowsstring[]適用額度窗口標識,例如 five_hour 或 weekly,unknown 表示未明確
scheduleWindow展開對象字段
字段類型說明
startAtstring排期窗口的 UTC 起始時間
endAtstring排期窗口的 UTC 結束時間,精確時刻的 startAt 與 endAt 相同

UTC,毫秒精度,以 Z 結尾。日期級排期保留 date 精度,窗口按當地日換算為 UTC,不會寫成精確時刻。

返回結構

application/json

成功響應包含 ok: true、data 和 meta,最新介面的 data 為單條記錄或 null,列表介面為 items 和分頁資訊;錯誤響應包含 ok: false、error 和 detail

最新記錄響應
JSON
{
  "ok": true,
  "data": {
    "id": "1960000000000000001",
    "kind": "reset_scheduled",
    "resetType": "global",
    "announcedAt": "2026-09-08T08:00:00.000Z",
    "effectiveAt": "2026-09-09T07:00:00.000Z",
    "text": "Usage limits will be reset tomorrow.",
    "confidence": 0.97,
    "scope": {
      "plans": [
        "all"
      ],
      "windows": [
        "unknown"
      ]
    },
    "source": {
      "origin": "x",
      "postId": "1960000000000000001",
      "handle": "thsottiaux",
      "url": "https://x.com/thsottiaux/status/1960000000000000001"
    },
    "schedulePrecision": "datetime",
    "scheduleBasis": "explicit",
    "scheduleWindow": {
      "startAt": "2026-09-09T07:00:00.000Z",
      "endAt": "2026-09-09T07:00:00.000Z"
    },
    "scheduleState": "pending",
    "completedAt": null,
    "completionRecordId": null,
    "fulfillmentOrigin": null,
    "relatedRecordIds": []
  },
  "meta": {
    "generatedAt": "2026-09-08T08:30:00.000Z",
    "lastSuccessfulCheckAt": "2026-09-08T08:29:00.000Z"
  }
}
列表響應
JSON
{
  "ok": true,
  "data": {
    "items": [
      {
        "id": "1960000000000000001",
        "kind": "reset_scheduled",
        "resetType": "global",
        "announcedAt": "2026-09-08T08:00:00.000Z",
        "effectiveAt": "2026-09-09T07:00:00.000Z",
        "text": "Usage limits will be reset tomorrow.",
        "confidence": 0.97,
        "scope": {
          "plans": [
            "all"
          ],
          "windows": [
            "unknown"
          ]
        },
        "source": {
          "origin": "x",
          "postId": "1960000000000000001",
          "handle": "thsottiaux",
          "url": "https://x.com/thsottiaux/status/1960000000000000001"
        },
        "schedulePrecision": "datetime",
        "scheduleBasis": "explicit",
        "scheduleWindow": {
          "startAt": "2026-09-09T07:00:00.000Z",
          "endAt": "2026-09-09T07:00:00.000Z"
        },
        "scheduleState": "pending",
        "completedAt": null,
        "completionRecordId": null,
        "fulfillmentOrigin": null,
        "relatedRecordIds": []
      }
    ],
    "page": 1,
    "pageSize": 10,
    "total": 1,
    "totalPages": 1,
    "hasNext": false
  },
  "meta": {
    "generatedAt": "2026-09-08T08:30:00.000Z",
    "lastSuccessfulCheckAt": "2026-09-08T08:29:00.000Z"
  }
}
人工完成記錄
JSON
{
  "id": "manual:1960000000000000001",
  "kind": "reset_completed",
  "resetType": "global",
  "announcedAt": null,
  "effectiveAt": "2026-09-09T07:05:00.000Z",
  "text": null,
  "confidence": null,
  "scope": {
    "plans": [
      "all"
    ],
    "windows": [
      "unknown"
    ]
  },
  "source": {
    "origin": "operator",
    "postId": null,
    "handle": null,
    "url": null
  },
  "schedulePrecision": null,
  "scheduleBasis": null,
  "scheduleWindow": null,
  "scheduleState": null,
  "completedAt": "2026-09-09T07:05:00.000Z",
  "completionRecordId": null,
  "fulfillmentOrigin": "manual",
  "relatedRecordIds": [
    "1960000000000000001"
  ]
}

data列表分頁資訊

字段類型說明
itemsobject[]記錄數組,最多 pageSize 條,該頁無記錄時為空數組
pageinteger請求頁碼,從 1 開始
pageSizeinteger請求的每頁條數,範圍 1–10
totalinteger符合篩選的記錄總數,排期與完成記錄分別計數
totalPagesinteger總頁數,無匹配記錄時為 0
hasNextboolean是否還有下一頁

meta數據更新時間

字段類型說明
generatedAtstring已發佈快照的 UTC 生成時間
lastSuccessfulCheckAtstring | null監測最後成功檢查的 UTC 時間,未知時為 null

每次請求讀取當前數據,新增或修正記錄可能引起分頁移動,請按 id 去重;meta 表示已發佈數據的時間,不是本次請求時間

限流與錯誤

20 次 / 小時

任意連續 3600 秒內最多 20 次,開放 API 數據介面與 MCP 查詢工具共享額度

獲准進入數據介面或 MCP 查詢工具的請求計一次,之後即使參數錯誤或處理失敗也會計數;握手、工具列表、協議錯誤、文檔、規範檔案、Skill 下載和 OPTIONS 不計數,同一出口 IP 共享額度;獲准進入的響應,包括成功的 200,都會返回 X-RateLimit-Limit、X-RateLimit-Remaining、X-RateLimit-Window 和 X-RateLimit-Reset,只有關閉限流時才不返回這些頭;Retry-After 僅在 HTTP 429 時返回

響應頭說明
X-RateLimit-Limit滑動窗口內最多允許的請求次數,整數
X-RateLimit-Remaining本次處理後的剩餘次數,整數
X-RateLimit-Window滑動窗口長度,單位秒
X-RateLimit-Reset最早一條已計數請求離開窗口的 UTC 時間,不代表全部額度同時恢復
Retry-After僅在 429 時返回,表示至少等待多少秒後重試,向上取整;JSON 中也會返回 retryAfter

錯誤

422 invalid_query非法、重復或未知的查詢參數。
429 rate_limited滑動窗口額度用盡。請遵守 Retry-After / retryAfter。
503 rate_limit_unavailable限流已開啓但 Redis 不可用。文檔頁仍可訪問。
503 data_unavailable還沒有任何已發佈快照。這與“有快照但沒有匹配記錄”不同。
500 internal_error服務內部錯誤,不返回內部異常詳情
404 / 405開放 API 上的未知路徑或不支持的方法,返回 JSON。
429 / rate_limited
{
  "ok": false,
  "error": "rate_limited",
  "detail": "Request limit exceeded",
  "retryAfter": 143
}