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
}