{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aixbt-tech/json-schema/aixbt-tech-me-schema.json",
  "title": "Me",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aixbt-tech-v3-openapi.yaml#/components/schemas/Me",
  "type": "object",
  "required": [
    "account",
    "rateLimit",
    "history"
  ],
  "properties": {
    "account": {
      "type": "object",
      "required": [
        "id",
        "plan",
        "wallet"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "plan": {
          "description": "The account's plan. Null for x402 keys, which pay per request.",
          "oneOf": [
            {
              "type": "object",
              "required": [
                "name",
                "via",
                "status",
                "periodStart",
                "renewsAt",
                "endsAt"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "via": {
                  "type": "string",
                  "enum": [
                    "subscription",
                    "holding",
                    "grant"
                  ],
                  "description": "A paid subscription, holding 600k+ AIXBT, or a manual grant."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "trialing",
                    "past_due"
                  ]
                },
                "periodStart": {
                  "description": "Start of the current billing period.",
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "renewsAt": {
                  "description": "When the plan renews. Null when it will not renew.",
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "endsAt": {
                  "description": "When access ends if the plan does not renew.",
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "wallet": {
          "description": "The account's wallet, identified by its last four characters only.",
          "oneOf": [
            {
              "type": "object",
              "required": [
                "chain",
                "last4"
              ],
              "properties": {
                "chain": {
                  "type": "string",
                  "enum": [
                    "eip155",
                    "solana"
                  ]
                },
                "last4": {
                  "type": "string",
                  "minLength": 4,
                  "maxLength": 4
                }
              }
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "rateLimit": {
      "type": "object",
      "required": [
        "perMinute",
        "perDay"
      ],
      "properties": {
        "perMinute": {
          "type": "integer"
        },
        "perDay": {
          "type": "integer"
        }
      }
    },
    "history": {
      "type": "object",
      "required": [
        "lookbackDays"
      ],
      "properties": {
        "lookbackDays": {
          "description": "Days of history available. Null means no limit.",
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  }
}