{"openapi":"3.1.0","info":{"title":"Codex Resets Public API","version":"1.0.0","description":"Read-only access to reset announcements tracked by Codex Resets. Watch data is an AI-classified forecast, not an official OpenAI commitment."},"servers":[{"url":"https://codex-resets.com"}],"components":{"schemas":{"StatusResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"latest_reset":{"anyOf":[{"$ref":"#/components/schemas/Reset"},{"type":"null"}]},"active_watch":{"anyOf":[{"$ref":"#/components/schemas/Watch"},{"type":"null"}]},"stats":{"$ref":"#/components/schemas/Stats"}},"required":["latest_reset","active_watch","stats"],"additionalProperties":false},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false},"Reset":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"description":"The source X post ID, or an observed-… id when no announcement was posted."},"reset_type":{"type":"string","enum":["regular","banked"],"description":"Whether the announcement applies a regular reset or grants a banked reset credit."},"announced_at":{"type":"string","format":"date-time","description":"When the reset was announced or first observed."},"text":{"type":"string"},"source":{"$ref":"#/components/schemas/ResetSource"}},"required":["id","reset_type","announced_at","text","source"],"additionalProperties":false},"ResetSource":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["x_post"]},"author":{"type":"string","enum":["thsottiaux"]},"url":{"type":"string","format":"uri"}},"required":["type","author","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["observed"]},"url":{"type":"string","format":"uri"}},"required":["type"],"additionalProperties":false}]},"Watch":{"type":"object","properties":{"level":{"type":"string","enum":["elevated","strong"]},"reset_chance_percent":{"type":["integer","null"],"minimum":0,"maximum":100},"forecast_window":{"type":"string"},"observed_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"text":{"type":"string"},"source":{"$ref":"#/components/schemas/ResetSource"}},"required":["level","reset_chance_percent","forecast_window","observed_at","expires_at","text","source"],"additionalProperties":false},"Stats":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"last_reset_at":{"type":["string","null"],"format":"date-time"},"days_since_last":{"type":["number","null"],"minimum":0},"avg_interval_days":{"type":["number","null"],"minimum":0}},"required":["total","last_reset_at","days_since_last","avg_interval_days"],"additionalProperties":false},"Meta":{"type":"object","properties":{"api_version":{"type":"string","enum":["v1"]},"generated_at":{"type":"string","format":"date-time"}},"required":["api_version","generated_at"],"additionalProperties":false},"Problem":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"request_id":{"type":"string"},"parameter":{"type":"string"}},"required":["type","title","status","code","detail","request_id"],"additionalProperties":false},"ResetListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Reset"}},"pagination":{"type":"object","properties":{"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["has_more","next_cursor"],"additionalProperties":false},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","pagination","meta"],"additionalProperties":false}},"parameters":{}},"paths":{"/api/v1/status":{"get":{"tags":["Resets"],"operationId":"getResetStatus","summary":"Get the current reset status","description":"Returns the latest reset announcement, active watch, and aggregate statistics.","responses":{"200":{"description":"Current reset status.","headers":{"ETag":{"description":"Entity tag for conditional requests.","schema":{"type":"string"}},"Cache-Control":{"description":"Client and shared-cache freshness policy.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"304":{"description":"Not modified."},"429":{"description":"The client has exceeded the request limit.","headers":{"Retry-After":{"description":"Seconds until the client should retry.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Reset data is temporarily unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/resets":{"get":{"tags":["Resets"],"operationId":"listResets","summary":"List reset announcements","description":"Returns reset announcements using cursor-based pagination.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Number of announcements to return."},"required":false,"description":"Number of announcements to return.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^[A-Za-z0-9_-]+$","description":"Opaque cursor returned by the previous page."},"required":false,"description":"Opaque cursor returned by the previous page.","name":"cursor","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Include announcements at or after this timestamp."},"required":false,"description":"Include announcements at or after this timestamp.","name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Include announcements at or before this timestamp."},"required":false,"description":"Include announcements at or before this timestamp.","name":"to","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort by announcement time."},"required":false,"description":"Sort by announcement time.","name":"order","in":"query"}],"responses":{"200":{"description":"A page of reset announcements.","headers":{"ETag":{"description":"Entity tag for conditional requests.","schema":{"type":"string"}},"Cache-Control":{"description":"Client and shared-cache freshness policy.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetListResponse"}}}},"304":{"description":"Not modified."},"400":{"description":"A query parameter is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"The client has exceeded the request limit.","headers":{"Retry-After":{"description":"Seconds until the client should retry.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Reset data is temporarily unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"webhooks":{}}