{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "GetAccountRateLimitsResponse", "type": "object", "required": [ "rateLimits" ], "properties": { "rateLimits": { "description": "Backward-compatible single-bucket view; mirrors the historical payload.", "allOf": [ { "$ref": "#/definitions/RateLimitSnapshot" } ] }, "rateLimitsByLimitId": { "description": "Multi-bucket view keyed by metered `limit_id` (for example, `codex`).", "type": [ "object", "null" ], "additionalProperties": { "$ref": "#/definitions/RateLimitSnapshot" } } }, "definitions": { "CreditsSnapshot": { "type": "object", "required": [ "hasCredits", "unlimited" ], "properties": { "balance": { "type": [ "string", "null" ] }, "hasCredits": { "type": "boolean" }, "unlimited": { "type": "boolean" } } }, "PlanType": { "type": "string", "enum": [ "free", "go", "plus", "pro", "prolite", "team", "self_serve_business_usage_based", "business", "enterprise_cbp_usage_based", "enterprise", "edu", "unknown" ] }, "RateLimitReachedType": { "type": "string", "enum": [ "rate_limit_reached", "workspace_owner_credits_depleted", "workspace_member_credits_depleted", "workspace_owner_usage_limit_reached", "workspace_member_usage_limit_reached" ] }, "RateLimitSnapshot": { "type": "object", "properties": { "credits": { "anyOf": [ { "$ref": "#/definitions/CreditsSnapshot" }, { "type": "null" } ] }, "limitId": { "type": [ "string", "null" ] }, "limitName": { "type": [ "string", "null" ] }, "planType": { "anyOf": [ { "$ref": "#/definitions/PlanType" }, { "type": "null" } ] }, "primary": { "anyOf": [ { "$ref": "#/definitions/RateLimitWindow" }, { "type": "null" } ] }, "rateLimitReachedType": { "anyOf": [ { "$ref": "#/definitions/RateLimitReachedType" }, { "type": "null" } ] }, "secondary": { "anyOf": [ { "$ref": "#/definitions/RateLimitWindow" }, { "type": "null" } ] } } }, "RateLimitWindow": { "type": "object", "required": [ "usedPercent" ], "properties": { "resetsAt": { "type": [ "integer", "null" ], "format": "int64" }, "usedPercent": { "type": "integer", "format": "int32" }, "windowDurationMins": { "type": [ "integer", "null" ], "format": "int64" } } } } }