{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/electronics-architect-com/json-schema/electronics-architect-com-me-schema.json",
  "title": "Me",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/electronics-architect-com-openapi.json#/components/schemas/Me",
  "type": "object",
  "properties": {
    "key": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "read",
              "write",
              "solve",
              "export",
              "parts",
              "ai"
            ]
          }
        },
        "rateLimitPerMin": {
          "type": "integer"
        },
        "teamId": {
          "type": [
            "string",
            "null"
          ]
        },
        "usage": {
          "type": "object",
          "description": "This key's own calls (UTC days); the monthly quotas under usage are the account's.",
          "properties": {
            "today": {
              "type": "integer"
            },
            "last30Days": {
              "type": "integer"
            },
            "byScope30Days": {
              "type": "object",
              "additionalProperties": {
                "type": "integer"
              }
            }
          }
        }
      }
    },
    "account": {
      "type": "object",
      "properties": {
        "tier": {
          "type": "string",
          "enum": [
            "free",
            "pro",
            "team"
          ]
        },
        "limits": {
          "type": "object",
          "description": "Free accounts only: the Free limits the routes enforce."
        },
        "savedDesigns": {
          "type": "object",
          "description": "Free accounts only: { used, limit }, counted with the editor."
        }
      }
    },
    "usage": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/Usage"
      }
    },
    "solve": {
      "type": "object"
    }
  },
  "$defs": {
    "Usage": {
      "type": "object",
      "properties": {
        "used": {
          "type": "integer"
        },
        "limit": {
          "type": [
            "integer",
            "null"
          ]
        },
        "unlimited": {
          "type": "boolean"
        },
        "resetsAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}