{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/networkdatalabs-com/json-schema/networkdatalabs-com-me-schema.json",
  "title": "Me",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/networkdatalabs-com-openapi.yml#/components/schemas/Me",
  "type": "object",
  "required": [
    "ip",
    "plan"
  ],
  "properties": {
    "ip": {
      "type": "string",
      "description": "Apparent client IP"
    },
    "plan": {
      "type": "string",
      "description": "Account plan. Env/internal keys report `internal`."
    },
    "requests_remaining_today": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Remaining units in the current quota period (UTC calendar month on Free and paid)"
    },
    "usage": {
      "$ref": "#/$defs/MeUsage"
    },
    "limits": {
      "$ref": "#/$defs/MeLimits"
    },
    "billing_enabled": {
      "type": "boolean",
      "description": "True when Stripe billing is configured. Signed-in users including Free can use Checkout. Dashboard hides Billing unless true.\n"
    },
    "billing": {
      "$ref": "#/$defs/MeBilling"
    },
    "trial_eligible": {
      "type": "boolean",
      "description": "True when a dashboard session can start the 14-day Growth trial (same lifecycle.growth_trial_eligible gate Checkout uses). API-key /v0/me returns false and does not look up eligibility. False when the user already trialed, cancelled after a trial, or is subscribed.\n"
    }
  },
  "$defs": {
    "MeBilling": {
      "type": "object",
      "properties": {
        "status": {
          "type": [
            "string",
            "null"
          ]
        },
        "plan": {
          "type": [
            "string",
            "null"
          ]
        },
        "price": {
          "type": [
            "string",
            "null"
          ]
        },
        "interval": {
          "type": [
            "string",
            "null"
          ]
        },
        "current_period_end": {
          "type": [
            "string",
            "null"
          ]
        },
        "cancel_at_period_end": {
          "type": "boolean"
        }
      }
    },
    "MeLimits": {
      "type": "object",
      "required": [
        "quota_period",
        "bulk"
      ],
      "properties": {
        "minute": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Legacy per-minute cap; null on current plans (use `rps`) and when unlimited."
        },
        "rps": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Strict requests-per-second cap with no burst. Free 1, Starter 10, Growth 25, Scale 50; null when unlimited."
        },
        "quota": {
          "type": [
            "integer",
            "null"
          ]
        },
        "quota_period": {
          "type": "string",
          "enum": [
            "day",
            "month",
            "unlimited"
          ]
        },
        "keys": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Max active API keys"
        },
        "bulk": {
          "type": "boolean"
        }
      }
    },
    "MeUsage": {
      "type": "object",
      "required": [
        "used",
        "period"
      ],
      "properties": {
        "used": {
          "type": "integer",
          "description": "Requests counted in the current quota period (account total)"
        },
        "limit": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Advertised quota; null if unlimited"
        },
        "remaining": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Remaining advertised units (0 in the 10% buffer); null if unlimited"
        },
        "period": {
          "type": "string",
          "enum": [
            "day",
            "month",
            "unlimited"
          ]
        },
        "reset_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When the current period resets (UTC)"
        }
      }
    }
  }
}