{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/runriva-com/json-schema/runriva-com-me-response-schema.json",
  "title": "MeResponse",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/runriva-com-openapi.json#/components/schemas/MeResponse",
  "type": "object",
  "properties": {
    "key": {
      "$ref": "#/$defs/ApiKeyInfo"
    },
    "tier": {
      "type": "string",
      "enum": [
        "free",
        "indie",
        "pro",
        "enterprise"
      ]
    },
    "rateLimit": {
      "$ref": "#/$defs/RateLimitInfo"
    },
    "monthlyQuota": {
      "$ref": "#/$defs/MonthlyQuota"
    },
    "meta": {
      "$ref": "#/$defs/MetaMe"
    }
  },
  "required": [
    "key",
    "tier",
    "rateLimit",
    "monthlyQuota",
    "meta"
  ],
  "$defs": {
    "ApiKeyInfo": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "prefix": {
          "type": "string",
          "description": "Masked display value."
        },
        "scope": {
          "type": "string",
          "enum": [
            "pk",
            "sk"
          ],
          "description": "`pk` (publishable, CORS-safe for browsers) or `sk` (secret, backend-only)."
        }
      },
      "required": [
        "id",
        "name",
        "prefix",
        "scope"
      ]
    },
    "MetaMe": {
      "type": "object",
      "properties": {
        "requestId": {
          "type": "string",
          "format": "uuid",
          "description": "Unique request identifier (also in `X-Request-Id` response header)."
        }
      },
      "required": [
        "requestId"
      ]
    },
    "MonthlyQuota": {
      "type": "object",
      "properties": {
        "limit": {
          "type": [
            "integer",
            "null"
          ]
        },
        "used": {
          "type": "integer"
        },
        "resetsAt": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "limit",
        "used",
        "resetsAt"
      ]
    },
    "RateLimitInfo": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "number",
          "description": "Burst window cap (10s sliding). Shared across all active keys of the user."
        },
        "remaining": {
          "type": "number"
        },
        "resetInSeconds": {
          "type": "integer"
        },
        "burstPer10s": {
          "type": "integer"
        },
        "perDay": {
          "type": "integer"
        }
      },
      "required": [
        "limit",
        "remaining",
        "resetInSeconds",
        "burstPer10s",
        "perDay"
      ]
    }
  }
}